Skip to content

Commit

Permalink
Rename TokenType to Type
Browse files Browse the repository at this point in the history
  • Loading branch information
vikmeup committed Nov 24, 2020
1 parent 076b9ba commit e693747
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 18 deletions.
34 changes: 17 additions & 17 deletions tokentype/tokentype.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,28 @@ package tokentype
import "github.com/trustwallet/golibs/coin"

type (
TokenType string
Type string
)

const (
ERC20 TokenType = "ERC20"
BEP2 TokenType = "BEP2"
BEP8 TokenType = "BEP8"
BEP20 TokenType = "BEP20"
TRC10 TokenType = "TRC10"
ETC20 TokenType = "ETC20"
POA20 TokenType = "POA20"
TRC20 TokenType = "TRC20"
TRC21 TokenType = "TRC21"
CLO20 TokenType = "CLO20"
GO20 TokenType = "G020"
WAN20 TokenType = "WAN20"
TT20 TokenType = "TT20"
KAVA TokenType = "KAVA"
ERC20 Type = "ERC20"
BEP2 Type = "BEP2"
BEP8 Type = "BEP8"
BEP20 Type = "BEP20"
TRC10 Type = "TRC10"
ETC20 Type = "ETC20"
POA20 Type = "POA20"
TRC20 Type = "TRC20"
TRC21 Type = "TRC21"
CLO20 Type = "CLO20"
GO20 Type = "G020"
WAN20 Type = "WAN20"
TT20 Type = "TT20"
KAVA Type = "KAVA"
)

func GetEthereumTokenTypeByIndex(coinIndex uint) TokenType {
var tokenType TokenType
func GetEthereumTokenTypeByIndex(coinIndex uint) Type {
var tokenType Type
switch coinIndex {
case coin.Ethereum().ID:
tokenType = ERC20
Expand Down
2 changes: 1 addition & 1 deletion tokentype/tokentype_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ func TestGetEthereumTokenTypeByIndex(t *testing.T) {
tests := []struct {
name string
args args
want TokenType
want Type
}{
{
"Ethereum ERC20",
Expand Down

0 comments on commit e693747

Please sign in to comment.