Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: reduce get bech32 prefix when get signer #1231

Merged
merged 10 commits into from
Aug 1, 2023
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
* [\#1208](https://github.com/cosmos/relayer/pull/1208) Replace gogo/protobuf to cosmos/gogoproto.
* [\#1221](https://github.com/cosmos/relayer/pull/1221) Update cometbft to v0.37.2 and ibc-go to v7.2.0.
* [\#1226](https://github.com/cosmos/relayer/pull/1226) Avoid invalid Bech32 prefix error in parallel tests when sdk Config get overwritten by each other in single process.
* [\#1231](https://github.com/cosmos/relayer/pull/1231) Reduce get bech32 prefix when get signer.

## v0.9.3

Expand Down
13 changes: 13 additions & 0 deletions relayer/chains/cosmos/log.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"github.com/cosmos/cosmos-sdk/codec/types"
sdk "github.com/cosmos/cosmos-sdk/types"
typestx "github.com/cosmos/cosmos-sdk/types/tx"
feetypes "github.com/cosmos/ibc-go/v7/modules/apps/29-fee/types"
transfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types"
clienttypes "github.com/cosmos/ibc-go/v7/modules/core/02-client/types"
chantypes "github.com/cosmos/ibc-go/v7/modules/core/04-channel/types"
Expand Down Expand Up @@ -162,6 +163,18 @@ func getFeePayer(tx *typestx.Tx) string {
case *clienttypes.MsgUpdateClient:
// Same failure mode as MsgCreateClient.
return firstMsg.Signer
case *clienttypes.MsgUpgradeClient:
return firstMsg.Signer
case *clienttypes.MsgSubmitMisbehaviour:
return firstMsg.Signer
case *feetypes.MsgRegisterPayee:
return firstMsg.Relayer
case *feetypes.MsgRegisterCounterpartyPayee:
return firstMsg.Relayer
case *feetypes.MsgPayPacketFee:
return firstMsg.Signer
case *feetypes.MsgPayPacketFeeAsync:
return firstMsg.PacketFee.RefundAddress
default:
return firstMsg.GetSigners()[0].String()
}
Expand Down
13 changes: 13 additions & 0 deletions relayer/chains/penumbra/log.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"github.com/cosmos/cosmos-sdk/codec/types"
sdk "github.com/cosmos/cosmos-sdk/types"
typestx "github.com/cosmos/cosmos-sdk/types/tx"
feetypes "github.com/cosmos/ibc-go/v7/modules/apps/29-fee/types"
transfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types"
clienttypes "github.com/cosmos/ibc-go/v7/modules/core/02-client/types"
"github.com/cosmos/relayer/v2/relayer/provider"
Expand Down Expand Up @@ -151,6 +152,18 @@ func getFeePayer(tx *typestx.Tx) string {
case *clienttypes.MsgUpdateClient:
// Same failure mode as MsgCreateClient.
return firstMsg.Signer
case *clienttypes.MsgUpgradeClient:
return firstMsg.Signer
case *clienttypes.MsgSubmitMisbehaviour:
return firstMsg.Signer
case *feetypes.MsgRegisterPayee:
return firstMsg.Relayer
case *feetypes.MsgRegisterCounterpartyPayee:
return firstMsg.Relayer
case *feetypes.MsgPayPacketFee:
return firstMsg.Signer
case *feetypes.MsgPayPacketFeeAsync:
return firstMsg.PacketFee.RefundAddress
default:
return firstMsg.GetSigners()[0].String()
}
Expand Down
Loading