Skip to content

Commit 3e038c9

Browse files
1.35.2-0.0.1: [fix] injected wallet options (#727)
* 1.35.2-0.1.0: [fix] Injected wallet options not honoured * Make more readable * Adjust version
1 parent b1c305f commit 3e038c9

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "bnc-onboard",
3-
"version": "1.35.2",
3+
"version": "1.35.2-0.0.1",
44
"description": "Onboard users to web3 by allowing them to select a wallet, get that wallet ready to transact and have access to synced wallet state.",
55
"keywords": [
66
"ethereum",

src/modules/select/index.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,12 @@ function select(
6666
wallet?.display &&
6767
wallet?.display[isMobile ? 'mobile' : 'desktop'] === false
6868

69-
if (detectedWalletName) {
69+
// If the detected wallet is already listed as a wallet option then don't inject it
70+
const walletNotIncluded = wallets.every(
71+
wallet => isWalletInit(wallet) && wallet.walletName !== detectedWalletName
72+
)
73+
74+
if (detectedWalletName && walletNotIncluded) {
7075
// This wallet is built into onboard so add the walletName and
7176
// the code below will load it as a wallet module
7277
wallets.unshift({ walletName: detectedWalletName })

0 commit comments

Comments
 (0)