Uniswap / Uniswap/interface

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

Open
#7,694 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

In the NFT router, inside the bag menu, when trying to change the payment token in "Pay With" from ETH to another token, clicking on such token (e.g USDC or USDT) in the modal results in an error page:

Something went wrong
Sorry, an error occured while processing your request. If you request support, be sure to provide your error ID.

Which makes it impossible to purchase NFTs with tokens other than ETH.

URL

https://app.uniswap.org/nfts

Error

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

Stacktrace

TypeError: Cannot read properties of undefined (reading '0') at c (https://app.uniswap.org/static/js/main.9a72573f.js:5628:25756) at d (https://app.uniswap.org/static/js/main.9a72573f.js:5628:25688) at https://app.uniswap.org/static/js/3464.269a4681.chunk.js:85:4128 at Object.Xa [as useMemo] (https://app.uniswap.org/static/js/8143.2ae1e5d1.js:2:1777539) at t.useMemo (https://app.uniswap.org/static/js/8143.2ae1e5d1.js:2:2181395) at https://app.uniswap.org/static/js/3464.269a4681.chunk.js:85:4102 at Oe (https://app.uniswap.org/static/js/3464.269a4681.chunk.js:85:4371) at Sa (https://app.uniswap.org/static/js/8143.2ae1e5d1.js:2:1773158) at ks (https://app.uniswap.org/static/js/8143.2ae1e5d1.js:2:1784779) at Su (https://app.uniswap.org/static/js/8143.2ae1e5d1.js:2:1830858) at wf (https://app.uniswap.org/static/js/8143.2ae1e5d1.js:2:1819143) at bf (https://app.uniswap.org/static/js/8143.2ae1e5d1.js:2:1819071) at vf (https://app.uniswap.org/static/js/8143.2ae1e5d1.js:2:1818934) at sf (https://app.uniswap.org/static/js/8143.2ae1e5d1.js:2:1815741) at lf (https://app.uniswap.org/static/js/8143.2ae1e5d1.js:2:1816130) at qi (https://app.uniswap.org/static/js/8143.2ae1e5d1.js:2:1757003) at https://app.uniswap.org/static/js/8143.2ae1e5d1.js:2:1813682 at f.invokeTask (https://app.uniswap.org/static/js/8143.2ae1e5d1.js:2:2455695) at s.runTask (https://app.uniswap.org/static/js/8143.2ae1e5d1.js:2:2451070) at b (https://app.uniswap.org/static/js/8143.2ae1e5d1.js:2:2457732)

Device data

{
  "browser": {
    "name": "Brave",
    "version": "1.64.122",
  },
}

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 https://app.uniswap.org/nfts and reproduce the crash in the NFT router's bag menu by changing Pay With from ETH to USDC or USDT. Trace the corresponding frontend entry point from the reported TypeError, then verify that selecting another token no longer shows the error page and allows an NFT purchase.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
blockchain, frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.