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

AllowedMsgAllowance does not subtract fees from spend_limit #382

Closed
4 tasks
0Tech opened this issue Nov 16, 2021 · 1 comment · Fixed by #383
Closed
4 tasks

AllowedMsgAllowance does not subtract fees from spend_limit #382

0Tech opened this issue Nov 16, 2021 · 1 comment · Fixed by #383
Assignees
Labels
A: bug Something isn't working

Comments

@0Tech
Copy link
Collaborator

0Tech commented Nov 16, 2021

Summary of Bug

AllowedMsgAllowance does not subtract the fees from spend_limit. The granter pays the fee correctly, and the module checks spend_limit so if the requested amount of fee is greater than the limit, it rejects the transaction. However, after the transaction, spend_limit, which should have been subtracted by the amount of fee, is intact.

I found the same issue on cosmos-sdk too.

Version

bc28e49

Steps to Reproduce

$ simd tx feegrant grant $granter $grantee --spend-limit $limit --allowed-messages "/lbm.bank.v1.MsgSend"
$ simd query feegrant grants $grantee // remember spend_limit
$ simd tx bank send $grantee $other $sendamount --fee-account $granter --fees $fee
$ simd query feegrant grants $grantee // spend_limit has not decreased


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned
@0Tech 0Tech added the A: bug Something isn't working label Nov 16, 2021
@0Tech 0Tech self-assigned this Nov 16, 2021
@0Tech
Copy link
Collaborator Author

0Tech commented Nov 17, 2021

I opened the issue on cosmos-sdk.
cosmos/cosmos-sdk#10563

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A: bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant