wallet-adapter-plugin-template
wallet-adapter-plugin-template copied to clipboard
Race condition in wallet detection
If adapter is instantiated before the extension plugin is injected then the wallet is not detected correctly.
Calling adapter.connect() results in WalletType Address Info Error error to be thrown.
A solution to this is implement polling mechanism with sane timeout.
How to replicate: https://codesandbox.io/s/sharp-shaw-xvhll2?file=/index.html