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
78 stars 59 forks source link

[QA] Cannot resume transaction - USDC, Manual route #2679

Open tsadovska opened 1 day ago

tsadovska commented 1 day ago

Describe the current behavior in detail

Checked on https://portalbridge.com/:

Steps:

  1. Send 0.00008 USDC from BSC (MetaMask) to Ethereum (MetaMask) with Manual route
  2. Resume the transfer

Actual result: Transfer is not found. Loading does not complete. Expected result: Transaction is successfully resumed.

Notes/ Attachments

Link to Wormholescan.

Uncaught (in promise) Error: when deserializing item 'mintRecipient': chunk is shorter than expected: 1048 < 1060
    at updateOffset (pb-index-Bk8S0RNv.js:276:9987)
    at deserializeLayoutItem (pb-index-Bk8S0RNv.js:276:11825)
    at internalDeserializeLayout (pb-index-Bk8S0RNv.js:276:10219)
    at deserializeLayout (pb-index-Bk8S0RNv.js:276:9683)
    at pb-index-Bk8S0RNv.js:276:145798
    at deserializePayload (pb-index-Bk8S0RNv.js:276:146041)
    at deserialize$1 (pb-index-Bk8S0RNv.js:276:145436)
    at getVaa (pb-index-Bk8S0RNv.js:281:20216)

image

kev1n-peters commented 22 hours ago

Issue is in the SDK. This is the actual error I'm getting:

Error: scaleAmount({"amount":"80","decimals":8}, 6) would result in altered amount. Use truncateAmount first if you intended to truncate it.
    at Object.scale (http://localhost:5173/node_modules/.vite/deps/@wormhole-foundation_sdk-base.js?v=8ef798bb:3338:9)
    at TokenTransfer.fromIdentifier (http://localhost:5173/@fs/Users/kevin/repos/wormhole-sdk-ts/connect/dist/esm/protocols/tokenBridge/tokenTransfer.js?t=1726857176087:76:37)
    at async TokenTransfer.fromTransaction (http://localhost:5173/@fs/Users/kevin/repos/wormhole-sdk-ts/connect/dist/esm/protocols/tokenBridge/tokenTransfer.js?t=1726857176087:100:20)
    at async TokenTransfer.from (http://localhost:5173/@fs/Users/kevin/repos/wormhole-sdk-ts/connect/dist/esm/protocols/tokenBridge/tokenTransfer.js?t=1726857176087:50:18)
    at async TokenBridgeRoute.resume (http://localhost:5173/@fs/Users/kevin/repos/wormhole-sdk-ts/connect/dist/esm/routes/tokenBridge/manual.js?t=1726857176087:85:22)
kev1n-peters commented 20 hours ago

This fixes the scaleAmount issue mentioned above: https://github.com/wormhole-foundation/wormhole-sdk-ts/pull/700