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

dont calculate TransferableBalance when balance is 0 #614

Merged
merged 1 commit into from
Nov 1, 2024

Conversation

Sharqiewicz
Copy link
Collaborator

@Sharqiewicz Sharqiewicz commented Oct 31, 2024

🦈 PR 🟢

Issue description

After recent changes, we encountered an issue where accounts with a zero balance resulted in a negative transferable balance, specifically -0.00 (See image in the #609).

The cause

For accounts with a free balance of 0, calculateTransferableBalance can produce a negative value (specifically -0.001) because the EXISTENTIAL_DEPOSIT is set to 0.001, causing a deduction even when the free balance is zero.

@Sharqiewicz Sharqiewicz linked an issue Oct 31, 2024 that may be closed by this pull request
Copy link

netlify bot commented Oct 31, 2024

Deploy Preview for rococo-souffle-a625f5 ready!

Name Link
🔨 Latest commit be40502
🔍 Latest deploy log https://app.netlify.com/sites/rococo-souffle-a625f5/deploys/6724028994fcb1000818e6f2
😎 Deploy Preview https://deploy-preview-614--rococo-souffle-a625f5.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@Sharqiewicz Sharqiewicz requested a review from ebma October 31, 2024 22:25
Copy link
Member

@ebma ebma left a comment

Choose a reason for hiding this comment

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

Nice catch 👍

@Sharqiewicz Sharqiewicz merged commit 589851f into main Nov 1, 2024
5 checks passed
@Sharqiewicz Sharqiewicz deleted the 609-incorrect-balance-display-0 branch November 1, 2024 10:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incorrect balance display 0
2 participants