core icon indicating copy to clipboard operation
core copied to clipboard

Move ERC721 token URI parsing into try catch block

Open hashwarp opened this issue 3 years ago • 2 comments

PR Title

Move ERC721 token URI parsing into try catch block

Description

Move ERC721 token URI parsing into try catch block. I included a test but can omit if deemed bloat.

  • FIXED:

    • Not all contract token URIs are valid/can be fetched, and we should have backwards compatibility because they usually cannot be redeployed

Checklist

  • [x] Tests are included if applicable
  • [x] Any added code is fully documented

Issue

Resolves metamask-extension#14589

hashwarp avatar May 09 '22 01:05 hashwarp

Note: the code in the try/block was introduced on March 3rd and I think it was a simple oversight to not have wrapped the entirety of the new code (because none of these variables are required)

hashwarp avatar May 09 '22 01:05 hashwarp

@adonesky1 What do you think about this?

mcmire avatar May 09 '22 16:05 mcmire

Closing as this was rectified in #834

FrederikBolding avatar Sep 08 '22 12:09 FrederikBolding