Skip to content

Commit

Permalink
fix: injected MetaMask flag overwrite (#123)
Browse files Browse the repository at this point in the history
* feat: add new injected wallets

* chore: update rollup version

* add Phantom

* fix: injected MetaMask flag overwrite
  • Loading branch information
bonustrack authored Dec 1, 2024
1 parent 74bd389 commit 07f1cc9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
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.9",
"version": "0.2.10",
"repository": "snapshot-labs/lock",
"license": "MIT",
"main": "dist/lock.cjs.js",
Expand Down
14 changes: 8 additions & 6 deletions src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,21 @@ export function getInjected() {

if (!web3) return;

let injected = {
name: 'Injected',
id: 'web3',
icon: 'ipfs://QmXUov1JMszHkizCf3HvmcKWKm9PrG2KHpd5bDnE5YbZN8'
};

for (const wallet of wallets) {
if (web3[wallet.flag]) {
return {
injected = {
name: wallet.name,
id: wallet.id,
icon: wallet.icon
};
}
}

return {
name: 'Injected',
id: 'web3',
icon: 'ipfs://QmXUov1JMszHkizCf3HvmcKWKm9PrG2KHpd5bDnE5YbZN8'
};
return injected;
}

0 comments on commit 07f1cc9

Please sign in to comment.