Skip to content
Snippets Groups Projects
Commit b89671e6 authored by Niklas P's avatar Niklas P
Browse files

a

parent f0fdb354
No related branches found
No related tags found
No related merge requests found
......@@ -33,13 +33,13 @@ export const PolkadotExtensionProvider = ( { children } : { children : ReactNode
// enable the wallet
try {
await firstWallet?.enable( "Polkadot Tokengated Demo" )
if ( accounts === undefined || accounts.length === 0 ) {
await firstWallet.subscribeAccounts((allAccounts: WalletAccount[] | undefined) => {
console.log("got accounts via talisman connect", allAccounts)
await firstWallet.subscribeAccounts((allAccounts: WalletAccount[] | undefined) => {
console.log("got accounts via talisman connect", allAccounts)
if ( accounts === undefined || accounts.length === 0 ) {
setAccounts( allAccounts )
setActingAccountIdx( 0 )
});
}
}
});
} catch (error) {
console.log( error )
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment