Skip to content

Commit e92a323

Browse files
authored
Bump Joi to latest version and update typing of Joi validate (#1633)
* Bump joi to latest version and update usage * Revert change to ens validation * Prettier magic validation * Prettier uauth validation
1 parent 2c8647c commit e92a323

File tree

40 files changed

+211
-112
lines changed

40 files changed

+211
-112
lines changed

packages/coinbase/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/coinbase",
3-
"version": "2.2.1",
3+
"version": "2.2.2-alpha.1",
44
"description": "Coinbase SDK wallet module for connecting to Web3-Onboard. Web3-Onboard makes it simple to connect Ethereum hardware and software wallets to your dapp. Features standardised spec compliant web3 providers for all supported wallets, framework agnostic modern javascript UI with code splitting, CSS customization, multi-chain and multi-account support, reactive wallet state subscriptions and real-time transaction state change notifications.",
55
"keywords": [
66
"Ethereum",
@@ -59,6 +59,6 @@
5959
},
6060
"dependencies": {
6161
"@coinbase/wallet-sdk": "^3.6.0",
62-
"@web3-onboard/common": "^2.3.0"
62+
"@web3-onboard/common": "^2.3.1-alpha.1"
6363
}
6464
}

packages/common/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/common",
3-
"version": "2.3.0",
3+
"version": "2.3.1-alpha.1",
44
"description": "Web3-Onboard makes it simple to connect Ethereum hardware and software wallets to your dapp. Features standardised spec compliant web3 providers for all supported wallets, framework agnostic modern javascript UI with code splitting, CSS customization, multi-chain and multi-account support, reactive wallet state subscriptions and real-time transaction state change notifications.",
55
"keywords": [
66
"Ethereum",
@@ -75,6 +75,6 @@
7575
"dependencies": {
7676
"bignumber.js": "^9.1.0",
7777
"ethers": "5.5.4",
78-
"joi": "17.8.1"
78+
"joi": "17.9.1"
7979
}
8080
}

packages/common/src/validation.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@ import Joi from 'joi'
22

33
export type ValidateReturn = Joi.ValidationResult | null
44

