diff --git a/package.json b/package.json index 32a3469..fed4f03 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/src/utils.ts b/src/utils.ts index 8f8c0f0..54bcdd1 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -5,9 +5,15 @@ 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 @@ -15,9 +21,5 @@ export function getInjected() { } } - return { - name: 'Injected', - id: 'web3', - icon: 'ipfs://QmXUov1JMszHkizCf3HvmcKWKm9PrG2KHpd5bDnE5YbZN8' - }; + return injected; }