XLabs / portal-bridge-ui

Portal Bridge UI
https://www.portalbridge.com/
25 stars 38 forks source link

[bug] An error appears when adding token to the wallet if destination address was entered manually #979

Closed tsadovska closed 3 months ago

tsadovska commented 3 months ago

Is there an existing issue for this?

Current Behavior

An error appears when adding token to the wallet if destination address was entered manually.

Uncaught (in promise) TypeError: gr.getNetworkInfo is not a function
    at switchChain (pb-index-D87dar2w.js:516:71412)
    at vr (pb-index-D87dar2w.js:746:4516)
    at Object.Nb (pb-index-D87dar2w.js:43:10486)
    at Tb (pb-index-D87dar2w.js:43:10655)
    at Ub (pb-index-D87dar2w.js:43:10721)
    at nf (pb-index-D87dar2w.js:43:33594)
    at se$1 (pb-index-D87dar2w.js:43:34071)
    at pb-index-D87dar2w.js:43:39519
    at Rk (pb-index-D87dar2w.js:46:40779)
    at Jb (pb-index-D87dar2w.js:43:9576)

image

Expected Behavior

Link is not shown or user can add token to the wallet.

Steps To Reproduce

  1. Open https://preview.portalbridge.com/859350d189/
  2. Prepare to send Avalanche as source chain and Fantom as destination chain
  3. Click on "Connect wallet" button in From section and select MetaMask wallet
  4. Click on "Connect wallet" button in To section and Switch to Manual Input
  5. Paste Wallet address
  6. Select Asset and enter Amount, 0.01 AVAX
  7. Convert some Native gas
  8. Click on "Approve and proceed with transaction" button
  9. Click on link to add token to the wallet

Environment

- OS: macOS Sonoma 14.5
- Wallet: MetaMask
- Browser: Google Chrome Version 127.0.6533.89 (Official Build) (arm64)

Anything else?

No response

sebastianscatularo commented 3 months ago

if target address was entered manually does not make sense to offer the option to add the asset to a wallet, we should hide it

sebastianscatularo commented 3 months ago

PR to disable it https://github.com/wormhole-foundation/wormhole-connect/pull/2321

tsadovska commented 3 months ago

Thank you! Re-checked on https://preview.portalbridge.com/859350d189/ [Mainnet]. Option "Add token to the wallet" is no longer displayed.

image

Ticket is closed.