Crash report: `RangeError: Division by zero`
Open
Nobody has claimed this yet.
bug
- Dominant language
- TypeScript
- Stars
- 5.5k
- Forks
- 5.4k
- PR merge metrics
- No merged PRs in 30d
Description
URL
https://app.uniswap.org/#/swap
swap state
{
"INPUT": {
"currencyId": "0xdAC17F958D2ee523a2206206994597C13D831ec7"
},
"OUTPUT": {
"currencyId": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2"
},
"independentField": "OUTPUT",
"typedValue": ".3",
"recipient": null
}
Error
RangeError: Division by zero
Stacktrace
RangeError: Division by zero
at Function.value (https://app.uniswap.org/static/js/35.812921a6.chunk.js:2:38198)
at t.get (https://app.uniswap.org/static/js/35.812921a6.chunk.js:2:64873)
at new t (https://app.uniswap.org/static/js/35.812921a6.chunk.js:2:65218)
at Function.fromFractionalAmount (https://app.uniswap.org/static/js/35.812921a6.chunk.js:2:65441)
at t.divide (https://app.uniswap.org/static/js/35.812921a6.chunk.js:2:66055)
at https://app.uniswap.org/static/js/main.0fe0d935.chunk.js:1:752938
at Array.map (<anonymous>)
at https://app.uniswap.org/static/js/main.0fe0d935.chunk.js:1:752771
at https://app.uniswap.org/static/js/main.0fe0d935.chunk.js:1:753137
at oa (https://app.uniswap.org/static/js/35.812921a6.chunk.js:2:2953349)
Device data
{
"ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36",
"browser": {
"name": "Chrome",
"version": "97.0.4692.71",
"major": "97"
},
"engine": {
"name": "Blink",
"version": "97.0.4692.71"
},
"os": {
"name": "Mac OS",
"version": "10.15.7"
},
"device": {},
"cpu": {}
}
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 crash at https://app.uniswap.org/#/swap using the supplied swap state and inspect the stack trace around fromFractionalAmount and divide in the deployed chunks. Trace those calls back to the swap interface source; done means the same input no longer raises RangeError: Division by zero.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100