involveMINT / iMPublic

Public involveMINT repo
https://app.involvemint.io
7 stars 20 forks source link

Feat 143 fix escrow decimal #299

Open hamede-abdulgafur opened 3 weeks ago

hamede-abdulgafur commented 3 weeks ago

Bug Description The bug involved incorrect decimal formatting for credits in escrow within the wallet section of the application. Instead of displaying the correct value with two decimal places (e.g., 90.00), the application was showing the credits in escrow as whole numbers without decimals (e.g., 9000).

Root Cause The issue was caused by the escrowBalance value being handled as a whole number (in cents) without converting it to a formatted decimal value (dollars).

code changes this.updateState({ credits, creditsLoaded: loaded, balance: balance / 100, // Correctly format the balance escrowCredits, escrowBalance: escrowBalance / 100, // Correctly format the escrow balance });