components/DelegatingWidget/Undelegate.tsx:36-40 calls parseEther unguarded while building the transaction args:
const args = {
amount: parseEther(amount ? amount.toString() : "0"),
...
};
That runs during render, and parseEther throws on exponent notation (1e3), which <input type="number"> accepts and hands through. The result is a Runtime InvalidDecimalNumberError overlay and a blank widget.
Same defect was fixed on the delegate side in #738, which introduced parseAmountToWei in utils/web3.ts — a parse that returns null instead of throwing. The undelegate tab shares the same amount input and was missed.
Reproduction
Open the Undelegate tab and type 1e3.
Fix
Use parseAmountToWei and fall back to 0n, as Delegate.tsx and Footer.tsx now do.
components/DelegatingWidget/Undelegate.tsx:36-40callsparseEtherunguarded while building the transaction args:That runs during render, and
parseEtherthrows on exponent notation (1e3), which<input type="number">accepts and hands through. The result is aRuntime InvalidDecimalNumberErroroverlay and a blank widget.Same defect was fixed on the delegate side in #738, which introduced
parseAmountToWeiinutils/web3.ts— a parse that returnsnullinstead of throwing. The undelegate tab shares the same amount input and was missed.Reproduction
Open the Undelegate tab and type
1e3.Fix
Use
parseAmountToWeiand fall back to0n, asDelegate.tsxandFooter.tsxnow do.