Is it necessary to call `shareWalletInfo` all the time?
Right now, the example wallet sends to aepp walletInfo messages 5 times with an interval of 5 seconds. Are these messages necessary for aepp to work? If yes then in general case, it seems not enough because we can't track navigations in an iframe, so the user might switch between aepps at any time, which makes the wallet to poll iframe with walletInfo messages all the time. Can aepp initialize the connection to the wallet by itself as it was before?
Also, can this polling part be moved to the sdk side?
Should interval be decreased to something like 1 second to speedup wallet detection?
Should interval be decreased to something like 1 second to speedup wallet detection?
you have full control over this
Are these messages necessary for aepp to work? If yes then in general case, it seems not enough because we can't track navigations in an iframe, so the user might switch between aepps at any time, which makes the wallet to poll iframe with walletInfo messages all the time
We can track the navigation in Aepp stamp and then trigger the onDisconnect message to wallet where you can start control polling.
The things is that one approach should work the same for all of the cases(extension, iframe/reverse iframe), and for extension wallet it's not possible to AEPP connection initialization because the runtime.id is required for that
you have full control over this
Have you tried to find the best decision? It looks like a controversial issue caused by a wrong architectural decision on the sdk side.
We can track the navigation in Aepp stamp and then trigger the onDisconnect message to wallet where you can start control polling.
What if user switcher from a usual web site to aepp? This can happen at an arbitrary moment, can we track it somehow without polling?
The things is that one approach should work the same for all of the cases
why we can't use a bit different (and much more efficient) protocol in the iframe case? Anyway, aepp sees the difference between sending messages to a parent frame or to an extension.
I want to notice that the wallet team considered default behavior as a bug and has switched to infinite pooling. I'm proposing to update the sdk examples accordingly.
@davidyuk Is there a chance to make any progress on this issue in the near future? There are a lot of aepps where it's clear that something is wrong:
- Logging to jelly swap takes long using SH
- People complain on the forum: https://forum.aeternity.com/t/most-dapps-running-on-aeternity-can-t-log-in-smoothly/8130/5
- etc...
@davidyuk Any progress on this?
No, I don't have.