BuidlGuidl / burnerwallet

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

fix: Ensure useSendTransaction is using the proper chain id #37

Closed ChangoMan closed 2 months ago

ChangoMan commented 2 months ago

Description

There seems to be a bug related to the getting/setting of the selected network in local storage. If you change the network from mainnet, to sepolia for example, it will store that chain id in local storage.

However, when you reload the app and it reads the chain id from local storage, the useSendTransaction hook isn't getting the correct chain id. This might be related to the SSR nature of Next.js and the initial config that gets loaded.

This PR will add some error handling, so we don't see a Sending... if there is an error. It also pulls the current network and adds it into the useSendTransaction hook.

vercel[bot] commented 2 months ago

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

Name Status Preview Updated (UTC)
burnerwallet-nextjs ✅ Ready (Inspect) Visit Preview Apr 22, 2024 10:06am
carletex commented 2 months ago

This fixes #36

I see some other things, but will create an issue for it!

Thanks!