Skip to content

Commit c08c07c

Browse files
authored
Merge pull request #119 from blocknative/develop
Release 1.1.1
2 parents 6607ab6 + d88c753 commit c08c07c

File tree

3 files changed

+12
-4
lines changed

3 files changed

+12
-4
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.0",
3+
"version": "1.1.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: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,8 @@ interface GetState {
158158
}
159159

160160
export interface ConfigOptions {
161-
darkMode: boolean
161+
darkMode?: boolean
162+
networkId?: number
162163
}
163164

164165
export interface API {

src/validation.ts

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -326,16 +326,23 @@ export function validateWalletCheckModule(module: WalletCheckModule) {
326326
export function validateConfig(configuration: ConfigOptions): never | void {
327327
validateType({ name: 'configuration', value: configuration, type: 'object' })
328328

329-
const { darkMode, ...otherParams } = configuration
329+
const { darkMode, networkId, ...otherParams } = configuration
330330

331-
invalidParams(otherParams, ['darkMode'], 'configuration')
331+
invalidParams(otherParams, ['darkMode', 'networkId'], 'configuration')
332332

333333
validateType({
334334
name: 'darkMode',
335335
value: darkMode,
336336
type: 'boolean',
337337
optional: true
338338
})
339+
340+
validateType({
341+
name: 'networkId',
342+
value: networkId,
343+
type: 'number',
344+
optional: true
345+
})
339346
}
340347

341348
export function validateModal(modal: WalletCheckModal): never | void {

0 commit comments

Comments
 (0)