Move the on event listener in StandardWalletAdapter to the constructor. This is needed to listen for feature changes related to the solana:signIn feature.
Add a destroy destructor function to call the off function. This is needed to avoid a memory leak from moving the on call to the constructor.
Refactor StandardWalletAdapter related to the above changes.
Refactor the useStandardWalletAdapters hook to call the destroy function appropriately.
This PR targets the alpha branch.
on
event listener inStandardWalletAdapter
to the constructor. This is needed to listen for feature changes related to thesolana:signIn
feature.destroy
destructor function to call theoff
function. This is needed to avoid a memory leak from moving theon
call to the constructor.StandardWalletAdapter
related to the above changes.useStandardWalletAdapters
hook to call thedestroy
function appropriately.