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 64 forks source link

[QA] Transaction details disappear in the route option after changing the slider position #2826

Open tsadovska opened 1 month ago

tsadovska commented 1 month ago

Describe the current behavior in detail

Checked on https://wormhole-connect-mainnet.netlify.app/.

Steps:

  1. Prepare to send 3 POL from Polygon (MetaMask) to Solana (Phantom)
  2. Select Automatic route
  3. Change the slider position to 50%
  4. Check if transaction details are displayed

Actual result: Transaction details are not displayed. Expected result: Transaction details are displayed, including Network cost, Time to Solana, Additional Gas. If selected route becomes unavailable, warning should be displayed.

Notes/ Attachments

Screenshot 2024-10-10 at 10 36 56

https://github.com/user-attachments/assets/2762b26f-95cb-4eb9-9535-d1399458f9ef

emreboga commented 4 weeks ago

This happens when it fails to get quote from the SDK with the gas. I wasn't able to reproduce this consistently, but seen it once. @Wesleyleung If we don't have the quote, meaning we don't have the fees and the amount that will be received; we don't render those sections at all. Do you think we should still render the titles, but show an error about quote not being received?

Wesleyleung commented 4 weeks ago

@emreboga I think we should have graceful handling of this situation where if the quote including gas fails, it shouldn't clear out the entire transaction details that were previously valid. We should preserve the previous quote prior to the gas, and only replace ir with the response if the new quote response is valid. If it returns invalid, then do a few things:

1) switch the gas dropoff toggle to disabled. Failure of the the gas quote implies an error in this area and we don't want to prevent the entire txn from happening. 2) show an error message (reuse the "route not found error" message style) under the Confirm Transaction button. The copy should say "Unable to retrieve gas quote. Gas dropoff toggle is disabled" 3) Refresh the regular quote without the additional gas request 4) If the user manually toggles the gas back on again, then they can try again and either get the same error state again or the response will return valid for them on the next try.

This will allow the user to proceed normally without gas dropoff.

Wesleyleung commented 4 weeks ago

This seems like a more involved change we can prioritize later. I'm removing the p1 tag unless we get more incident reports like this.

Wesleyleung commented 4 weeks ago

Separately, we should investigate the root cause at the SDK level on why the quote with gas failed in the first place.