Uniswap / Uniswap/interface

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

Open
#6,501 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://bobswob.com/#/swap

swap state

{
  "INPUT": {
    "currencyId": "ETH"
  },
  "OUTPUT": {
    "currencyId": null
  },
  "independentField": "INPUT",
  "typedValue": "",
  "recipient": null
}

Error

TypeError: Cannot read properties of undefined (reading 'trade')

Stacktrace

TypeError: Cannot read properties of undefined (reading 'trade')
    at dk (https://bobswob.com/static/js/main.226ff836.chunk.js:1:3899806)
    at ua (https://bobswob.com/static/js/34.1d7f00ac.chunk.js:2:1551115)
    at Ha (https://bobswob.com/static/js/34.1d7f00ac.chunk.js:2:1560682)
    at Xu (https://bobswob.com/static/js/34.1d7f00ac.chunk.js:2:1604406)
    at js (https://bobswob.com/static/js/34.1d7f00ac.chunk.js:2:1590656)
    at Ss (https://bobswob.com/static/js/34.1d7f00ac.chunk.js:2:1590584)
    at As (https://bobswob.com/static/js/34.1d7f00ac.chunk.js:2:1590447)
    at bs (https://bobswob.com/static/js/34.1d7f00ac.chunk.js:2:1587413)
    at https://bobswob.com/static/js/34.1d7f00ac.chunk.js:2:1536907
    at t.unstable_runWithPriority (https://bobswob.com/static/js/34.1d7f00ac.chunk.js:2:1614144)

Device data

{
  "ua": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36",
  "browser": {
    "name": "Chrome",
    "version": "112.0.0.0",
    "major": "112"
  },
  "engine": {
    "name": "Blink",
    "version": "112.0.0.0"
  },
  "os": {
    "name": "Windows",
    "version": "10"
  },
  "device": {},
  "cpu": {
    "architecture": "amd64"
  }
}

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 at the /#/swap route using the supplied swap state, and reproduce the TypeError in the deployed interface. Trace the minified stack back to the TypeScript source; done means this empty-output state no longer crashes.

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.