Connecting Finnie
When Finnie wallet is initialized it will emit a custom browser event called
finnieWalletLoaded
.
You can listen for that event and set a flag in your app which would indicate that Finnie is ready to use. The example code could look like this:let isFinnieInjected = false;
window.addEventListener("finnieWalletLoaded", () => {
isFinnieInjected = true;
});
At this point, Finnie wallet will inject the
ethereum
provider object into the global window
object. You can verify this by running the code:if (typeof window.ethereum !== 'undefined' && window.ethereum.isFinnie) {
console.log('Finnie is installed');
}
Last modified 3mo ago