Uniswap / Uniswap/interface

Crash report: `TypeError: Cannot read properties of undefined (reading 'current')`

Open
#3,881 0 comments 0 reactions 0 assignees View on GitHub

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

swap state

{
  "INPUT": {
    "currencyId": "ETH"
  },
  "OUTPUT": {
    "currencyId": null
  },
  "typedValue": "",
  "independentField": "INPUT",
  "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.e5723063.chunk.js:1:204550
    at Object._a [as useMemo] (https://app.uniswap.org/static/js/3.dbad261b.chunk.js:2:1918548)
    at t.useMemo (https://app.uniswap.org/static/js/3.dbad261b.chunk.js:2:1848560)
    at T (https://app.uniswap.org/static/js/main.e5723063.chunk.js:1:204454)
    at Dl (https://app.uniswap.org/static/js/main.e5723063.chunk.js:1:514260)
    at Vh (https://app.uniswap.org/static/js/main.e5723063.chunk.js:1:749689)
    at oa (https://app.uniswap.org/static/js/3.dbad261b.chunk.js:2:1913815)
    at za (https://app.uniswap.org/static/js/3.dbad261b.chunk.js:2:1923382)
    at Yo (https://app.uniswap.org/static/js/3.dbad261b.chunk.js:2:1967106)
    at Uu (https://app.uniswap.org/static/js/3.dbad261b.chunk.js:2:1953356)

Device data

{
  "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.5005.61 Safari/537.36",
  "browser": {
    "name": "Chrome",
    "version": "102.0.5005.61",
    "major": "102"
  },
  "engine": {
    "name": "Blink",
    "version": "102.0.5005.61"
  },
  "os": {
    "name": "Mac OS",
    "version": "10.14.6"
  },
  "device": {},
  "cpu": {}
}

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the crash at https://app.uniswap.org/#/swap using the reported swap state, then trace the minified stack back to the corresponding source location in the interface. Done means the swap page no longer throws the reported TypeError for this state and the relevant regression is covered by a test.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.