Skip to content

Commit

Permalink
fix: fixed Keplr link to proposal (#103)
Browse files Browse the repository at this point in the history
* Update Keplr proposal url in chain.go

* Update chain_test.go

* Update pkg/types/chain_test.go

Co-authored-by: Sergey <[email protected]>

---------

Co-authored-by: Sergey <[email protected]>
  • Loading branch information
hakuno2000 and freak12techno authored Aug 3, 2024
1 parent d5a4a64 commit d0fde87
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/types/chain.go
Original file line number Diff line number Diff line change
Expand Up @@ -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),
})
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/types/chain_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
Expand Down

0 comments on commit d0fde87

Please sign in to comment.