From d0fde87f3cb8760d4e6f9829bd24753d6227655e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nguy=E1=BB=85n=20Quang=20Vinh?= Date: Sat, 3 Aug 2024 09:23:43 +0700 Subject: [PATCH] fix: fixed Keplr link to proposal (#103) * Update Keplr proposal url in chain.go * Update chain_test.go * Update pkg/types/chain_test.go Co-authored-by: Sergey <83376337+freak12techno@users.noreply.github.com> --------- Co-authored-by: Sergey <83376337+freak12techno@users.noreply.github.com> --- pkg/types/chain.go | 2 +- pkg/types/chain_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/types/chain.go b/pkg/types/chain.go index ee18bca..b63ed83 100644 --- a/pkg/types/chain.go +++ b/pkg/types/chain.go @@ -78,7 +78,7 @@ func (c *Chain) GetExplorerProposalsLinks(proposalID string) []Link { if c.KeplrName != "" { links = append(links, Link{ Name: "Keplr", - Href: fmt.Sprintf("https://wallet.keplr.app/#/%s/governance?detailId=%s", c.KeplrName, proposalID), + Href: fmt.Sprintf("https://wallet.keplr.app/chains/%s/proposals/%s", c.KeplrName, proposalID), }) } diff --git a/pkg/types/chain_test.go b/pkg/types/chain_test.go index 2e312f5..562a379 100644 --- a/pkg/types/chain_test.go +++ b/pkg/types/chain_test.go @@ -42,7 +42,7 @@ func TestGetLinksPresent(t *testing.T) { assert.Len(t, links, 2, "Expected 2 links") assert.Equal(t, "Keplr", links[0].Name, "Expected Keplr link") - assert.Equal(t, "https://wallet.keplr.app/#/chain/governance?detailId=test", links[0].Href, "Wrong Keplr link") + assert.Equal(t, "https://wallet.keplr.app/chains/chain/proposals/test", links[0].Href, "Wrong Keplr link") assert.Equal(t, "Explorer", links[1].Name, "Expected Explorer link") assert.Equal(t, "example.com/proposal/test", links[1].Href, "Wrong explorer link") }