Skip to content

Commit

Permalink
rename (#124)
Browse files Browse the repository at this point in the history
  • Loading branch information
defisaur authored Aug 16, 2023
1 parent 0d84597 commit c5cf61a
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 15 deletions.
4 changes: 2 additions & 2 deletions types/chain.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion types/chain_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ func TestGetChainFromAssetType(t *testing.T) {
{
name: "Test Conflux eSpace",
args: args{
type_: "CFXEVM",
type_: "CONFLUX",
},
want: coin.Cfxevm(),
wantErr: false,
Expand Down
18 changes: 9 additions & 9 deletions types/token.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -185,9 +185,9 @@ func GetTokenTypes() []TokenType {
SUI,
STRIDE,
NEUTRON,
CFXEVM,
CONFLUX,
ACA,
BASE20,
BASE,
AKASH,
AGORIC,
AXELAR,
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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 == "" {
Expand Down
6 changes: 3 additions & 3 deletions types/token_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -344,7 +344,7 @@ func TestGetTokenType(t *testing.T) {
{
name: "Conflux eSpace",
args: args{coin.CFXEVM, ""},
want: string(CFXEVM),
want: string(CONFLUX),
wantBool: true,
},
{
Expand Down Expand Up @@ -531,7 +531,7 @@ func TestGetTokenVersion(t *testing.T) {

{
"Conflux eSpace token version",
args{t: string(CFXEVM)},
args{t: string(CONFLUX)},
TokenVersionUndefined,
nil,
},
Expand Down

0 comments on commit c5cf61a

Please sign in to comment.