bancorprotocol / carbon-app

https://app.carbondefi.xyz
MIT License
26 stars 20 forks source link

CTA in loading state based on approval pending and required #1342

Closed zavelevsky closed 3 months ago

cloudflare-workers-and-pages[bot] commented 3 months ago

Deploying carbon-app-sei with  Cloudflare Pages  Cloudflare Pages

Latest commit: 62f8664
Status: ✅  Deploy successful!
Preview URL: https://22c5cd45.carbon-app-sei.pages.dev
Branch Preview URL: https://fix-loading-cta.carbon-app-sei.pages.dev

View logs

cloudflare-workers-and-pages[bot] commented 3 months ago

Deploying carbon-app with  Cloudflare Pages  Cloudflare Pages

Latest commit: 62f8664
Status: ✅  Deploy successful!
Preview URL: https://21155866.carbon-app-csq.pages.dev
Branch Preview URL: https://fix-loading-cta.carbon-app-csq.pages.dev

View logs

tiagofilipenunes commented 3 months ago

LGTM.

Note: useApproval is also used by useTradeAction, but whenever approval.isPending is used with the latter, there's a check for user != undefined, which solves the problem with the first fetch where approval.status = 'idle' because the query is disabled when user is undefined.