Skip to content

Commit 49b90da

Browse files
committed
Merge branch 'v2-web3-onboard-develop' of blocknative.github.com:blocknative/onboard into v2-web3-onboard-develop
2 parents 8ec94e0 + 29ab8d9 commit 49b90da

File tree

27 files changed

+65
-48
lines changed

27 files changed

+65
-48
lines changed

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
packages/**/dist

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.0.6-alpha.1",
3+
"version": "2.0.6-alpha.2",
44
"description": "Coinbase Wallet module for web3-onboard",
55
"module": "dist/index.js",
66
"browser": "dist/index.js",
@@ -21,6 +21,6 @@
2121
},
2222
"dependencies": {
2323
"@coinbase/wallet-sdk": "^3.0.5",
24-
"@web3-onboard/common": "2.1.3-alpha.1"
24+
"@web3-onboard/common": "^2.1.3-alpha.2"
2525
}
2626
}

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.1.3-alpha.1",
3+
"version": "2.1.3-alpha.2",
44
"scripts": {
55
"build": "rollup -c",
66
"dev": "rollup -c -w",

packages/common/src/hdwallets.ts

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,22 @@ export const getCommon = async ({
1919
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
2020
// @ts-ignore
2121
const CommonConstructor: typeof Common = Common.default || Common
22+
23+
const commonOptions = {
24+
// Berlin is the minimum hardfork that will allow for EIP1559
25+
hardfork: Hardfork.Berlin,
26+
// List of supported EIPS
27+
eips: [1559]
28+
}
2229
let common: Common
2330
try {
2431
common = new CommonConstructor({
2532
chain: customNetwork || chainId,
26-
// Berlin is the minimum hardfork that will allow for EIP1559
27-
hardfork: Hardfork.Berlin,
28-
// List of supported EIPS
29-
eips: [1559]
33+
...commonOptions
3034
})
3135
} catch (e: any) {
3236
if (e.message && /Chain.*not supported/.test(e.message)) {
33-
common = CommonConstructor.custom({ chainId })
37+
common = CommonConstructor.custom({ chainId }, commonOptions)
3438
} else {
3539
throw e
3640
}
@@ -91,7 +95,11 @@ export const getHardwareWalletProvider = (
9195
request: ({ method, params }) =>
9296
fetch(getRpcUrl(), {
9397
method: 'POST',
98+
headers: {
99+
'Content-Type': 'application/json'
100+
},
94101
body: JSON.stringify({
102+
jsonrpc: '2.0',
95103
id: '42',
96104
method,
97105
params

packages/common/src/index.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,11 @@ export { createEIP1193Provider } from './eip-1193'
6363
export { default as accountSelect } from './account-select'
6464
export { entryModal } from './entry-modal'
6565
export { SofiaProLight, SofiaProRegular, SofiaProSemiBold } from './fonts'
66-
export { getCommon, bigNumberFieldsToStrings, getHardwareWalletProvider } from './hdwallets'
66+
export {
67+
getCommon,
68+
bigNumberFieldsToStrings,
69+
getHardwareWalletProvider
70+
} from './hdwallets'
6771

6872
export type {
6973
RequestPatch,

packages/common/src/types.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -468,8 +468,8 @@ export interface BootstrapNode {
468468
}
469469

470470
export interface RPCResponse {
471-
id: number,
471+
id: number
472472
jsonrpc: string
473-
error?: { code: number, message: string}
473+
error?: { code: number; message: string }
474474
result?: any
475-
}
475+
}

packages/core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
"typescript": "^4.5.5"
4242
},
4343
"dependencies": {
44-
"@web3-onboard/common": "^2.1.3-alpha.1",
44+
"@web3-onboard/common": "^2.1.3-alpha.2",
4545
"bignumber.js": "^9.0.0",
4646
"bnc-sdk": "^4.4.1",
4747
"bowser": "^2.11.0",

packages/core/src/types.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,7 @@ interface ExposedActions {
7171
update: UpdateNotification
7272
}
7373
updateBalances: (addresses?: string[]) => Promise<void>
74-
updateAccountCenter: (
75-
update: AccountCenter | Partial<AccountCenter>
76-
) => void
74+
updateAccountCenter: (update: AccountCenter | Partial<AccountCenter>) => void
7775
}
7876

7977
export interface ConnectOptions {

packages/dcent/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/dcent",
3-
"version": "2.0.3-alpha.1",
3+
"version": "2.0.3-alpha.2",
44
"description": "D'CENT module for web3-onboard",
55
"module": "dist/index.js",
66
"typings": "dist/index.d.ts",
@@ -18,7 +18,7 @@
1818
"typescript": "^4.5.5"
1919
},
2020
"dependencies": {
21-
"@web3-onboard/common": "^2.1.3-alpha.1",
21+
"@web3-onboard/common": "^2.1.3-alpha.2",
2222
"@ethereumjs/common": "^2.6.1",
2323
"@ethereumjs/tx": "^3.4.0",
2424
"@ethersproject/providers": "^5.5.0",

packages/demo/src/App.svelte

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,12 @@
139139
label: 'Polygon',
140140
rpcUrl: 'https://matic-mainnet.chainstacklabs.com'
141141
},
142+
{
143+
id: '0x13881',
144+
token: 'MATIC',
145+
label: 'Polygon - Mumbai',
146+
rpcUrl: 'https://matic-mumbai.chainstacklabs.com '
147+
},
142148
{
143149
id: '0xa',
144150
token: 'OETH',

0 commit comments

Comments
 (0)