pendulum-chain / portal

The Pendulum/Amplitude portal UI
https://portal.pendulumchain.org/
GNU General Public License v3.0
1 stars 1 forks source link

dont calculate TransferableBalance when balance is 0 #614

Closed Sharqiewicz closed 3 weeks ago

Sharqiewicz commented 3 weeks ago

🦈 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.

netlify[bot] commented 3 weeks ago

Deploy Preview for rococo-souffle-a625f5 ready!

Name Link
Latest commit be40502707ae6155f81c7ababa055700552652f5
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.