Skip to content

Commit d97dae8

Browse files
authored
Merge pull request #1230 from blocknative/release/2.9.0
Release 2.9.0 (main)
2 parents 4a5f6b0 + aba9a12 commit d97dae8

File tree

116 files changed

+1288
-354
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

116 files changed

+1288
-354
lines changed

.circleci/config.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -297,6 +297,12 @@ jobs:
297297
working_directory: ~/web3-onboard-monorepo/packages/hw-common
298298
steps:
299299
- node-build-steps
300+
build-sequence:
301+
docker:
302+
- image: cimg/node:16.13.1
303+
working_directory: ~/web3-onboard-monorepo/packages/sequence
304+
steps:
305+
- node-build-steps
300306

301307
# Build staging/Alpha releases
302308
build-staging-core:
@@ -431,6 +437,12 @@ jobs:
431437
working_directory: ~/web3-onboard-monorepo/packages/hw-common
432438
steps:
433439
- node-staging-build-steps
440+
build-staging-sequence:
441+
docker:
442+
- image: cimg/node:16.13.1
443+
working_directory: ~/web3-onboard-monorepo/packages/sequence
444+
steps:
445+
- node-staging-build-steps
434446

435447
workflows:
436448
version: 2
@@ -567,3 +579,9 @@ workflows:
567579
<<: *deploy_production_filters
568580
- build-staging-hw-common:
569581
<<: *deploy_staging_filters
582+
sequence:
583+
jobs:
584+
- build-sequence:
585+
<<: *deploy_production_filters
586+
- build-staging-sequence:
587+
<<: *deploy_staging_filters

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ For full documentation, check out the README.md for each package:
9595
- [Portis](packages/portis/README.md)
9696
- [MEW](packages/mew/README.md)
9797
- [Web3Auth](packages/web3auth/README.md)
98+
- [Sequence](packages/sequence/README.md)
9899

99100
**Hardware Wallets**
100101

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "web3-onboard-monorepo",
3-
"version": "2.8.0",
3+
"version": "2.9.0",
44
"private": true,
55
"workspaces": [
66
"./packages/*"
@@ -36,7 +36,8 @@
3636
"Injected Wallet",
3737
"GameStop",
3838
"Crypto",
39-
"Crypto Wallet"
39+
"Crypto Wallet",
40+
"Sequence"
4041
],
4142
"repository": {
4243
"type": "git",

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.1.0",
3+
"version": "2.1.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.0.5",
62-
"@web3-onboard/common": "^2.2.0"
62+
"@web3-onboard/common": "^2.2.1"
6363
}
6464
}

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.2.0",
3+
"version": "2.2.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",

packages/common/src/eip-1193.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ import type {
44
ChainId,
55
EIP1193Provider,
66
ProviderAccounts
7-
} from './types'
8-
import { ProviderRpcError } from './errors'
7+
} from './types.js'
8+
import { ProviderRpcError } from './errors.js'
99

