Skip to content

Commit

Permalink
Merge pull request #24 from terraswap/feat/verified
Browse files Browse the repository at this point in the history
Remove classic from the verified response map
  • Loading branch information
jbamlee committed Jun 4, 2024
2 parents 89a7ba9 + 130cee2 commit eaf5c54
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
4 changes: 2 additions & 2 deletions internal/app/api/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ func RunServer(c configs.Config) *terraswapApi {
tsHandler.Run()
routerService.Run()

repeater.Enroll(tsHandler.GetLogger(), tsHandler, "TerraswapDataHandler", 2, terra.BLOCK_TIME)
repeater.Enroll(tsHandler.GetLogger(), routerService, "TerraswapRouter", 2, terra.BLOCK_TIME*10)
repeater.Enroll(tsHandler.GetLogger(), tsHandler, "TerraswapDataHandler", 2, terra.BLOCK_TIME*100)
repeater.Enroll(tsHandler.GetLogger(), routerService, "TerraswapRouter", 2, terra.BLOCK_TIME*200)

gin.SetMode(c.App.Mode)
app := terraswapApi{
Expand Down
4 changes: 2 additions & 2 deletions internal/app/api/common/terraswap/repository.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ func (r *repositoryImpl) getCw20Allowlist(url string) (terraswap.TokensMap, erro
}
var cw20TokenMap map[string]allowlist.Cw20Allowlist
if terraswap.IsClassic(r.chainId) {
cw20TokenMap = res.Classic
cw20TokenMap = res.Mainnet
} else if terraswap.IsMainnet(r.chainId) {
cw20TokenMap = res.Mainnet
} else if terraswap.IsTestnet(r.chainId) {
Expand Down Expand Up @@ -100,7 +100,7 @@ func (r *repositoryImpl) getIbcAllowlist(url string) (terraswap.TokensMap, error

var ibcTokenMap map[string]allowlist.IbcTokenAllowlist
if terraswap.IsClassic(r.chainId) {
ibcTokenMap = res.Classic
ibcTokenMap = res.Mainnet
} else if terraswap.IsMainnet(r.chainId) {
ibcTokenMap = res.Mainnet
} else if terraswap.IsTestnet(r.chainId) {
Expand Down
2 changes: 0 additions & 2 deletions internal/pkg/terraswap/allowlist/dtos.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,11 @@ func (lhs IbcTokenAllowlist) Equal(src interface{}) bool {

type Cw20AllowlistResponse struct {
Mainnet map[string]Cw20Allowlist `json:"mainnet"`
Classic map[string]Cw20Allowlist `json:"classic"`
Testnet map[string]Cw20Allowlist `json:"testnet"`
}

type IbcAllowlistResponse struct {
Mainnet map[string]IbcTokenAllowlist `json:"mainnet"`
Classic map[string]IbcTokenAllowlist `json:"classic"`
Testnet map[string]IbcTokenAllowlist `json:"testnet"`
}

Expand Down

0 comments on commit eaf5c54

Please sign in to comment.