Skip to content

Commit

Permalink
fix celo explorer url (#169)
Browse files Browse the repository at this point in the history
* fix celo explorer url

* fix celo explorer url
  • Loading branch information
nikoskarakostas authored May 1, 2024
1 parent b0ce3ae commit db559a2
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion coin/models.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ func GetCoinExploreURL(c Coin, tokenID, tokenType string) (string, error) {
case RONIN:
return fmt.Sprintf("https://explorer.roninchain.com/token/%s", tokenID), nil
case CELO:
return fmt.Sprintf("https://explorer.bitquery.io/celo_rc1/token/%s", tokenID), nil
return fmt.Sprintf("https://explorer.celo.org/mainnet/address/%s", tokenID), nil
case ELROND:
if tokenType == "ESDT" {
return fmt.Sprintf("https://explorer.multiversx.com/tokens/%s", tokenID), nil
Expand Down
10 changes: 10 additions & 0 deletions coin/models_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,16 @@ func TestGetCoinExploreURL(t *testing.T) {
want: "https://explorer.zetachain.com/address/0x890a1b6dc3ca666eacda1c453115494291c6bc6a",
wantErr: false,
},
{
name: "Test Celo",
args: args{
addr: "0x639A647fbe20b6c8ac19E48E2de44ea792c62c5C",
tokenType: "CELO",
chain: Celo(),
},
want: "https://explorer.celo.org/mainnet/address/0x639A647fbe20b6c8ac19E48E2de44ea792c62c5C",
wantErr: false,
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
Expand Down

0 comments on commit db559a2

Please sign in to comment.