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
82 stars 63 forks source link

[QA] [Sui] “ERC20: transfer amount exceeds allowance" appears in Console #540

Closed tsadovska closed 1 year ago

tsadovska commented 1 year ago

Build:

https://sui-support--wormhole-connect.netlify.app/

Steps:

  1. Connect Metamask wallet via Wallet Connect in ‘From’ section
  2. Connect Sui wallet in ‘To’ section
  3. Prepare to send 0.01 WSOL from Fuji to Sui
  4. Click “Approve and proceed with transaction”

Actual results:

Error: call revert exception; VM Exception while processing transaction: reverted with reason string "ERC20: transfer amount exceeds allowance" [ See: https://links.ethers.org/v5-errors-CALL_EXCEPTION ] (method="transferTokens(address,uint256,uint16,bytes32,uint256,uint32)", data="0x08c379a00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000002845524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365000000000000000000000000000000000000000000000000", errorArgs=["ERC20: transfer amount exceeds allowance"], errorName="Error", errorSignature="Error(string)", reason="ERC20: transfer amount exceeds allowance", code=CALL_EXCEPTION, version=abi/5.7.0)
    at l.makeError (main.68a18b01.js:37:1410698)
    at l.throwError (main.68a18b01.js:37:1410818)
    at A.decodeFunctionResult (main.68a18b01.js:37:1316420)
    at Object.<anonymous> (main.68a18b01.js:37:1352530)
    at Generator.next (<anonymous>)
    at a (main.68a18b01.js:37:1348017)

Expected results:

Transaction proceeds without errors.

Device:

MacBook Pro, macOS Monterey 12.6.5, Chrome Version 112.0.5615.137 (Official Build) (x86_64)

Attachments:

Screenshot 2023-05-03 at 11 49 55

https://user-images.githubusercontent.com/10746654/235872538-9e94482a-2347-4edc-a935-aca1b6ffdcf8.mov

tonyjin commented 1 year ago

AVAX -> SUI w/o automatic relay

Don’t have allowances to spend the wrapped SOL?

6d6f756e74206578636565647320616c6c6f77616e6365000000000000000000000000000000000000000000000000", errorArgs=["ERC20: transfer amount exceeds allowance"], errorName="Error", errorSignature="Error(string)", reason="ERC20: transfer amount exceeds allowance", code=CALL_EXCEPTION, version=abi/5.7.0)
anondev2323 commented 1 year ago

Ok, so the error about the allowance comes from it trying to test run the transaction to get a gas estimation. If this happens, it falls back on a default value. I'm not sure why the transaction reverted though

tonyjin commented 1 year ago

@tsadovska we could not reproduce this after trying a few times. Do you mind retrying on mainnet with the new build and closing if you can't repro? Thanks!

tsadovska commented 1 year ago

Rechecked the issue with the similar scenario on https://wormhole-connect.netlify.app/ [Testnet] and https://mainnet--wormhole-connect.netlify.app/ [Mainnet].

tsadovska commented 1 year ago

Error "ERC20: transfer amount exceeds allowance" appears in Console when sending asset for the first time. Please view observations in ticket #798.

Ticket is closed.