Skip to content

Commit

Permalink
fix: fix deprecated usage of selectedAddress (#105)
Browse files Browse the repository at this point in the history
* fix: fix deprecated usage of `selectedAddress`

* chore: bump version
  • Loading branch information
wa0x6e authored Jan 31, 2024
1 parent 8b09d00 commit 055dfbf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions connectors/injected.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ export default class Connector extends LockConnector {

async isLoggedIn() {
if (!window['ethereum']) return false;
if (window['ethereum'].selectedAddress) return true;
if (window['ethereum'].request({method: 'eth_accounts'})) return true;
await new Promise((r) => setTimeout(r, 400));
return !!window['ethereum'].selectedAddress;
return !!window['ethereum'].request({method: 'eth_accounts'});
}
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@snapshot-labs/lock",
"version": "0.2.2",
"version": "0.2.3",
"repository": "snapshot-labs/lock",
"license": "MIT",
"main": "dist/lock.cjs.js",
Expand Down

0 comments on commit 055dfbf

Please sign in to comment.