getwax / wax

Wallet Account eXperiments Monorepo
MIT License
26 stars 13 forks source link

Inpage: Detect externally initiated changes in user balance and other network-derived information #37

Open voltrevo opened 1 year ago

voltrevo commented 1 year ago

Probably the solution here is polling. I'd like to do smart polling where we poll faster than normal but only when the user is active on the page. Otherwise we have to poll pretty slowly to be nice to the nodes since it's hassling them in the background, and the user gets a slower experience than necessary when they're actively using the dApp.

JohnGuilding commented 1 year ago

Wonder if we could use eth_subscribe and eth_unsubscribe? https://geth.ethereum.org/docs/interacting-with-geth/rpc/pubsub