The interface seems to be broken if you use a language that uses "," decimal separator and not "."
Open
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 5.5k
- Forks
- 5.4k
- PR merge metrics
- No merged PRs in 30d
Description
Change language to Finnish and try to perform a swap:
swap doesn't function and you get a following error in console:
DEBUG Object Failed to parse input amount: "5,00" Error: invalid decimal value (argument="value", value="5,00", code=INVALID_ARGUMENT, version=bignumber/5.7.0)
at d.makeError (index.js:1:3662)
at d.throwError (index.js:1:3842)
at d.throwArgumentError (index.js:1:3924)
at m (fixednumber.js:1:1541)
at u (index.js:1:1484)
at l (tryParseCurrencyAmount.ts:27:30)
at useWrapCallback.tsx:65:11
at Object.useMemo (react-dom.production.min.js:10:70021)
at t.useMemo (react.production.min.js:10:6247)
at Fr (useWrapCallback.tsx:64:23)
at Zr (useConfirmModalState.ts:87:31)
at Lo (index.tsx:92:7)
at Aa (react-dom.production.min.js:10:63769)
at Au (react-dom.production.min.js:10:119972)
at _l (react-dom.production.min.js:10:111466)
at bl (react-dom.production.min.js:10:111397)
at gl (react-dom.production.min.js:10:111266)
at ll (react-dom.production.min.js:10:108454)
at qi (react-dom.production.min.js:10:47622)
at react-dom.production.min.js:10:106073
at l.invokeTask (zone.js:13:10547)
at s.runTask (zone.js:13:3506)
at v (zone.js:13:13806)
at c.invokeTask [as invoke] (zone.js:13:12058)
at h (zone.js:44:1697)
at y (zone.js:44:2439)
at HTMLDivElement.g (zone.js:44:2692)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the swap in Finnish with the amount shown as "5,00". Start at tryParseCurrencyAmount.ts:27 and useWrapCallback.tsx:65, then trace how the localized input reaches the parser. Done means a comma-decimal amount can complete the swap without the invalid decimal value error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100