From f52fce4079f5e969823d9be13b53f5191203bab4 Mon Sep 17 00:00:00 2001 From: nikoskarakostas Date: Wed, 6 Mar 2024 23:32:15 +0200 Subject: [PATCH] add brc20 explorer lint --- coin/models.go | 2 ++ coin/models_test.go | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/coin/models.go b/coin/models.go index 9278328..c55174d 100644 --- a/coin/models.go +++ b/coin/models.go @@ -169,6 +169,8 @@ func GetCoinExploreURL(c Coin, tokenID, tokenType string) (string, error) { return fmt.Sprintf("https://explorer.zetachain.com/address/%s", tokenID), nil case ZETAEVM: return fmt.Sprintf("https://explorer.zetachain.com/address/%s", tokenID), nil + case BITCOIN: + return fmt.Sprintf("https://unisat.io/brc20/%s", tokenID), nil } return "", errors.New("no explorer for coin: " + c.Handle) diff --git a/coin/models_test.go b/coin/models_test.go index e6fadcd..4a36016 100644 --- a/coin/models_test.go +++ b/coin/models_test.go @@ -69,7 +69,7 @@ func TestGetCoinExploreURL(t *testing.T) { args: args{ addr: "token", tokenType: "", - chain: Coin{Name: "Custom Coin"}, + chain: Coin{ID: 1, Name: "Custom Coin"}, }, want: "", wantErr: true,