Skip to content

Commit ddca1cf

Browse files
1.31.0-0.0.2: Fix Ts error (#634)
1 parent 435569c commit ddca1cf

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
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.31.0-0.0.1",
3+
"version": "1.31.0-0.0.2",
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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export interface WalletSelectModuleOptions {
3030
export interface WalletSelectModule {
3131
heading: string
3232
description: string
33-
wallets: Array<WalletModule | WalletInitOptions>
33+
wallets: Promise<Array<WalletModule | WalletInitOptions>>
3434
explanation?: string
3535
agreement?: TermsOfServiceAgreementOptions
3636
}

src/modules/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export default function initializeModules(
2626
heading = defaultHeading,
2727
description = defaultDescription,
2828
explanation = defaultWalletExplanation,
29-
agreement = {}
29+
agreement
3030
} = walletSelectOptions || {}
3131

3232
return {

src/views/WalletSelect.svelte

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
export let module: WalletSelectModule = {
3535
heading: '',
3636
description: '',
37-
wallets: [],
37+
wallets: Promise.resolve([]),
3838
agreement: undefined
3939
}
4040
@@ -46,7 +46,7 @@
4646
let selectedWalletModule: WalletModule | null
4747
4848
const { mobileDevice, os } = get(app)
49-
let { heading, description, explanation, wallets, agreement } = module
49+
let { heading, description, explanation, agreement } = module
5050
5151
const { termsUrl, privacyUrl, version } = agreement || {}
5252
const {
@@ -109,7 +109,7 @@
109109
110110
async function renderWalletSelect() {
111111
const appState = get(app)
112-
wallets = await wallets
112+
const wallets = await module.wallets
113113
114114
const deviceWallets = (wallets as WalletModule[])
115115
.filter(wallet => wallet[mobileDevice ? 'mobile' : 'desktop'])

0 commit comments

Comments
 (0)