Skip to content

Commit e2e00a5

Browse files
authored
[core: 2.4.0-alpha.2] : [fix] - Autoselect Validation (#1121)
* Fix validation for autoSelect parameter * Increment version * Increment versions on react and vue packages * Fix versions for react and vue packages
1 parent 7b1e64e commit e2e00a5

File tree

4 files changed

+14
-12
lines changed

4 files changed

+14
-12
lines changed

packages/core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@web3-onboard/core",
3-
"version": "2.4.0-alpha.3",
3+
"version": "2.4.0-alpha.4",
44
"repository": "blocknative/web3-onboard",
55
"scripts": {
66
"build": "rollup -c",

packages/core/src/validation.ts

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -171,13 +171,15 @@ const initOptions = Joi.object({
171171
})
172172

173173
const connectOptions = Joi.object({
174-
autoSelect: [
175-
Joi.object({
176-
label: Joi.string().required(),
177-
disableModals: Joi.boolean()
178-
}),
179-
Joi.string()
180-
]
174+
autoSelect: Joi.alternatives()
175+
.try(
176+
Joi.object({
177+
label: Joi.string().required(),
178+
disableModals: Joi.boolean()
179+
}),
180+
Joi.string()
181+
)
182+
.required()
181183
})
182184

183185
const disconnectOptions = Joi.object({

packages/react/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@web3-onboard/react",
3-
"version": "2.2.3-alpha.1",
3+
"version": "2.2.3-alpha.2",
44
"description": "Collection of React Hooks for web3-onboard",
55
"repository": "blocknative/web3-onboard",
66
"module": "dist/index.js",
@@ -24,7 +24,7 @@
2424
"typescript": "^4.5.5"
2525
},
2626
"dependencies": {
27-
"@web3-onboard/core": "^2.4.0-alpha.3",
27+
"@web3-onboard/core": "^2.4.0-alpha.4",
2828
"@web3-onboard/common": "^2.1.4",
2929
"use-sync-external-store": "1.0.0"
3030
},

packages/vue/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@web3-onboard/vue",
3-
"version": "2.1.3-alpha.1",
3+
"version": "2.1.3-alpha.2",
44
"description": "Vue Composable for web3-onboard",
55
"repository": "blocknative/web3-onboard",
66
"module": "dist/index.js",
@@ -25,7 +25,7 @@
2525
"@vueuse/core": "^8.4.2",
2626
"@vueuse/rxjs": "^8.2.0",
2727
"@web3-onboard/common": "^2.1.4",
28-
"@web3-onboard/core": "^2.4.0-alpha.3",
28+
"@web3-onboard/core": "^2.4.0-alpha.4",
2929
"vue-demi": "^0.12.4"
3030
},
3131
"peerDependencies": {

0 commit comments

Comments
 (0)