5-
export function validate(validator: Joi.Schema, data: unknown): ValidateReturn {
5+
export function validate(
6+
validator: Joi.AnySchema<any>,
7+
data: unknown
8+
): ValidateReturn {
69
const result = validator.validate(data)
710
return result.error ? result : null
811
}

packages/core/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@web3-onboard/core",
3-
"version": "2.16.2-alpha.1",
3+
"version": "2.16.2-alpha.2",
44
"description": "Web3-Onboard makes it simple to connect Ethereum hardware and software wallets to your dapp. Features standardized spec compliant web3 providers for all supported wallets, framework agnostic modern javascript UI with code splitting, CSS customization, multi-chain and multi-account support, reactive wallet state subscriptions and real-time transaction state change notifications.",
55
"keywords": [
66
"Ethereum",
@@ -85,13 +85,13 @@
8585
},
8686
"dependencies": {
8787
"@unstoppabledomains/resolution": "^8.0",
88-
"@web3-onboard/common": "^2.3.0",
88+
"@web3-onboard/common": "^2.3.1-alpha.1",
8989
"bignumber.js": "^9.0.0",
9090
"bnc-sdk": "^4.6.7",
9191
"bowser": "^2.11.0",
9292
"ethers": "5.5.3",
9393
"eventemitter3": "^4.0.7",
94-
"joi": "17.8.1",
94+
"joi": "17.9.1",
9595
"lodash.merge": "^4.6.2",
9696
"lodash.partition": "^4.6.0",
9797
"nanoid": "^4.0.0",

packages/dcent/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@web3-onboard/dcent",
3-
"version": "2.2.4",
3+
"version": "2.2.5-alpha.1",
44
"description": "D'CENT wallet module for connecting to Web3-Onboard. Web3-Onboard makes it simple to connect Ethereum hardware and software wallets to your dapp. Features standardised spec compliant web3 providers for all supported wallets, framework agnostic modern javascript UI with code splitting, CSS customization, multi-chain and multi-account support, reactive wallet state subscriptions and real-time transaction state change notifications.",
55
"keywords": [
66
"Ethereum",
@@ -56,8 +56,8 @@
5656
"typescript": "^4.5.5"
5757
},
5858
"dependencies": {
59-
"@web3-onboard/common": "^2.3.0",
60-
"@web3-onboard/hw-common": "^2.2.0",
59+
"@web3-onboard/common": "^2.3.1-alpha.1",
60+
"@web3-onboard/hw-common": "^2.2.1-alpha.1",
6161
"@ethereumjs/tx": "^3.4.0",
6262
"@ethersproject/providers": "^5.5.0",
6363
"eth-dcent-keyring": "^0.2.2"

packages/demo/package.json

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -23,34 +23,34 @@
2323
"webpack-dev-server": "4.7.4"
2424
},
2525
"dependencies": {
26-
"@web3-onboard/core": "^2.16.2-alpha.1",
27-
"@web3-onboard/coinbase": "^2.2.1",
28-
"@web3-onboard/transaction-preview": "^2.0.5",
29-
"@web3-onboard/dcent": "^2.2.4",
30-
"@web3-onboard/frontier": "^2.0.1",
31-
"@web3-onboard/fortmatic": "^2.0.16",
32-
"@web3-onboard/gas": "^2.1.5",
33-
"@web3-onboard/gnosis": "^2.1.7",
34-
"@web3-onboard/keepkey": "^2.3.4",
35-
"@web3-onboard/keystone": "^2.3.4",
36-
"@web3-onboard/ledger": "^2.4.3",
37-
"@web3-onboard/infinity-wallet": "^2.0.1",
38-
"@web3-onboard/injected-wallets": "^2.8.3",
39-
"@web3-onboard/magic": "^2.1.4",
40-
"@web3-onboard/phantom": "^2.0.0-alpha.2",
41-
"@web3-onboard/portis": "^2.1.4",
42-
"@web3-onboard/sequence": "^2.0.5",
43-
"@web3-onboard/trezor": "^2.3.4",
44-
"@web3-onboard/trust": "^2.0.1",
45-
"@web3-onboard/torus": "^2.2.2",
46-
"@web3-onboard/taho": "^2.0.1",
47-
"@web3-onboard/web3auth": "^2.2.0",
48-
"@web3-onboard/walletconnect": "^2.3.4",
49-
"@web3-onboard/enkrypt": "^2.0.1",
50-
"@web3-onboard/mew-wallet": "^2.0.0",
51-
"@web3-onboard/xdefi": "^2.0.1",
52-
"@web3-onboard/uauth": "^2.0.2",
53-
"@web3-onboard/zeal": "^2.0.1",
26+
"@web3-onboard/core": "^2.16.2-alpha.2",
27+
"@web3-onboard/coinbase": "^2.2.2-alpha.1",
28+
"@web3-onboard/transaction-preview": "^2.0.6-alpha.1",
29+
"@web3-onboard/dcent": "^2.2.5-alpha.1",
30+
"@web3-onboard/frontier": "^2.0.2-alpha.1",
31+
"@web3-onboard/fortmatic": "^2.0.17-alpha.1",
32+
"@web3-onboard/gas": "^2.1.6-alpha.1",
33+
"@web3-onboard/gnosis": "^2.1.8-alpha.1",
34+
"@web3-onboard/keepkey": "^2.3.5-alpha.1",
35+
"@web3-onboard/keystone": "^2.3.5-alpha.1",
36+
"@web3-onboard/ledger": "^2.4.4-alpha.1",
37+
"@web3-onboard/infinity-wallet": "^2.0.2-alpha.1",
38+
"@web3-onboard/injected-wallets": "^2.8.4-alpha.1",
39+
"@web3-onboard/magic": "^2.1.5-alpha.1",
40+
"@web3-onboard/phantom": "^2.0.0-alpha.4",
41+
"@web3-onboard/portis": "^2.1.5-alpha.1",
42+
"@web3-onboard/sequence": "^2.0.6-alpha.1",
43+
"@web3-onboard/trezor": "^2.3.5-alpha.1",
44+
"@web3-onboard/trust": "^2.0.2-alpha.1",
45+
"@web3-onboard/torus": "^2.2.3-alpha.1",
46+
"@web3-onboard/taho": "^2.0.2-alpha.1",
47+
"@web3-onboard/web3auth": "^2.2.1-alpha.1",
48+
"@web3-onboard/walletconnect": "^2.3.5-alpha.1",
49+
"@web3-onboard/enkrypt": "^2.0.2-alpha.1",
50+
"@web3-onboard/mew-wallet": "^2.0.1-alpha.1",
51+
"@web3-onboard/xdefi": "^2.0.2-alpha.1",
52+
"@web3-onboard/uauth": "^2.0.3-alpha.1",
53+
"@web3-onboard/zeal": "^2.0.2-alpha.1",
5454
"vconsole": "^3.9.5"
5555
},
5656
"license": "MIT",

packages/enkrypt/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/enkrypt",
3-
"version": "2.0.1",
3+
"version": "2.0.2-alpha.1",
44
"description": "Enkrypt SDK wallet module for connecting to Web3-Onboard. Web3-Onboard makes it simple to connect Ethereum hardware and software wallets to your dapp. Features standardised spec compliant web3 providers for all supported wallets, framework agnostic modern javascript UI with code splitting, CSS customization, multi-chain and multi-account support, reactive wallet state subscriptions and real-time transaction state change notifications.",
55
"keywords": [
66
"Ethereum",
@@ -63,6 +63,6 @@
6363
"window": "^4.2.7"
6464
},
6565
"dependencies": {
66-
"@web3-onboard/common": "^2.3.0"
66+
"@web3-onboard/common": "^2.3.1-alpha.1"
6767
}
6868
}

packages/fortmatic/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/fortmatic",
3-
"version": "2.0.16",
3+
"version": "2.0.17-alpha.1",
44
"description": "Fortmatic wallet module for connecting to Web3-Onboard. Web3-Onboard makes it simple to connect Ethereum hardware and software wallets to your dapp. Features standardised spec compliant web3 providers for all supported wallets, framework agnostic modern javascript UI with code splitting, CSS customization, multi-chain and multi-account support, reactive wallet state subscriptions and real-time transaction state change notifications.",
55
"keywords": [
66
"Ethereum",
@@ -58,7 +58,7 @@
5858
"typescript": "^4.5.5"
5959
},
6060
"dependencies": {
61-
"@web3-onboard/common": "^2.3.0",
61+
"@web3-onboard/common": "^2.3.1-alpha.1",
6262
"fortmatic": "^2.2.1"
6363
}
6464
}

