diff --git a/types/chain.go b/types/chain.go index c6c7cf2..35c08da 100644 --- a/types/chain.go +++ b/types/chain.go @@ -119,13 +119,13 @@ func GetChainFromAssetType(assetType string) (coin.Coin, error) { return coin.Neutron(), nil case FA2: return coin.Tezos(), nil - case CFXEVM: + case CONFLUX: return coin.Cfxevm(), nil case ACA: return coin.Acala(), nil case ACALAEVM: return coin.Acalaevm(), nil - case BASE20: + case BASE: return coin.Base(), nil case AKASH: return coin.Akash(), nil diff --git a/types/chain_test.go b/types/chain_test.go index dfe1e06..5c0048e 100644 --- a/types/chain_test.go +++ b/types/chain_test.go @@ -85,7 +85,7 @@ func TestGetChainFromAssetType(t *testing.T) { { name: "Test Conflux eSpace", args: args{ - type_: "CFXEVM", + type_: "CONFLUX", }, want: coin.Cfxevm(), wantErr: false, diff --git a/types/token.go b/types/token.go index f27fa0c..66d0dda 100644 --- a/types/token.go +++ b/types/token.go @@ -93,10 +93,10 @@ const ( STRIDE TokenType = "STRIDE" NEUTRON TokenType = "NEUTRON" FA2 TokenType = "FA2" - CFXEVM TokenType = "CFXEVM" + CONFLUX TokenType = "CONFLUX" ACA TokenType = "ACA" ACALAEVM TokenType = "ACALAEVM" - BASE20 TokenType = "BASE20" + BASE TokenType = "BASE" AKASH TokenType = "AKT" AGORIC TokenType = "BLD" AXELAR TokenType = "AXL" @@ -185,9 +185,9 @@ func GetTokenTypes() []TokenType { SUI, STRIDE, NEUTRON, - CFXEVM, + CONFLUX, ACA, - BASE20, + BASE, AKASH, AGORIC, AXELAR, @@ -268,7 +268,7 @@ func GetTokenType(c uint, tokenID string) (string, bool) { case coin.NEUTRON: return string(NEUTRON), true case coin.CFXEVM: - return string(CFXEVM), true + return string(CONFLUX), true case coin.ACALA: return string(ACA), true case coin.AKASH: @@ -331,10 +331,10 @@ func GetTokenVersion(tokenType string) (TokenVersion, error) { return TokenVersionV11, nil case TON, POLYGONZKEVM, ZKSYNC, SUI: return TokenVersionV12, nil - case BASE20, AKASH, AGORIC, AXELAR, JUNO, SEI: + case BASE, AKASH, AGORIC, AXELAR, JUNO, SEI: return TokenVersionV13, nil case BRC20, ERC721, ERC1155, EOS, NEP5, VET, ONTOLOGY, THETA, TOMO, POA, OASIS, ALGORAND, - KAVAERC20, METER, EVMOS_ERC20, KIP20, MOONBEAM, KLAYTN, METIS, MOONRIVER, BOBA, STRIDE, NEUTRON, FA2, CFXEVM, + KAVAERC20, METER, EVMOS_ERC20, KIP20, MOONBEAM, KLAYTN, METIS, MOONRIVER, BOBA, STRIDE, NEUTRON, FA2, CONFLUX, ACA, CARDANO: return TokenVersionUndefined, nil default: @@ -428,11 +428,11 @@ func GetEthereumTokenTypeByIndex(coinIndex uint) (TokenType, error) { case coin.NEUTRON: tokenType = NEUTRON case coin.CFXEVM: - tokenType = CFXEVM + tokenType = CONFLUX case coin.ACALA: tokenType = ACA case coin.BASE: - tokenType = BASE20 + tokenType = BASE } if tokenType == "" { diff --git a/types/token_test.go b/types/token_test.go index fb260a1..12ea167 100644 --- a/types/token_test.go +++ b/types/token_test.go @@ -153,7 +153,7 @@ func TestGetEthereumTokenTypeByIndex(t *testing.T) { { name: "Conflux eSpace", args: args{coinIndex: coin.CFXEVM}, - want: CFXEVM, + want: CONFLUX, }, } for _, tt := range tests { @@ -344,7 +344,7 @@ func TestGetTokenType(t *testing.T) { { name: "Conflux eSpace", args: args{coin.CFXEVM, ""}, - want: string(CFXEVM), + want: string(CONFLUX), wantBool: true, }, { @@ -531,7 +531,7 @@ func TestGetTokenVersion(t *testing.T) { { "Conflux eSpace token version", - args{t: string(CFXEVM)}, + args{t: string(CONFLUX)}, TokenVersionUndefined, nil, },