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

transfer_allow_death - emitting an empty Deposit event #6469

Closed
2 tasks done
Dinonard opened this issue Nov 13, 2024 · 3 comments · Fixed by #6506
Closed
2 tasks done

transfer_allow_death - emitting an empty Deposit event #6469

Dinonard opened this issue Nov 13, 2024 · 3 comments · Fixed by #6506
Labels
I2-bug The node fails to follow expected behavior. I10-unconfirmed Issue might be valid, but it's not yet known.

Comments

@Dinonard
Copy link
Contributor

Dinonard commented Nov 13, 2024

Is there an existing issue?

  • I have searched the existing issues

Experiencing problems? Have you tried our Stack Exchange first?

  • This is not a support question.

Description of bug

In case transfer_allow_death does not kill the account, and empty Deposit event is emitted.
E.g.: https://polkadot.subscan.io/extrinsic/23395862-2

I believe it's because of the lack of is-zero check here:
https://github.com/paritytech/polkadot-sdk/blob/master/substrate/frame/transaction-payment/src/payment.rs#L160

Can someone please confirm this is not intentional?

Steps to reproduce

No response

@Dinonard Dinonard added I10-unconfirmed Issue might be valid, but it's not yet known. I2-bug The node fails to follow expected behavior. labels Nov 13, 2024
@bkchr
Copy link
Member

bkchr commented Nov 14, 2024

By empty you mean the deposit == 0 event? IMO reasonable to not send this, as you are proposing.

@Dinonard
Copy link
Contributor Author

Yes, I meant it's zero. Should have been more clear, my bad.

I'll prepare a PR to change this then. 🙂

@bkchr
Copy link
Member

bkchr commented Nov 14, 2024

Ty!

github-merge-queue bot pushed a commit that referenced this issue Nov 26, 2024
`FungibleAdapter` will now check if the _refund amount_ is zero before
calling deposit & emitting an event.

Fixes #6469.

---------

Co-authored-by: GitHub Action <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I2-bug The node fails to follow expected behavior. I10-unconfirmed Issue might be valid, but it's not yet known.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants