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
});
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 });