Skip to content

Commit

Permalink
Address PR comments [5]
Browse files Browse the repository at this point in the history
  • Loading branch information
swift1337 committed Nov 22, 2024
1 parent 578bf5e commit 9b264d9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
7 changes: 4 additions & 3 deletions pkg/cosmos/cosmos.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ import (
"github.com/cosmos/cosmos-sdk/types/bech32/legacybech32" // nolint
)

const Bech32PubKeyTypeAccPub = legacybech32.AccPK

var (
GetPubKeyFromBech32 = legacybech32.UnmarshalPubKey
Bech32ifyPubKey = legacybech32.MarshalPubKey
Bech32PubKeyTypeAccPub = legacybech32.AccPK
GetPubKeyFromBech32 = legacybech32.UnmarshalPubKey
Bech32ifyPubKey = legacybech32.MarshalPubKey
)
4 changes: 1 addition & 3 deletions zetaclient/tss/crypto.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,8 @@ func (k PubKey) Bytes(compress bool) []byte {
// Example: `zetapub1addwnpepq2fdhcmfyv07s86djjca835l4f2n2ta0c7le6vnl508mseca2s9g6slj0gm`
func (k PubKey) Bech32String() string {
v, err := cosmos.Bech32ifyPubKey(cosmos.Bech32PubKeyTypeAccPub, k.cosmosPubKey)

// should not happen as we only set k.cosmosPubKey from the constructor
if err != nil {
panic("PubKey.Bech32String: " + err.Error())
return "" // not possible
}

Check warning on line 109 in zetaclient/tss/crypto.go

View check run for this annotation

Codecov / codecov/patch

zetaclient/tss/crypto.go#L108-L109

Added lines #L108 - L109 were not covered by tests

return v
Expand Down

0 comments on commit 9b264d9

Please sign in to comment.