packages/frontier/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/frontier",
3-
"version": "2.0.1",
3+
"version": "2.0.2-alpha.1",
44
"description": "Frontier Wallet SDK wallet module for connecting to Web3-Onboard. Web3-Onboard makes it simple to connect Ethereum hardware and software wallets to your dapp. Features standardized spec compliant web3 providers for all supported wallets, framework agnostic modern javascript UI with code splitting, CSS customization, multi-chain and multi-account support, reactive wallet state subscriptions and real-time transaction state change notifications.",
55
"keywords": [
66
"Ethereum",
@@ -59,6 +59,6 @@
5959
"typescript": "^4.5.5"
6060
},
6161
"dependencies": {
62-
"@web3-onboard/common": "^2.3.0"
62+
"@web3-onboard/common": "^2.3.1-alpha.1"
6363
}
6464
}

packages/gas/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/gas",
3-
"version": "2.1.5",
3+
"version": "2.1.6-alpha.1",
44
"description": "Estimate the gas prices needed to get a transaction in to the next block for Ethereum Mainnet and Polygon Matic Mainnet.",
55
"keywords": [
66
"gas",
@@ -32,7 +32,7 @@
3232
"typescript": "^4.5.5"
3333
},
3434
"dependencies": {
35-
"@web3-onboard/common": "^2.3.0",
35+
"@web3-onboard/common": "^2.3.1-alpha.1",
3636
"rxjs": "^7.5.2",
3737
"joi": "17.8.1"
3838
}

packages/gnosis/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/gnosis",
3-
"version": "2.1.7",
3+
"version": "2.1.8-alpha.1",
44
"description": "Gnosis Safe module for connecting to Web3-Onboard. Web3-Onboard makes it simple to connect Ethereum hardware and software wallets to your dapp. Features standardised spec compliant web3 providers for all supported wallets, framework agnostic modern javascript UI with code splitting, CSS customization, multi-chain and multi-account support, reactive wallet state subscriptions and real-time transaction state change notifications.",
55
"keywords": [
66
"Ethereum",
@@ -59,6 +59,6 @@
5959
"dependencies": {
6060
"@gnosis.pm/safe-apps-provider": "^0.9.2",
6161
"@gnosis.pm/safe-apps-sdk": "^6.1.1",
62-
"@web3-onboard/common": "^2.3.0"
62+
"@web3-onboard/common": "^2.3.1-alpha.1"
6363
}
6464
}

