wormhole-foundation / wormhole-connect

Wormhole Connect brings all the functionality and utility of Wormhole right into your application and removes all of the complexity.
https://connect-in-style.wormhole.com/
Other
81 stars 63 forks source link

[QA] An "Unexpected error" occurs when the user enters an amount that is too large #1967

Closed tsadovska closed 3 weeks ago

tsadovska commented 6 months ago

Describe the current behavior in detail

Checked on https://preview.portalbridge.com/ed4e22522f/ [Mainnet] (Portal Bridge: 0.2.13, Wormhole Connect: 0.3.4-beta.5-development) with macOS Sonoma 14.4.1 and Google Chrome Version 124.0.6367.62 (Official Build) (arm64).

Steps:

  1. Prepare to send W from Ethereum (MetaMask) to Base (MetaMask)
  2. Enter large amount in Amount field

Actual result: An unexpected error has occurred.

Error: invalid decimal value (argument="value", value="1.1111111111111111e+21", code=INVALID_ARGUMENT, version=bignumber/5.7.0)
    at Logger.makeError (pb-index-uz2Jxxzd.js:342:46729)
    at Logger.throwError (pb-index-uz2Jxxzd.js:342:46862)
    at Logger.throwArgumentError (pb-index-uz2Jxxzd.js:342:46923)
    at parseFixed (pb-index-uz2Jxxzd.js:342:62028)
    at Object.parseUnits (pb-index-uz2Jxxzd.js:345:83069)
    at pb-index-uz2Jxxzd.js:725:113150
    at Object.Ci [as useMemo] (pb-index-uz2Jxxzd.js:44:26608)
    at react_production_min.useMemo (pb-index-uz2Jxxzd.js:15:7241)
    at NttInboundCapacityWarning (pb-index-uz2Jxxzd.js:725:112954)
    at Xh (pb-index-uz2Jxxzd.js:44:21745) {componentStack: '\n    at NttInboundCapacityWarning (https://preview…dge.com/ed4e22522f/pb-index-uz2Jxxzd.js:61:12427)'}

image

https://github.com/wormhole-foundation/wormhole-connect/assets/10746654/a02442dc-be9d-4a64-9aab-8535dc55005c

What is the expected/desired behavior

Error does not occur.

agodlevska commented 5 months ago

Reproduced on https://portalbridge.com/ Prepare to send W from Arbitrum (Metamask) to Ethereum (Metamask) Attachment:

Screenshot 2024-05-28 at 13 12 05
tsadovska commented 5 months ago

Reproducible on https://portalbridge.com/ [Mainnet] when sending W from Solana (Phantom) to Arbitrum (MetaMask).

https://github.com/wormhole-foundation/wormhole-connect/assets/10746654/a2f3af31-fa85-4f31-8762-9789a3fa57c9

agodlevska commented 2 months ago

Reproducible on https://portalbridge.com/ [Mainnet] when sending W from Optimism (MetaMask) to Base (MetaMask). Also, still reproducible with all scenarios mentioned above.

Attachment:

https://github.com/user-attachments/assets/54476ca1-10a6-4244-8ae9-42f3982655d3

tsadovska commented 3 weeks ago

Issue is no longer reproducible on https://portalbridge.com/, "Unexpected error" does not occur. Warning "Amount exceeds available balance is shown" to the user.

https://github.com/user-attachments/assets/ec15f25f-8a60-4b4e-9832-03cb634f910c

Closing the ticket.