Crash report: `TypeError: Cannot read properties of undefined (reading 'current')`
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=
swap state
{
"INPUT": {
"currencyId": null
},
"OUTPUT": {
"currencyId": "ETH"
},
"independentField": "OUTPUT",
"typedValue": "",
"recipient": null
}
Error
TypeError: Cannot read properties of undefined (reading 'current')
Stacktrace
TypeError: Cannot read properties of undefined (reading 'current')
at https://app.uniswap.org/static/js/main.8b1facf2.chunk.js:1:1405967
at Object.Qo [as useMemo] (https://app.uniswap.org/static/js/4.a2e92eb6.chunk.js:2:3856784)
at t.useMemo (https://app.uniswap.org/static/js/4.a2e92eb6.chunk.js:2:3651361)
at h (https://app.uniswap.org/static/js/main.8b1facf2.chunk.js:1:1405815)
at we (https://app.uniswap.org/static/js/main.8b1facf2.chunk.js:1:953564)
at So (https://app.uniswap.org/static/js/4.a2e92eb6.chunk.js:2:3852373)
at _f (https://app.uniswap.org/static/js/4.a2e92eb6.chunk.js:2:3864061)
at Ss (https://app.uniswap.org/static/js/4.a2e92eb6.chunk.js:2:3910468)
at gu (https://app.uniswap.org/static/js/4.a2e92eb6.chunk.js:2:3898521)
at yu (https://app.uniswap.org/static/js/4.a2e92eb6.chunk.js:2:3898449)
Device data
{
"ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36",
"browser": {
"name": "Chrome",
"version": "108.0.0.0",
"major": "108"
},
"engine": {
"name": "Blink",
"version": "108.0.0.0"
},
"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
Start by reproducing the crash at https://app.uniswap.org/#/swap/?chain= with the reported swap state, then use the stack trace to trace the minified main.8b1facf2.chunk.js entry into the swap interface. Compare the failing useMemo path with the undefined value indicated by the error. Done means the reported URL and state render without the TypeError.
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
- 25/100