Skip to content

Commit d8f4045

Browse files
authored
Merge pull request #159 from blocknative/develop
Release 1.1.10
2 parents 81f52fb + 821d337 commit d8f4045

File tree

6 files changed

+10
-11
lines changed

6 files changed

+10
-11
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.1.9",
3+
"version": "1.1.10",
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/interfaces.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ export interface WalletModule {
7676
}>
7777
link?: string
7878
installMessage?: (wallets: {
79-
currentWallet: string
79+
currentWallet: string | undefined
8080
selectedWallet: string
8181
}) => string
8282
preferred?: boolean
@@ -96,7 +96,7 @@ export interface Helpers {
9696
}
9797

9898
export interface WalletInterface {
99-
name: string
99+
name: string | undefined
100100
connect?: () => Promise<{ message: string } | undefined>
101101
disconnect?: () => void
102102
loading?: Promise<undefined>

src/modules/select/content.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
export const extensionInstallMessage = (helpers: {
2-
currentWallet: string
2+
currentWallet: string | undefined
33
selectedWallet: string
44
}) => {
55
const { currentWallet, selectedWallet } = helpers
@@ -29,8 +29,7 @@ export const extensionInstallMessage = (helpers: {
2929
} else {
3030
return `
3131
<p style="font-size: 0.889rem; font-family: Helvetica Neue; margin: 0.889rem 0;">
32-
You'll need to install <b>${selectedWallet}</b> to continue. Install
33-
the extension and then
32+
You'll need to install <b>${selectedWallet}</b> to continue. Once you have it installed, go ahead and
3433
<span
3534
class="bn-clickable"
3635
style="color: #4a90e2; font-size: 0.889rem; font-family: Helvetica Neue;"

src/stores.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,8 +204,8 @@ function createBalanceStore(initialState: string | null): BalanceStore {
204204

205205
emitterAddress = $address
206206
}
207-
} else {
208-
// no address, so set balance back to null
207+
} else if (emitterAddress && !$address) {
208+
// no address, so set balance to undefined
209209
set && set(undefined)
210210
}
211211
}

src/utilities.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ export function createModernProviderInterface(provider: any): WalletInterface {
102102
)
103103
}
104104
),
105-
name: getProviderName(provider) || 'unknown'
105+
name: getProviderName(provider)
106106
}
107107
}
108108

@@ -117,7 +117,7 @@ export function createLegacyProviderInterface(provider: any): WalletInterface {
117117
balance: {
118118
get: () => getBalance(provider)
119119
},
120-
name: getProviderName(provider) || 'unknown'
120+
name: getProviderName(provider)
121121
}
122122
}
123123

src/views/WalletSelect.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@
130130
installMessage =
131131
module.installMessage &&
132132
module.installMessage({
133-
currentWallet: walletAlreadyInstalled || 'unknown',
133+
currentWallet: walletAlreadyInstalled,
134134
selectedWallet: selectedWalletModule.name
135135
})
136136

0 commit comments

Comments
 (0)