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

Revise api.derive.balances.all to include ED when necessary #5957

Merged
merged 1 commit into from
Aug 19, 2024

Conversation

TarikGul
Copy link
Member

@TarikGul TarikGul commented Aug 19, 2024

First iteration

transferable = free - max(ED, frozen - hold)

Second iteration

transferable = free - max(0, frozen - hold)

Final iteration

maybeEd = (frozen === 0 && reserved === 0) ? 0 : ED.
transferable = free - max(maybeEd, frozen - hold)

Thank you to @Nick-1979 for help, and guidance on the above by revisioning the last PR.

Copy link
Member

@bee344 bee344 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@TarikGul TarikGul merged commit 92dfe00 into master Aug 19, 2024
4 checks passed
@TarikGul TarikGul deleted the tg-revise branch August 19, 2024 17:46
@polkadot-js-bot
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@polkadot-js polkadot-js locked as resolved and limited conversation to collaborators Aug 21, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants