XLabs / portal-bridge-ui

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

[bug] Cannot Claim token if destination address was entered manually - Cosmos Gateway Manual route #980

Closed tsadovska closed 1 month ago

tsadovska commented 2 months ago

Is there an existing issue for this?

Current Behavior

Cannot Claim token on Aptos if destination address was entered manually.

TypeError: u.signAndSendTransaction is not a function
    at signAndSendTransaction (aptos-FL7F0RS8-Bxv3BExQ.js:34:301903)
    at signAndSendTransaction (pb-index-D87dar2w.js:516:72842)
    at async BridgeRoute.redeem (pb-index-D87dar2w.js:516:92030)
    at async Operator.redeem (pb-index-D87dar2w.js:519:94472)
    at async Object.Nr [as onClick] (pb-index-D87dar2w.js:746:1327)

image

Expected Behavior

Cosmos manual route should not be allowed.

Steps To Reproduce

  1. Open https://preview.portalbridge.com/859350d189/
  2. Select Osmosis as source chain and Aptos as destination chain
  3. Connect Leap wallet in From section
  4. Connect Spika wallet in To section (enter address manually)
  5. Click on "Approve and proceed with transaction" button
  6. Click on "Claim" button

Environment

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

Anything else?

No response

tsadovska commented 2 months ago

The issue also reproduces when manually entering the Solana wallet account.

TypeError: Cannot read properties of undefined (reading 'publicKey')
    at postVaa (pb-index-D87dar2w.js:516:73387)
    at BridgeRoute.redeem (pb-index-D87dar2w.js:516:91865)
    at CosmosGatewayRoute.redeem (pb-index-D87dar2w.js:519:75702)
    at Operator.redeem (pb-index-D87dar2w.js:519:94496)
    at Object.Nr [as onClick] (pb-index-D87dar2w.js:746:1347)
    at gr (pb-index-D87dar2w.js:743:25243)
    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)

image

sebastianscatularo commented 2 months ago

manual address enter should only be available for routes and chains that supports relays, this escenario should not exist by definition, good catch

sebastianscatularo commented 2 months ago

PR to address this issue https://github.com/wormhole-foundation/wormhole-connect/pull/2322

tsadovska commented 2 months ago

Re-checked on https://preview.portalbridge.com/859350d189/. Scenario "0.0001 USDT transfer from Osmosis (Leap) to Aptos (Wallet address entered manually)" can be reproducible. Please use this link to view the recording. I cleared the cache and did a hard reload before starting the transfer.

image

tsadovska commented 2 months ago

Re-checked on https://preview.portalbridge.com/859350d189/. 'Cosmos Gateway Manual Route' route is now displayed as disabled when sending USDT from Osmosis (Leap) to Aptos (Manually entered wallet address). However, transfer can still be started. Please use this link to view the recording.

Scenario will be re-checked after https://github.com/XLabs/portal-bridge-ui/issues/999 is resolved.

tsadovska commented 1 month ago

Re-checked on https://portalbridge.com/.

  1. "Cosmos Gateway Manual route" is disabled when destination address is entered manually.
  2. "Approve and proceed with transaction" button is not displayed after user clicks on route option when destination address is entered manually. Ticket is closed.