Skip to content

Commit

Permalink
add missing version for sonic (#184)
Browse files Browse the repository at this point in the history
  • Loading branch information
gipshtw authored Feb 10, 2025
1 parent bc410bc commit 7f5f617
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
3 changes: 2 additions & 1 deletion types/token.go
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,7 @@ func GetTokenTypes() []TokenType {
BOUNCEBIT,
ZKLINKNOVA,
XRP,
SONIC,
}
}

Expand Down Expand Up @@ -445,7 +446,7 @@ func GetTokenVersion(tokenType string) (TokenVersion, error) {
return TokenVersionUndefined, nil
case APTOSFA:
return TokenVersionV21, nil
case XRP:
case XRP, SONIC:
return TokenVersionV22, nil
default:
// This should not happen, as it is guarded by TestGetTokenVersionImplementEverySupportedTokenTypes
Expand Down
6 changes: 6 additions & 0 deletions types/token_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -644,6 +644,12 @@ func TestGetTokenVersion(t *testing.T) {
TokenVersionV20,
nil,
},
{
"SONIC token version",
args{t: string(SONIC)},
TokenVersionV22,
nil,
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
Expand Down

0 comments on commit 7f5f617

Please sign in to comment.