Skip to content

Commit 64cdd93

Browse files
authored
Merge pull request #374 from blocknative/fix/wallet-validation
Fix: Wallet Validation Closes #373
2 parents a1f76dc + f48a9fb commit 64cdd93

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

src/validation.ts

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,8 @@ export function validateWallet(
250250
preferred,
251251
desktop,
252252
mobile,
253+
type,
254+
osExclusions,
253255
...otherParams
254256
} = obj
255257

@@ -261,11 +263,13 @@ export function validateWallet(
261263
'iconSrcSet',
262264
'svg',
263265
'wallet',
266+
'type',
264267
'link',
265268
'installMessage',
266269
'preferred',
267270
'desktop',
268-
'mobile'
271+
'mobile',
272+
'osExclusions'
269273
],
270274
'selectWallets.wallets item'
271275
)
@@ -318,6 +322,20 @@ export function validateWallet(
318322
optional: true
319323
})
320324

325+
validateType({
326+
name: 'type',
327+
value: type,
328+
type: 'string',
329+
optional: true
330+
})
331+
332+
validateType({
333+
name: 'osExclusions',
334+
value: osExclusions,
335+
type: 'array',
336+
optional: true
337+
})
338+
321339
return
322340
}
323341

0 commit comments

Comments
 (0)