shapeshift/metamask-snaps

sandbox: improve connect button handler logic

pastaghost opened this issue · 0 comments

Issue: the connect button will sometimes incorrectly show the application to have successfully connected to the snap. This occurs if there is an error during snap installation and may occur in other cases.

Fix: improve logic by explicitly checking for errors in return object, and verify that snap was successfully installed by calling wallet_getSnaps() and parsing list of installed snaps.