shapeshift / web

ShapeShift Web
https://app.shapeshift.com
MIT License
157 stars 180 forks source link

Bail off gas estimation when user has insufficient funds for action #6792

Open gomesalexandre opened 2 weeks ago

gomesalexandre commented 2 weeks ago

Overview

Spotted on THORChain LP as part of final THOR consolidation testing:

image

When a user has insufficient balance for gas, we still fetch estimate regardless, and even worse, we poll for it, meaning the LP deposit will be in a red error loading state for many, many seconds before being actionable... and reverting back to red error loading state.

Though this may be happening in other places as well.

When a user has insufficient funds for gas (which means the gas estimation is guaranteed to fail), we should bail off gas estimations, and other requests we can potentially avoid.

References and additional details

N/A

Acceptance Criteria

Need By Date

No response

Screenshots/Mockups

No response

Estimated effort

No response