Crash report: `RangeError: Division by zero`
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
https://app.uniswap.org/#/swap?chain=mainnet
swap state
{
"INPUT": {
"currencyId": "ETH"
},
"OUTPUT": {
"currencyId": "0xdAC17F958D2ee523a2206206994597C13D831ec7"
},
"independentField": "OUTPUT",
"typedValue": "1",
"recipient": null
}
Error
RangeError: Division by zero
Stacktrace
RangeError: Division by zero
at Function.value (https://app.uniswap.org/static/js/3.41edfc8a.chunk.js:2:37384)
at t.get (https://app.uniswap.org/static/js/3.41edfc8a.chunk.js:2:64060)
at new t (https://app.uniswap.org/static/js/3.41edfc8a.chunk.js:2:64405)
at Function.fromFractionalAmount (https://app.uniswap.org/static/js/3.41edfc8a.chunk.js:2:64628)
at t.divide (https://app.uniswap.org/static/js/3.41edfc8a.chunk.js:2:65242)
at https://app.uniswap.org/static/js/main.19d4c78b.chunk.js:1:723464
at Array.map (<anonymous>)
at https://app.uniswap.org/static/js/main.19d4c78b.chunk.js:1:723297
at https://app.uniswap.org/static/js/main.19d4c78b.chunk.js:1:723663
at oa (https://app.uniswap.org/static/js/3.41edfc8a.chunk.js:2:1938523)
Device data
{
"ua": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.127 Safari/537.36",
"browser": {
"name": "Chrome",
"version": "100.0.4896.127",
"major": "100"
},
"engine": {
"name": "Blink",
"version": "100.0.4896.127"
},
"os": {
"name": "Windows",
"version": "10"
},
"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
Reproduce the crash at the supplied swap URL using the provided state, then use the minified stack entries in static/js/3.41edfc8a.chunk.js and static/js/main.19d4c78b.chunk.js to trace the division-by-zero path. Done means this state no longer crashes; the report names no source file or test, so locating the relevant code and regression coverage is part of the investigation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- blockchain, frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100