Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename TON to JETTON #174

Merged
merged 4 commits into from
Jul 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
241 changes: 121 additions & 120 deletions coin/coins.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion types/chain.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ func GetChainFromAssetType(assetType string) (coin.Coin, error) {
return coin.Moonriver(), nil
case BOBA:
return coin.Boba(), nil
case TON:
case JETTON:
return coin.Ton(), nil
case POLYGONZKEVM:
return coin.Polygonzkevm(), nil
Expand Down
10 changes: 5 additions & 5 deletions types/token.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ const (
METIS TokenType = "METIS"
MOONRIVER TokenType = "MOONRIVER"
BOBA TokenType = "BOBA"
TON TokenType = "TON"
JETTON TokenType = "JETTON"
POLYGONZKEVM TokenType = "ZKEVM"
ZKSYNC TokenType = "ZKSYNC"
SUI TokenType = "SUI"
Expand Down Expand Up @@ -216,7 +216,7 @@ func GetTokenTypes() []TokenType {
METIS,
MOONRIVER,
BOBA,
TON,
JETTON,
POLYGONZKEVM,
ZKSYNC,
SUI,
Expand Down Expand Up @@ -321,7 +321,7 @@ func GetTokenType(c uint, tokenID string) (string, bool) {
case coin.APTOS:
return string(APTOS), true
case coin.TON:
return string(TON), true
return string(JETTON), true
case coin.SUI:
return string(SUI), true
case coin.STRIDE:
Expand Down Expand Up @@ -408,7 +408,7 @@ func GetTokenVersion(tokenType string) (TokenVersion, error) {
return TokenVersionV10, nil
case RONIN, AURORA:
return TokenVersionV11, nil
case TON, POLYGONZKEVM, ZKSYNC, SUI:
case JETTON, POLYGONZKEVM, ZKSYNC, SUI:
return TokenVersionV12, nil
case BASE, AKASH, AGORIC, AXELAR, JUNO, SEI, OPBNB:
return TokenVersionV13, nil
Expand Down Expand Up @@ -507,7 +507,7 @@ func GetEthereumTokenTypeByIndex(coinIndex uint) (TokenType, error) {
case coin.BOBA:
tokenType = BOBA
case coin.TON:
tokenType = TON
tokenType = JETTON
case coin.POLYGONZKEVM:
tokenType = POLYGONZKEVM
case coin.ZKSYNC:
Expand Down
14 changes: 4 additions & 10 deletions types/token_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -311,9 +311,9 @@ func TestGetTokenType(t *testing.T) {
wantBool: true,
},
{
name: "Ton",
name: "Jetton",
args: args{coin.TON, ""},
want: string(TON),
want: string(JETTON),
wantBool: true,
},
{
Expand Down Expand Up @@ -548,42 +548,36 @@ func TestGetTokenVersion(t *testing.T) {
TokenVersionV14,
nil,
},

{
"Ton token version",
args{t: string(TON)},
"Jetton token version",
args{t: string(JETTON)},
TokenVersionV12,
nil,
},

{
"Stride token version",
args{t: string(STRIDE)},
TokenVersionUndefined,
nil,
},

{
"Neutron token version",
args{t: string(NEUTRON)},
TokenVersionUndefined,
nil,
},

{
"Conflux eSpace token version",
args{t: string(CONFLUX)},
TokenVersionV14,
nil,
},

{
"Acala token version",
args{t: string(ACA)},
TokenVersionV14,
nil,
},

{
"NativeZeta token version",
args{t: string(ZETACHAIN)},
Expand Down
Loading