Skip to content

Commit 362170a

Browse files
committed
Update Chain type
1 parent 579b044 commit 362170a

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

packages/common/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/common",
3-
"version": "2.0.0",
3+
"version": "2.0.1",
44
"scripts": {
55
"build": "rollup -c",
66
"dev": "rollup -c -w",

packages/common/src/types.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -403,8 +403,8 @@ export interface Chain {
403403
namespace?: 'evm'
404404
id: ChainId
405405
rpcUrl: string
406-
label?: string
407-
token?: TokenSymbol // eg ETH, BNB, MATIC
406+
label: string
407+
token: TokenSymbol // eg ETH, BNB, MATIC
408408
}
409409

410410
export type TokenSymbol = string // eg ETH

packages/core/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ type Chain = {
4343
id: ChainId // hex encoded string, eg '0x1' for Ethereum Mainnet
4444
namespace?: 'evm' // string indicating chain namespace. Defaults to 'evm' but will allow other chain namespaces in the future
4545
rpcUrl: string // used for network requests
46-
label?: string // used for display, eg Ethereum Mainnet
47-
token?: TokenSymbol // the native token symbol, eg ETH, BNB, MATIC
46+
label: string // used for display, eg Ethereum Mainnet
47+
token: TokenSymbol // the native token symbol, eg ETH, BNB, MATIC
4848
}
4949
```
5050

packages/core/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/core",
3-
"version": "2.0.0",
3+
"version": "2.0.1",
44
"scripts": {
55
"build": "rollup -c",
66
"dev": "rollup -c -w",
@@ -40,7 +40,7 @@
4040
"typescript": "^4.5.5"
4141
},
4242
"dependencies": {
43-
"@web3-onboard/common": "^2.0.0",
43+
"@web3-onboard/common": "^2.0.1",
4444
"bowser": "^2.11.0",
4545
"ethers": "5.5.3",
4646
"eventemitter3": "^4.0.7",

packages/core/src/validation.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ const chain = Joi.object({
1717
namespace: chainNamespace,
1818
id: chainId.required(),
1919
rpcUrl: Joi.string().required(),
20-
label: Joi.string(),
21-
token: Joi.string()
20+
label: Joi.string().required(),
21+
token: Joi.string().required()
2222
})
2323

2424
const connectedChain = Joi.object({

0 commit comments

Comments
 (0)