Skip to content

Commit abefc41

Browse files
authored
1.21.0-0.0.1: [fix] - isMobile Parameter (#522)
* Update isMobile parameter in interfaces * Increment version
1 parent d2cd090 commit abefc41

File tree

4 files changed

+12
-7
lines changed

4 files changed

+12
-7
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.21.0",
3+
"version": "1.21.0-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/interfaces.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,6 @@ export interface CommonWalletOptions {
171171
label?: string
172172
iconSrc?: string
173173
svg?: string
174-
isMobile: boolean
175174
}
176175

177176
export interface SdkWalletOptions extends CommonWalletOptions {
@@ -366,7 +365,7 @@ export type AllWalletInitOptions = CommonWalletOptions &
366365
AuthereumOptions &
367366
LedgerOptions &
368367
WalletLinkOptions &
369-
InjectedWithBalanceOptions & { networkId: number }
368+
InjectedWithBalanceOptions & { networkId: number } & { isMobile: boolean }
370369

371370
export interface WalletCheckCustomOptions {
372371
heading?: string

src/modules/select/index.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
import { WalletModule, WalletInitOptions } from '../../interfaces'
1+
import {
2+
WalletModule,
3+
WalletInitOptions,
4+
AllWalletInitOptions
5+
} from '../../interfaces'
26
import { isWalletInit } from '../../validation'
37

48
// wallets that qualify for default wallets need to have no
@@ -65,7 +69,7 @@ function select(
6569
function getModule(
6670
name: string
6771
): Promise<{
68-
default: (options: any) => WalletModule
72+
default: (options: AllWalletInitOptions) => WalletModule
6973
}> {
7074
switch (name) {
7175
// Deprecated wallets
@@ -131,7 +135,7 @@ function getModule(
131135
case 'frame':
132136
return import('./wallets/frame')
133137
case 'ownbit':
134-
return import('./wallets/ownbit')
138+
return import('./wallets/ownbit')
135139
default:
136140
throw new Error(`${name} is not a valid walletName.`)
137141
}

src/modules/select/wallets/metamask.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ import { WalletModule, Helpers, CommonWalletOptions } from '../../../interfaces'
44
import metamaskIcon from '../wallet-icons/icon-metamask.png'
55
import metamaskIcon2x from '../wallet-icons/icon-metamask@2x.png'
66

7-
function metamask(options: CommonWalletOptions): WalletModule {
7+
function metamask(
8+
options: CommonWalletOptions & { isMobile: boolean }
9+
): WalletModule {
810
const { preferred, label, iconSrc, svg, isMobile } = options
911

1012
return {

0 commit comments

Comments
 (0)