Crash report: `Error: Could not parse fraction`
Open
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 5.5k
- Forks
- 5.4k
- PR merge metrics
- No merged PRs in 30d
Description
URL
swap state
{
"INPUT": {
"currencyId": "ETH"
},
"OUTPUT": {
"currencyId": "0xd79C2210E3C925C054deA19A228a813954B193eA"
},
"independentField": "INPUT",
"typedValue": "0.5",
"recipient": null
}
Error
Error: Could not parse fraction
Stacktrace
Error: Could not parse fraction
at e.tryParseFraction (https://app.cbswap.io/static/js/35.d07a2196.chunk.js:2:61996)
at t.lessThan (https://app.cbswap.io/static/js/35.d07a2196.chunk.js:2:62779)
at e.maximumAmountIn (https://app.cbswap.io/static/js/35.d07a2196.chunk.js:2:325953)
at ee (https://app.cbswap.io/static/js/main.e85514f8.chunk.js:1:971098)
at el (https://app.cbswap.io/static/js/main.e85514f8.chunk.js:1:867617)
at ua (https://app.cbswap.io/static/js/35.d07a2196.chunk.js:2:1441766)
at Ha (https://app.cbswap.io/static/js/35.d07a2196.chunk.js:2:1451333)
at Xu (https://app.cbswap.io/static/js/35.d07a2196.chunk.js:2:1495057)
at Ms (https://app.cbswap.io/static/js/35.d07a2196.chunk.js:2:1481307)
at As (https://app.cbswap.io/static/js/35.d07a2196.chunk.js:2:1481235)
Device data
{
"ua": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36",
"browser": {
"name": "Chrome",
"version": "112.0.0.0",
"major": "112"
},
"engine": {
"name": "Blink",
"version": "112.0.0.0"
},
"os": {
"name": "Linux",
"version": "x86_64"
},
"device": {},
"cpu": {
"architecture": "amd64"
}
}
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
Start by reproducing the swap state at https://app.cbswap.io/#/swap with ETH, the listed output currency, and typed value 0.5. Then locate the source equivalents of tryParseFraction, lessThan, and maximumAmountIn referenced by the stack trace; done means the same swap no longer crashes and a regression test covers the failing case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- blockchain, frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100