Crash report: `TypeError: Cannot read properties of undefined (reading '0')`
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
When trying to add liquidity for the USDC/USDT pair, the app returns an error.
URL
mintV3 state
{
"independentField": "CURRENCY_A",
"typedValue": "",
"startPriceTypedValue": "",
"leftRangeTypedValue": "",
"rightRangeTypedValue": ""
}
Error
TypeError: Cannot read properties of undefined (reading '0')
Stacktrace
TypeError: Cannot read properties of undefined (reading '0')
at https://app.uniswap.org/static/js/main.e9530db1.chunk.js:1:438547
at Array.reduce (<anonymous>)
at https://app.uniswap.org/static/js/main.e9530db1.chunk.js:1:438471
at Object.Aa [as useMemo] (https://app.uniswap.org/static/js/35.49bb3185.chunk.js:2:1353145)
at https://app.uniswap.org/static/js/35.49bb3185.chunk.js:2:1288165
at https://app.uniswap.org/static/js/main.e9530db1.chunk.js:1:438108
at uv (https://app.uniswap.org/static/js/main.e9530db1.chunk.js:1:439437)
at Wv (https://app.uniswap.org/static/js/main.e9530db1.chunk.js:1:445347)
at ua (https://app.uniswap.org/static/js/35.49bb3185.chunk.js:2:1348412)
at Va (https://app.uniswap.org/static/js/35.49bb3185.chunk.js:2:1357979)
Device data
{
"ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.45 Safari/537.36",
"browser": {
"name": "Chrome",
"version": "96.0.4664.45",
"major": "96"
},
"engine": {
"name": "Blink",
"version": "96.0.4664.45"
},
"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 failure at the supplied USDC/USDT add-liquidity URL using the shown mintV3 state, then trace the minified stack through the corresponding TypeScript source. Identify which input is undefined during the reduce operation and verify that the add-liquidity flow completes without the TypeError.
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
- 30/100