packages/hw-common/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@web3-onboard/hw-common",
3-
"version": "2.2.0",
3+
"version": "2.2.1-alpha.1",
44
"description": "Web3-Onboard makes it simple to connect Ethereum hardware and software wallets to your dapp. Features standardised spec compliant web3 providers for all supported wallets, framework agnostic modern javascript UI with code splitting, CSS customization, multi-chain and multi-account support, reactive wallet state subscriptions and real-time transaction state change notifications.",
55
"keywords": [
66
"Ethereum",
@@ -81,9 +81,9 @@
8181
},
8282
"dependencies": {
8383
"@ethereumjs/common": "2.6.2",
84-
"@web3-onboard/common": "^2.3.0",
84+
"@web3-onboard/common": "^2.3.1-alpha.1",
8585
"ethers": "5.5.4",
86-
"joi": "17.8.1",
86+
"joi": "17.9.1",
8787
"rxjs": "^7.5.2"
8888
}
8989
}

packages/infinity-wallet/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/infinity-wallet",
3-
"version": "2.0.1",
3+
"version": "2.0.2-alpha.1",
44
"description": "Infinity Wallet SDK wallet module for connecting to Web3-Onboard. Web3-Onboard makes it simple to connect Ethereum hardware and software wallets to your dapp. Features standardized spec compliant web3 providers for all supported wallets, framework agnostic modern javascript UI with code splitting, CSS customization, multi-chain and multi-account support, reactive wallet state subscriptions and real-time transaction state change notifications.",
55
"keywords": [
66
"Ethereum",
@@ -60,7 +60,7 @@
6060
"devDependencies": {
6161
"@types/node": "^17.0.21",
6262
"typescript": "^4.5.5",
63-
"@web3-onboard/common": "^2.3.0"
63+
"@web3-onboard/common": "^2.3.1-alpha.1"
6464
},
6565
"dependencies": {
6666
"@infinitywallet/infinity-connector": "^1.0.6"

packages/injected/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@web3-onboard/injected-wallets",
3-
"version": "2.8.3",
3+
"version": "2.8.4-alpha.1",
44
"description": "Injected wallet module for connecting browser extension and mobile wallets to Web3-Onboard. Web3-Onboard makes it simple to connect Ethereum hardware and software wallets to your dapp. Features standardised spec compliant web3 providers for all supported wallets, framework agnostic modern javascript UI with code splitting, CSS customization, multi-chain and multi-account support, reactive wallet state subscriptions and real-time transaction state change notifications.",
55
"keywords": [
66
"Ethereum",
@@ -64,8 +64,8 @@
6464
"window": "^4.2.7"
6565
},
6666
"dependencies": {
67-
"@web3-onboard/common": "^2.3.0",
68-
"joi": "17.8.1",
67+
"@web3-onboard/common": "^2.3.1-alpha.1",
68+
"joi": "17.9.1",
6969
"lodash.uniqby": "^4.7.0"
7070
}
7171
}

packages/keepkey/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@web3-onboard/keepkey",
3-
"version": "2.3.4",
3+
"version": "2.3.5-alpha.1",
44
"description": "KeepKey hardware wallet module for connecting to Web3-Onboard. Web3-Onboard makes it simple to connect Ethereum hardware and software wallets to your dapp. Features standardised spec compliant web3 providers for all supported wallets, framework agnostic modern javascript UI with code splitting, CSS customization, multi-chain and multi-account support, reactive wallet state subscriptions and real-time transaction state change notifications.",
55
"keywords": [
66
"Ethereum",
@@ -63,8 +63,8 @@
6363
"@ethersproject/providers": "^5.5.0",
6464
"@shapeshiftoss/hdwallet-core": "^1.15.2",
6565
"@shapeshiftoss/hdwallet-keepkey-webusb": "^1.15.2",
66-
"@web3-onboard/common": "^2.3.0",
67-
"@web3-onboard/hw-common": "^2.2.0",
66+
"@web3-onboard/common": "^2.3.1-alpha.1",
67+
"@web3-onboard/hw-common": "^2.2.1-alpha.1",
6868
"ethereumjs-util": "^7.1.3"
6969
}
7070
}

