Skip to content

Commit

Permalink
asset changes (#150)
Browse files Browse the repository at this point in the history
  • Loading branch information
defisaur authored Dec 11, 2023
1 parent 10a3fd8 commit f1a4930
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
2 changes: 2 additions & 0 deletions coin/models.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,8 @@ func GetCoinExploreURL(c Coin, tokenID, tokenType string) (string, error) {
return fmt.Sprintf("https://explorer.mantle.xyz/address/%s", tokenID), nil
case LINEA:
return fmt.Sprintf("https://explorer.linea.build/token/%s", tokenID), nil
case OPBNB:
return fmt.Sprintf("https://opbnbscan.com/token/%s", tokenID), nil
}

return "", errors.New("no explorer for coin: " + c.Handle)
Expand Down
2 changes: 1 addition & 1 deletion types/chain.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ func GetChainFromAssetType(assetType string) (coin.Coin, error) {
return coin.Cryptoorg(), nil
case COSMOS:
return coin.Cosmos(), nil
case OPBNB:
case OBNB:
return coin.Opbnb(), nil
case LINEA:
return coin.Linea(), nil
Expand Down
12 changes: 6 additions & 6 deletions types/token.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ const (
CARDANO TokenType = "CARDANO"
NEON TokenType = "NEON"
IOTEXEVM TokenType = "XRC20"
OPBNB TokenType = "OPBNB"
OBNB TokenType = "OBNB"
LINEA TokenType = "LINEA"
MANTLE TokenType = "MANTLE"
)
Expand Down Expand Up @@ -213,7 +213,7 @@ func GetTokenTypes() []TokenType {
SEI,
CARDANO,
NEON,
OPBNB,
OBNB,
LINEA,
ACALAEVM,
MANTLE,
Expand Down Expand Up @@ -370,12 +370,12 @@ func GetTokenVersion(tokenType string) (TokenVersion, error) {
return TokenVersionV11, nil
case TON, POLYGONZKEVM, ZKSYNC, SUI:
return TokenVersionV12, nil
case BASE, AKASH, AGORIC, AXELAR, JUNO, SEI, OPBNB:
case BASE, AKASH, AGORIC, AXELAR, JUNO, SEI, OBNB:
return TokenVersionV13, nil
case KAVAEVM, BOBA, METIS, NEON, LINEA, ACA, ACALAEVM, CONFLUX, IOTEXEVM, KLAYTN, MOONRIVER, MOONBEAM:
case KAVAEVM, BOBA, METIS, NEON, LINEA, ACA, ACALAEVM, CONFLUX, IOTEXEVM, KLAYTN, MOONRIVER, MOONBEAM, MANTLE:
return TokenVersionV14, nil
case BRC20, ERC721, ERC1155, EOS, NEP5, VET, ONTOLOGY, THETA, TOMO, POA, OASIS, ALGORAND, METER, EVMOS_ERC20,
KIP20, STRIDE, NEUTRON, FA2, CARDANO, NATIVEINJECTIVE, NATIVEEVMOS, CRYPTOORG, COSMOS, OSMOSIS, STARGAZE, MANTLE:
KIP20, STRIDE, NEUTRON, FA2, CARDANO, NATIVEINJECTIVE, NATIVEEVMOS, CRYPTOORG, COSMOS, OSMOSIS, STARGAZE:
return TokenVersionUndefined, nil
default:
// This should not happen, as it is guarded by TestGetTokenVersionImplementEverySupportedTokenTypes
Expand Down Expand Up @@ -478,7 +478,7 @@ func GetEthereumTokenTypeByIndex(coinIndex uint) (TokenType, error) {
case coin.IOTEXEVM:
tokenType = IOTEXEVM
case coin.OPBNB:
tokenType = OPBNB
tokenType = OBNB
case coin.LINEA:
tokenType = LINEA
case coin.MANTLE:
Expand Down

0 comments on commit f1a4930

Please sign in to comment.