You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Two issues found during Gitter community testing (Apr 1 2026):
1. Tooltip showed generic wallet limits (0.00000001 to 999,999,999)
instead of actual DD limits ($100-$100K for mint, $1-$100K for send).
Root cause: AmountValidator was initialized with DGB satoshi ranges
rather than DigiDollar consensus params.
2. Entering amounts with >2 decimal places (e.g. 9999.12345678) was
silently truncated to 2 places via static_cast<CAmount>(amount*100)
with no warning. Users saw 'Mint validation success' for the wrong
amount.
Fixes across all 4 DD widgets (mint, send, redeem, positions):
- Add maxDecimals parameter to AmountValidator (default 8 for DGB
backwards compat, 2 for all DD widgets)
- Validator now rejects >2 decimal places at input time — users
literally cannot type a third decimal digit
- Update all tooltips/placeholders to show correct DD limits
- Replace static_cast truncation with std::llround() as defense-in-depth
- Change all DD formatDDAmount() from 'f',8 to 'f',2 (DD is cents)
- Fix 'Use available balance' buttons to fill 2 decimal places
Consensus params (unchanged): minMintAmount=10000 ($100),
maxMintAmount=10000000 ($100K), minOutputAmount=100 ($1).
m_amountEdit->setToolTip(tr("The amount of DigiDollar to mint.\n\nSupported formats:\n• 0.00000001 (minimum)\n• Up to 8 decimal places\n• Maximum: 999,999,999.99999999"));
162
+
m_amountEdit->setPlaceholderText("0.00");
163
+
m_amountEdit->setToolTip(tr("The amount of DigiDollar to mint.\n\n• Minimum: $100.00\n• Maximum: $100,000.00\n• Up to 2 decimal places (cents)"));
m_amountEdit->setToolTip(tr("The amount to send in DigiDollar.\n\nSupported formats:\n• 0.00000001 (minimum)\n• Up to 8 decimal places\n• Maximum: 999,999,999.99999999"));
261
+
m_amountEdit->setPlaceholderText("0.00");
262
+
m_amountEdit->setToolTip(tr("The amount of DigiDollar to send.\n\n• Minimum: $1.00\n• Maximum: $100,000.00\n• Up to 2 decimal places (cents)"));
0 commit comments