diff --git a/panacea/query_client.go b/panacea/query_client.go index ef23b71..5c7cf2c 100644 --- a/panacea/query_client.go +++ b/panacea/query_client.go @@ -5,6 +5,7 @@ import ( "encoding/base64" "errors" "fmt" + "net/url" "os" "strings" "sync" @@ -285,7 +286,8 @@ func (q verifiedQueryClient) GetStoreData(ctx context.Context, storeKey string, sdkSpecs := []*ics23.ProofSpec{ics23.IavlSpec, ics23.TendermintSpec} merkleRootKey := types.NewMerkleRoot(nextTrustedBlock.AppHash.Bytes()) - merklePath := types.NewMerklePath(storeKey, string(key)) + keyPath := url.PathEscape(string(key)) + merklePath := types.NewMerklePath(storeKey, keyPath) err = merkleProof.VerifyMembership(sdkSpecs, merkleRootKey, merklePath, result.Response.Value) if err != nil { return nil, err diff --git a/panacea/tx.go b/panacea/tx.go index 98cb201..9143758 100644 --- a/panacea/tx.go +++ b/panacea/tx.go @@ -1,6 +1,8 @@ package panacea import ( + "fmt" + clienttx "github.com/cosmos/cosmos-sdk/client/tx" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" sdk "github.com/cosmos/cosmos-sdk/types" @@ -58,7 +60,7 @@ func (tb TxBuilder) GenerateSignedTxBytes( signerAccount, err := tb.client.GetAccount(signerAddress) if err != nil { - return nil, err + return nil, fmt.Errorf("can not get signer account from address(%s): %w", signerAddress, err) } sigV2 := signing.SignatureV2{