Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"@web3-onboard/fortmatic": "^2.0.14",
"@web3-onboard/gas": "^2.1.3",
"@web3-onboard/gnosis": "^2.1.5",
"@web3-onboard/injected-wallets": "^2.6.0-alpha.3",
"@web3-onboard/injected-wallets": "^2.6.0-alpha.4",
"@web3-onboard/keepkey": "^2.3.2",
"@web3-onboard/keystone": "^2.3.2",
"@web3-onboard/ledger": "^2.4.1-alpha.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/injected/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@web3-onboard/injected-wallets",
"version": "2.6.0-alpha.3",
"version": "2.6.0-alpha.4",
"description": "Injected wallet module for connecting browser extension and mobile wallets to Web3-Onboard. Web3-Onboard makes it simple to connect Ethereum hardware and software wallets to your dapp. Features standardised spec compliant web3 providers for all supported wallets, framework agnostic modern javascript UI with code splitting, CSS customization, multi-chain and multi-account support, reactive wallet state subscriptions and real-time transaction state change notifications.",
"keywords": [
"Ethereum",
Expand Down
22 changes: 1 addition & 21 deletions packages/injected/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@ function injected(options?: InjectedWalletOptions): WalletInit {
({ label }) => label
)

let removeMetaMask = false

const wallets = allWallets.reduce((acc, wallet) => {
const { label, platforms, injectedNamespace, checkProviderIdentity } =
wallet
Expand Down Expand Up @@ -104,19 +102,6 @@ function injected(options?: InjectedWalletOptions): WalletInit {
)
}

// check to see if we need to remove MetaMask
// in the case that the provider gave us a false positive
// for MM wallet
if (
walletAvailable &&
provider.isMetaMask &&
!provider.overrideIsMetaMask &&
label !== ProviderLabel.MetaMask &&
label !== 'Detected Wallet'
) {
removeMetaMask = true
}

return acc
}, [] as InjectedWalletModule[])

Expand All @@ -127,12 +112,7 @@ function injected(options?: InjectedWalletOptions): WalletInit {
const formattedWallets = wallets
.filter(wallet => {
const { label } = wallet
return !(
(label === ProviderLabel.Detected && moreThanOneWallet) ||
(label === ProviderLabel.MetaMask &&
moreThanOneWallet &&
removeMetaMask)
)
return !(label === ProviderLabel.Detected && moreThanOneWallet)
})
// then map to the WalletModule interface
.map(({ label, getIcon, getInterface }: InjectedWalletModule) => ({
Expand Down