1010
/**
1111
* Takes a provider instance along with events

packages/common/src/errors.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { ProviderRpcErrorCode } from './types'
1+
import type { ProviderRpcErrorCode } from './types.js'
22

33
export class ProviderRpcError extends Error {
44
message: string

packages/common/src/index.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
export { ProviderRpcError } from './errors'
2-
export { createEIP1193Provider } from './eip-1193'
3-
export { SofiaProLight, SofiaProRegular, SofiaProSemiBold } from './fonts'
4-
export { weiToEth } from './utils'
1+
export { ProviderRpcError } from './errors.js'
2+
export { createEIP1193Provider } from './eip-1193.js'
3+
export { SofiaProLight, SofiaProRegular, SofiaProSemiBold } from './fonts.js'
4+
export { weiToEth } from './utils.js'
55

6-
export * from './types'
7-
export * from './validation'
6+
export * from './types.js'
7+
export * from './validation.js'

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.8.0",
3+
"version": "2.8.1",
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",
@@ -82,7 +82,7 @@
8282
"typescript": "^4.5.5"
8383
},
8484
"dependencies": {
85-
"@web3-onboard/common": "^2.2.0",
85+
"@web3-onboard/common": "^2.2.1",
8686
"bignumber.js": "^9.0.0",
8787
"bnc-sdk": "^4.4.1",
8888
"bowser": "^2.11.0",

packages/core/src/chain.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
import { firstValueFrom } from 'rxjs'
22
import { filter, map } from 'rxjs/operators'
33
import { ProviderRpcErrorCode } from '@web3-onboard/common'
4-
import { addNewChain, switchChain } from './provider'
5-
import { state } from './store'
6-
import { switchChainModal$ } from './streams'
7-
import { validateSetChainOptions } from './validation'
8-
import type { WalletState } from './types'
9-
import { toHexString } from './utils'
4+
import { addNewChain, switchChain } from './provider.js'
5+
import { state } from './store/index.js'
6+
import { switchChainModal$ } from './streams.js'
7+
import { validateSetChainOptions } from './validation.js'
8+
import type { WalletState } from './types.js'
9+
import { toHexString } from './utils.js'
1010

1111
async function setChain(options: {
1212
chainId: string | number

packages/core/src/configuration.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import type { Configuration } from './types'
2-
import { getDevice } from './utils'
1+
import type { Configuration } from './types.js'
2+
import { getDevice } from './utils.js'
33

44
export let configuration: Configuration = {
55
svelteInstance: null,

packages/core/src/connect.ts

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
11
import { firstValueFrom } from 'rxjs'
22
import { filter, withLatestFrom, pluck } from 'rxjs/operators'
3-
import { configuration } from './configuration'
4-
import { state } from './store'
5-
import { setWalletModules } from './store/actions'
6-
import { connectWallet$, wallets$ } from './streams'
7-
import type { ConnectOptions, ConnectOptionsString, WalletState } from './types'
8-
import { wait } from './utils'
9-
import { validateConnectOptions } from './validation'
3+
import { configuration } from './configuration.js'
4+
import { state } from './store/index.js'
5+
import { setWalletModules } from './store/actions.js'
6+
import { connectWallet$, wallets$ } from './streams.js'
7+
import type {
8+
ConnectOptions,
9+
ConnectOptionsString,
10+
WalletState
11+
} from './types.js'
12+
import { wait } from './utils.js'
13+
import { validateConnectOptions } from './validation.js'
1014

1115
async function connect(
1216
options?: ConnectOptions | ConnectOptionsString
@@ -25,8 +29,8 @@ async function connect(
2529
if (!chains.length)
2630
throw new Error(
2731
'At least one chain must be set before attempting to connect a wallet'
28-
)
29-
32+
)
33+
3034
const { autoSelect } = options || {
3135
autoSelect: { label: '', disableModals: false }
3236
}

packages/core/src/constants.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { configuration } from './configuration'
2-
import type { AppState } from './types'
1+
import { configuration } from './configuration.js'
2+
import type { AppState } from './types.js'
33

44
export const APP_INITIAL_STATE: AppState = {
55
wallets: [],
@@ -25,7 +25,7 @@ export const APP_INITIAL_STATE: AppState = {
2525
},
2626
notifications: [],
2727
locale: '',
28-
connect : {
28+
connect: {
2929
showSidebar: true
3030
}
3131
}

packages/core/src/disconnect.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import { getBlocknativeSdk } from './services'
2-
import { state } from './store'
3-
import { removeWallet } from './store/actions'
4-
import { disconnectWallet$ } from './streams'
5-
import type { DisconnectOptions, WalletState } from './types'
6-
import { validateDisconnectOptions } from './validation'
1+
import { getBlocknativeSdk } from './services.js'
2+
import { state } from './store/index.js'
3+
import { removeWallet } from './store/actions.js'
4+
import { disconnectWallet$ } from './streams.js'
5+
import type { DisconnectOptions, WalletState } from './types.js'
6+
import { validateDisconnectOptions } from './validation.js'
77

88
async function disconnect(options: DisconnectOptions): Promise<WalletState[]> {
99
const error = validateDisconnectOptions(options)

packages/core/src/i18n/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { addMessages, init, getLocaleFromNavigator } from 'svelte-i18n'
22
import merge from 'lodash.merge'
33
import en from './en.json'
4-
import type { i18nOptions } from '../types'
4+
import type { i18nOptions } from '../types.js'
55

66
function initialize(options?: i18nOptions): void {
77
if (options) {

packages/core/src/index.ts

Lines changed: 15 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
import { SofiaProRegular } from '@web3-onboard/common'
2-
import connectWallet from './connect'
3-
import disconnectWallet from './disconnect'
4-
import setChain from './chain'
5-
import { state } from './store'
6-
import { reset$ } from './streams'
7-
import initI18N from './i18n'
2+
import connectWallet from './connect.js'
3+
import disconnectWallet from './disconnect.js'
4+
import setChain from './chain.js'
5+
import { state } from './store/index.js'
6+
import { reset$ } from './streams.js'
7+
import initI18N from './i18n/index.js'
88
import App from './views/Index.svelte'
9-
import type { InitOptions, Notify } from './types'
10-
import { APP_INITIAL_STATE } from './constants'
11-
import { configuration, updateConfiguration } from './configuration'
12-
import updateBalances from './update-balances'
13-
import { chainIdToHex } from './utils'
14-
import { preflightNotifications } from './preflight-notifications'
9+
import type { InitOptions, Notify } from './types.js'
10+
import { APP_INITIAL_STATE } from './constants.js'
11+
import { configuration, updateConfiguration } from './configuration.js'
12+
import updateBalances from './update-balances.js'
13+
import { chainIdToHex } from './utils.js'
14+
import { preflightNotifications } from './preflight-notifications.js'
1515

1616
import {
1717
validateInitOptions,
1818
validateNotify,
1919
validateNotifyOptions
20-
} from './validation'
20+
} from './validation.js'
2121

2222
import {
2323
addChains,
@@ -28,7 +28,7 @@ import {
2828
setPrimaryWallet,
2929
setWalletModules,
3030
updateConnectModal
31-
} from './store/actions'
31+
} from './store/actions.js'
3232

3333
const API = {
3434
connectWallet,
@@ -65,7 +65,7 @@ export type {
6565
Notify,
6666
UpdateNotification,
6767
PreflightNotificationsOptions
68-
} from './types'
68+
} from './types.js'
6969

7070
export type { EIP1193Provider } from '@web3-onboard/common'
7171

@@ -167,10 +167,6 @@ function init(options: InitOptions): OnboardAPI {
167167
}
168168
}
169169

170-
if (!apiKey || !notifyUpdate.enabled) {
171-
notifyUpdate.enabled = false
172-
}
173-
174170
updateNotify(notifyUpdate)
175171
} else {
176172
const error = validateNotify(notify as Notify)
@@ -184,19 +180,11 @@ function init(options: InitOptions): OnboardAPI {
184180
...notify
185181
}
186182

187-
if (!apiKey || !notifyUpdate.enabled) {
188-
notifyUpdate.enabled = false
189-
}
190-
191183
updateNotify(notifyUpdate)
192184
}
193185
} else {
194186
const notifyUpdate: Partial<Notify> = APP_INITIAL_STATE.notify
195187

196-
if (!apiKey) {
197-
notifyUpdate.enabled = false
198-
}
199-
200188
updateNotify(notifyUpdate)
201189
}
202190

packages/core/src/notify.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ import type {
88
CustomNotification,
99
Notification,
1010
NotificationType
11-
} from './types'
11+
} from './types.js'
1212

13-
import { validateTransactionHandlerReturn } from './validation'
14-
import { state } from './store'
15-
import { addNotification } from './store/actions'
16-
import updateBalances from './update-balances'
17-
import { updateTransaction } from './streams'
13+
import { validateTransactionHandlerReturn } from './validation.js'
14+
import { state } from './store/index.js'
15+
import { addNotification } from './store/actions.js'
16+
import updateBalances from './update-balances.js'
17+
import { updateTransaction } from './streams.js'
1818

1919
export function handleTransactionUpdates(
2020
transaction: EthereumTransactionData

packages/core/src/preflight-notifications.ts

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ import { nanoid } from 'nanoid'
33
import defaultCopy from './i18n/en.json'
44
import type { Network } from 'bnc-sdk'
55

6-
import type { Notification, PreflightNotificationsOptions } from './types'
7-
import { addNotification, removeNotification } from './store/actions'
8-
import { state } from './store'
9-
import { eventToType } from './notify'
10-
import { networkToChainId } from './utils'
11-
import { validatePreflightNotifications } from './validation'
6+
import type { Notification, PreflightNotificationsOptions } from './types.js'
7+
import { addNotification, removeNotification } from './store/actions.js'
8+
import { state } from './store/index.js'
9+
import { eventToType } from './notify.js'
10+
import { networkToChainId } from './utils.js'
11+
import { validatePreflightNotifications } from './validation.js'
1212

1313
let notificationsArr: Notification[]
1414
state.select('notifications').subscribe(notifications => {
@@ -18,8 +18,6 @@ state.select('notifications').subscribe(notifications => {
1818
export async function preflightNotifications(
1919
options: PreflightNotificationsOptions
2020
): Promise<string | void> {
21-
22-
2321
const invalid = validatePreflightNotifications(options)
2422

2523
if (invalid) {

0 commit comments

Comments
 (0)