BuidlGuidl / burnerwallet

https://burner.buidlguidl.com
MIT License
0 stars 1 forks source link

fix: Only calculate send balance when idle #40

Closed ChangoMan closed 2 months ago

ChangoMan commented 2 months ago

Description

The main issue with the Send Drawer was that the isInsufficientFunds calculation was happening before the useWaitForTransaction was confirmed. Since our balance changes, this is technically correct but is confusing because it makes it seem like our transaction has completed, even though it has not confirmed.

Adding in a check for isIdle to the isInsufficientFunds calculation fixes this, so now we won't see insufficient balance until after we get a confirmation and the useWaitForTransaction has been reset.

I've also added in closing the drawer after a send transaction is complete. I think it's pretty good, but let me know how you feel. It is easily added or removed!

vercel[bot] commented 2 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
burnerwallet-nextjs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 23, 2024 3:01pm