packages/keystone/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/keystone",
3-
"version": "2.3.4",
3+
"version": "2.3.5-alpha.1",
44
"description": "Keystone hardware wallet module for connecting to Web3-Onboard. Web3-Onboard makes it simple to connect Ethereum hardware and software wallets to your dapp. Features standardised spec compliant web3 providers for all supported wallets, framework agnostic modern javascript UI with code splitting, CSS customization, multi-chain and multi-account support, reactive wallet state subscriptions and real-time transaction state change notifications.",
55
"keywords": [
66
"Ethereum",
@@ -58,7 +58,7 @@
5858
"@ethereumjs/tx": "^3.4.0",
5959
"@ethersproject/providers": "^5.5.0",
6060
"@keystonehq/eth-keyring": "^0.14.00.3",
61-
"@web3-onboard/common": "^2.3.0",
61+
"@web3-onboard/common": "^2.3.1-alpha.1",
6262
"@web3-onboard/hw-common": "^2.2.0"
6363
}
6464
}

packages/ledger/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/ledger",
3-
"version": "2.4.3",
3+
"version": "2.4.4-alpha.1",
44
"description": "Ledger hardare wallet module for connecting to Web3-Onboard. Web3-Onboard makes it simple to connect Ethereum hardware and software wallets to your dapp. Features standardised spec compliant web3 providers for all supported wallets, framework agnostic modern javascript UI with code splitting, CSS customization, multi-chain and multi-account support, reactive wallet state subscriptions and real-time transaction state change notifications.",
55
"keywords": [
66
"Ethereum",
@@ -61,7 +61,7 @@
6161
"@ethersproject/providers": "^5.5.0",
6262
"@ledgerhq/connect-kit-loader": "^1.0.2",
6363
"@walletconnect/client": "^1.7.1",
64-
"@web3-onboard/common": "^2.3.0",
64+
"@web3-onboard/common": "^2.3.1-alpha.1",
6565
"rxjs": "^7.5.2"
6666
}
6767
}

packages/magic/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@web3-onboard/magic",
3-
"version": "2.1.4",
3+
"version": "2.1.5-alpha.1",
44
"description": "Magic SDK wallet module for connecting to Web3-Onboard. Web3-Onboard makes it simple to connect Ethereum hardware and software wallets to your dapp. Features standardised spec compliant web3 providers for all supported wallets, framework agnostic modern javascript UI with code splitting, CSS customization, multi-chain and multi-account support, reactive wallet state subscriptions and real-time transaction state change notifications.",
55
"keywords": [
66
"Ethereum",
@@ -80,8 +80,8 @@
8080
"typescript": "^4.5.5"
8181
},
8282
"dependencies": {
83-
"@web3-onboard/common": "^2.3.0",
84-
"joi": "17.8.1",
83+
"@web3-onboard/common": "^2.3.1-alpha.1",
84+
"joi": "17.9.1",
8585
"magic-sdk": "^8.1.0",
8686
"rxjs": "^7.5.2"
8787
}

packages/magic/src/validation.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,10 @@ const magicOptions = Joi.object({
1212

1313
type ValidateReturn = Joi.ValidationResult | null
1414

15-
const validate = (validator: Joi.Schema, data: unknown): ValidateReturn => {
15+
const validate = (
16+
validator: Joi.AnySchema<any>,
17+
data: unknown
18+
): ValidateReturn => {
1619
const result = validator.validate(data)
1720
return result.error ? result : null
1821
}

packages/mew-wallet/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/mew-wallet",
3-
"version": "2.0.1",
3+
"version": "2.0.2-alpha.1",
44
"description": "MEW (MyEtherWallet) Wallet SDK wallet module for connecting to Web3-Onboard. Web3-Onboard makes it simple to connect Ethereum hardware and software wallets to your dapp. Features standardised spec compliant web3 providers for all supported wallets, framework agnostic modern javascript UI with code splitting, CSS customization, multi-chain and multi-account support, reactive wallet state subscriptions and real-time transaction state change notifications.",
55
"keywords": [
66
"Ethereum",
@@ -64,7 +64,7 @@
6464
"window": "^4.2.7"
6565
},
6666
"dependencies": {
67-
"@web3-onboard/common": "^2.3.0",
67+
"@web3-onboard/common": "^2.3.1-alpha.1",
6868
"lodash.uniqby": "^4.7.0"
6969
}
7070
}

0 commit comments

Comments
 (0)