Skip to content

Commit

Permalink
[core: 2.4.0-alpha.2] : [fix] - Autoselect Validation (#1121)
Browse files Browse the repository at this point in the history
* Fix validation for autoSelect parameter

* Increment version

* Increment versions on react and vue packages

* Fix versions for react and vue packages
  • Loading branch information
lnbc1QWFyb24 authored Jul 5, 2022
1 parent 7b1e64e commit e2e00a5
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 12 deletions.
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@web3-onboard/core",
"version": "2.4.0-alpha.3",
"version": "2.4.0-alpha.4",
"repository": "blocknative/web3-onboard",
"scripts": {
"build": "rollup -c",
Expand Down
16 changes: 9 additions & 7 deletions packages/core/src/validation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -171,13 +171,15 @@ const initOptions = Joi.object({
})

const connectOptions = Joi.object({
autoSelect: [
Joi.object({
label: Joi.string().required(),
disableModals: Joi.boolean()
}),
Joi.string()
]
autoSelect: Joi.alternatives()
.try(
Joi.object({
label: Joi.string().required(),
disableModals: Joi.boolean()
}),
Joi.string()
)
.required()
})

const disconnectOptions = Joi.object({
Expand Down
4 changes: 2 additions & 2 deletions packages/react/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@web3-onboard/react",
"version": "2.2.3-alpha.1",
"version": "2.2.3-alpha.2",
"description": "Collection of React Hooks for web3-onboard",
"repository": "blocknative/web3-onboard",
"module": "dist/index.js",
Expand All @@ -24,7 +24,7 @@
"typescript": "^4.5.5"
},
"dependencies": {
"@web3-onboard/core": "^2.4.0-alpha.3",
"@web3-onboard/core": "^2.4.0-alpha.4",
"@web3-onboard/common": "^2.1.4",
"use-sync-external-store": "1.0.0"
},
Expand Down
4 changes: 2 additions & 2 deletions packages/vue/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@web3-onboard/vue",
"version": "2.1.3-alpha.1",
"version": "2.1.3-alpha.2",
"description": "Vue Composable for web3-onboard",
"repository": "blocknative/web3-onboard",
"module": "dist/index.js",
Expand All @@ -25,7 +25,7 @@
"@vueuse/core": "^8.4.2",
"@vueuse/rxjs": "^8.2.0",
"@web3-onboard/common": "^2.1.4",
"@web3-onboard/core": "^2.4.0-alpha.3",
"@web3-onboard/core": "^2.4.0-alpha.4",
"vue-demi": "^0.12.4"
},
"peerDependencies": {
Expand Down

0 comments on commit e2e00a5

Please sign in to comment.