Skip to content

Commit

Permalink
add isUnlocked check
Browse files Browse the repository at this point in the history
  • Loading branch information
svenvoskamp committed Jan 3, 2024
1 parent 24919fc commit e038dd9
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion packages/wagmi/src/connectors/EIP6963Connector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,18 @@ export class EIP6963Connector extends InjectedConnector {
if (!eip6963Wallet || connectedEIP6963Rdns !== eip6963Wallet.info.rdns) {
return true
}
}

if (
(eip6963Wallet && eip6963Wallet.provider._state?.isUnlocked === undefined) ||
(eip6963Wallet && eip6963Wallet.provider._state?.isUnlocked)
) {
this.#eip6963Wallet = eip6963Wallet

return super.isAuthorized()
}

return super.isAuthorized()
return false
}

public override async getProvider() {
Expand Down

0 comments on commit e038dd9

Please sign in to comment.