fix(auth): UseGrantedFees error (#20963)
This commit is contained in:
parent
a567229106
commit
77dd7329e8
@ -63,4 +63,5 @@ Ref: https://keepachangelog.com/en/1.0.0/
|
||||
* [#19148](https://github.com/cosmos/cosmos-sdk/pull/19148) Checks the consumed gas for verifying a multisig pubKey signature during simulation.
|
||||
* [#19239](https://github.com/cosmos/cosmos-sdk/pull/19239) Sets from flag in multi-sign command to avoid no key name provided error.
|
||||
* [#19099](https://github.com/cosmos/cosmos-sdk/pull/19099) `verifyIsOnCurve` now checks if we are simulating to avoid malformed public key error.
|
||||
* [#20323](https://github.com/cosmos/cosmos-sdk/pull/20323) Ignore undecodable txs in GetBlocksWithTxs.
|
||||
* [#20323](https://github.com/cosmos/cosmos-sdk/pull/20323) Ignore undecodable txs in GetBlocksWithTxs.
|
||||
* [#20963](https://github.com/cosmos/cosmos-sdk/pull/20963) UseGrantedFees used to return error with raw addresses. Now it uses addresses in string format.
|
||||
@ -98,7 +98,15 @@ func (dfd DeductFeeDecorator) checkDeductFee(ctx sdk.Context, sdkTx sdk.Tx, fee
|
||||
} else if !bytes.Equal(feeGranterAddr, feePayer) {
|
||||
err := dfd.feegrantKeeper.UseGrantedFees(ctx, feeGranterAddr, feePayer, fee, sdkTx.GetMsgs())
|
||||
if err != nil {
|
||||
return errorsmod.Wrapf(err, "%s does not allow to pay fees for %s", feeGranter, feePayer)
|
||||
granterAddr, acErr := dfd.accountKeeper.AddressCodec().BytesToString(feeGranter)
|
||||
if acErr != nil {
|
||||
return errorsmod.Wrapf(err, "%s, feeGranter does not allow to pay fees", acErr.Error())
|
||||
}
|
||||
payerAddr, acErr := dfd.accountKeeper.AddressCodec().BytesToString(feePayer)
|
||||
if acErr != nil {
|
||||
return errorsmod.Wrapf(err, "%s, feeGranter does not allow to pay fees", acErr.Error())
|
||||
}
|
||||
return errorsmod.Wrapf(err, "%s does not allow to pay fees for %s", granterAddr, payerAddr)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user