GoodDollar / GoodWeb3-Mono

mono repo with GoodDollar's web3 UI components and SDK
https://gooddollar-storybook.vercel.app
3 stars 3 forks source link

Bug: Delay in BC connection causes web3action to break flow #71

Closed L03TJ3 closed 1 year ago

L03TJ3 commented 1 year ago

Description

https://www.loom.com/share/ae25c682bdb8435ebdbc6bc8103a158f

The above vid shows the web3action button used. Because of the possible delay between connected and receiving bc-data it breaks the connect/switch/do-action flow as it doesn't yet have the data on which to base to do the action or not (throttle was put on to show this delay, top-right the couple seconds it takes for native-balance to be shown)

Additional context

This delay happens in other scenarios too, which can cause wonky behavior based on unreliable data the moment we need it Need a solution

sirpy commented 1 year ago

@L03TJ3 Once bc-data is received it is re-active, meaning useCalls will cause your component to re-render with the blockchain data. That means you should have an effect that reacts to these changes. "wonky" connections should not matter