Open tsadovska opened 1 month 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?
@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.
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.
Separately, we should investigate the root cause at the SDK level on why the quote with gas failed in the first place.
Describe the current behavior in detail
Checked on https://wormhole-connect-mainnet.netlify.app/.
Steps:
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
https://github.com/user-attachments/assets/2762b26f-95cb-4eb9-9535-d1399458f9ef