Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,12 @@ jobs:
working_directory: ~/web3-onboard-monorepo/packages/hw-common
steps:
- node-build-steps
build-sequence:
docker:
- image: cimg/node:16.13.1
working_directory: ~/web3-onboard-monorepo/packages/sequence
steps:
- node-build-steps

# Build staging/Alpha releases
build-staging-core:
Expand Down Expand Up @@ -431,6 +437,12 @@ jobs:
working_directory: ~/web3-onboard-monorepo/packages/hw-common
steps:
- node-staging-build-steps
build-staging-sequence:
docker:
- image: cimg/node:16.13.1
working_directory: ~/web3-onboard-monorepo/packages/sequence
steps:
- node-staging-build-steps

workflows:
version: 2
Expand Down Expand Up @@ -567,3 +579,9 @@ workflows:
<<: *deploy_production_filters
- build-staging-hw-common:
<<: *deploy_staging_filters
sequence:
jobs:
- build-sequence:
<<: *deploy_production_filters
- build-staging-sequence:
<<: *deploy_staging_filters
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ For full documentation, check out the README.md for each package:
- [Portis](packages/portis/README.md)
- [MEW](packages/mew/README.md)
- [Web3Auth](packages/web3auth/README.md)
- [Sequence](packages/sequence/README.md)

**Hardware Wallets**

Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "web3-onboard-monorepo",
"version": "2.8.0",
"version": "2.9.0",
"private": true,
"workspaces": [
"./packages/*"
Expand Down Expand Up @@ -36,7 +36,8 @@
"Injected Wallet",
"GameStop",
"Crypto",
"Crypto Wallet"
"Crypto Wallet",
"Sequence"
],
"repository": {
"type": "git",
Expand Down
4 changes: 2 additions & 2 deletions packages/coinbase/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@web3-onboard/coinbase",
"version": "2.1.0",
"version": "2.1.1",
"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.",
"keywords": [
"Ethereum",
Expand Down Expand Up @@ -59,6 +59,6 @@
},
"dependencies": {
"@coinbase/wallet-sdk": "^3.0.5",
"@web3-onboard/common": "^2.2.0"
"@web3-onboard/common": "^2.2.1"
}
}
2 changes: 1 addition & 1 deletion packages/common/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@web3-onboard/common",
"version": "2.2.0",
"version": "2.2.1",
"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.",
"keywords": [
"Ethereum",
Expand Down
4 changes: 2 additions & 2 deletions packages/common/src/eip-1193.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import type {
ChainId,
EIP1193Provider,
ProviderAccounts
} from './types'
import { ProviderRpcError } from './errors'
} from './types.js'
import { ProviderRpcError } from './errors.js'

/**
* Takes a provider instance along with events
Expand Down
2 changes: 1 addition & 1 deletion packages/common/src/errors.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { ProviderRpcErrorCode } from './types'
import type { ProviderRpcErrorCode } from './types.js'

export class ProviderRpcError extends Error {
message: string
Expand Down
12 changes: 6 additions & 6 deletions packages/common/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
export { ProviderRpcError } from './errors'
export { createEIP1193Provider } from './eip-1193'
export { SofiaProLight, SofiaProRegular, SofiaProSemiBold } from './fonts'
export { weiToEth } from './utils'
export { ProviderRpcError } from './errors.js'
export { createEIP1193Provider } from './eip-1193.js'
export { SofiaProLight, SofiaProRegular, SofiaProSemiBold } from './fonts.js'
export { weiToEth } from './utils.js'

export * from './types'
export * from './validation'
export * from './types.js'
export * from './validation.js'
4 changes: 2 additions & 2 deletions packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@web3-onboard/core",
"version": "2.8.0",
"version": "2.8.1",
"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.",
"keywords": [
"Ethereum",
Expand Down Expand Up @@ -82,7 +82,7 @@
"typescript": "^4.5.5"
},
"dependencies": {
"@web3-onboard/common": "^2.2.0",
"@web3-onboard/common": "^2.2.1",
"bignumber.js": "^9.0.0",
"bnc-sdk": "^4.4.1",
"bowser": "^2.11.0",
Expand Down
12 changes: 6 additions & 6 deletions packages/core/src/chain.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { firstValueFrom } from 'rxjs'
import { filter, map } from 'rxjs/operators'
import { ProviderRpcErrorCode } from '@web3-onboard/common'
import { addNewChain, switchChain } from './provider'
import { state } from './store'
import { switchChainModal$ } from './streams'
import { validateSetChainOptions } from './validation'
import type { WalletState } from './types'
import { toHexString } from './utils'
import { addNewChain, switchChain } from './provider.js'
import { state } from './store/index.js'
import { switchChainModal$ } from './streams.js'
import { validateSetChainOptions } from './validation.js'
import type { WalletState } from './types.js'
import { toHexString } from './utils.js'

async function setChain(options: {
chainId: string | number
Expand Down
4 changes: 2 additions & 2 deletions packages/core/src/configuration.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Configuration } from './types'
import { getDevice } from './utils'
import type { Configuration } from './types.js'
import { getDevice } from './utils.js'

export let configuration: Configuration = {
svelteInstance: null,
Expand Down
22 changes: 13 additions & 9 deletions packages/core/src/connect.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
import { firstValueFrom } from 'rxjs'
import { filter, withLatestFrom, pluck } from 'rxjs/operators'
import { configuration } from './configuration'
import { state } from './store'
import { setWalletModules } from './store/actions'
import { connectWallet$, wallets$ } from './streams'
import type { ConnectOptions, ConnectOptionsString, WalletState } from './types'
import { wait } from './utils'
import { validateConnectOptions } from './validation'
import { configuration } from './configuration.js'
import { state } from './store/index.js'
import { setWalletModules } from './store/actions.js'
import { connectWallet$, wallets$ } from './streams.js'
import type {
ConnectOptions,
ConnectOptionsString,
WalletState
} from './types.js'
import { wait } from './utils.js'
import { validateConnectOptions } from './validation.js'

async function connect(
options?: ConnectOptions | ConnectOptionsString
Expand All @@ -25,8 +29,8 @@ async function connect(
if (!chains.length)
throw new Error(
'At least one chain must be set before attempting to connect a wallet'
)
)

const { autoSelect } = options || {
autoSelect: { label: '', disableModals: false }
}
Expand Down
6 changes: 3 additions & 3 deletions packages/core/src/constants.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { configuration } from './configuration'
import type { AppState } from './types'
import { configuration } from './configuration.js'
import type { AppState } from './types.js'

export const APP_INITIAL_STATE: AppState = {
wallets: [],
Expand All @@ -25,7 +25,7 @@ export const APP_INITIAL_STATE: AppState = {
},
notifications: [],
locale: '',
connect : {
connect: {
showSidebar: true
}
}
Expand Down
12 changes: 6 additions & 6 deletions packages/core/src/disconnect.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { getBlocknativeSdk } from './services'
import { state } from './store'
import { removeWallet } from './store/actions'
import { disconnectWallet$ } from './streams'
import type { DisconnectOptions, WalletState } from './types'
import { validateDisconnectOptions } from './validation'
import { getBlocknativeSdk } from './services.js'
import { state } from './store/index.js'
import { removeWallet } from './store/actions.js'
import { disconnectWallet$ } from './streams.js'
import type { DisconnectOptions, WalletState } from './types.js'
import { validateDisconnectOptions } from './validation.js'

async function disconnect(options: DisconnectOptions): Promise<WalletState[]> {
const error = validateDisconnectOptions(options)
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/i18n/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { addMessages, init, getLocaleFromNavigator } from 'svelte-i18n'
import merge from 'lodash.merge'
import en from './en.json'
import type { i18nOptions } from '../types'
import type { i18nOptions } from '../types.js'

function initialize(options?: i18nOptions): void {
if (options) {
Expand Down
42 changes: 15 additions & 27 deletions packages/core/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
import { SofiaProRegular } from '@web3-onboard/common'
import connectWallet from './connect'
import disconnectWallet from './disconnect'
import setChain from './chain'
import { state } from './store'
import { reset$ } from './streams'
import initI18N from './i18n'
import connectWallet from './connect.js'
import disconnectWallet from './disconnect.js'
import setChain from './chain.js'
import { state } from './store/index.js'
import { reset$ } from './streams.js'
import initI18N from './i18n/index.js'
import App from './views/Index.svelte'
import type { InitOptions, Notify } from './types'
import { APP_INITIAL_STATE } from './constants'
import { configuration, updateConfiguration } from './configuration'
import updateBalances from './update-balances'
import { chainIdToHex } from './utils'
import { preflightNotifications } from './preflight-notifications'
import type { InitOptions, Notify } from './types.js'
import { APP_INITIAL_STATE } from './constants.js'
import { configuration, updateConfiguration } from './configuration.js'
import updateBalances from './update-balances.js'
import { chainIdToHex } from './utils.js'
import { preflightNotifications } from './preflight-notifications.js'

import {
validateInitOptions,
validateNotify,
validateNotifyOptions
} from './validation'
} from './validation.js'

import {
addChains,
Expand All @@ -28,7 +28,7 @@ import {
setPrimaryWallet,
setWalletModules,
updateConnectModal
} from './store/actions'
} from './store/actions.js'

const API = {
connectWallet,
Expand Down Expand Up @@ -65,7 +65,7 @@ export type {
Notify,
UpdateNotification,
PreflightNotificationsOptions
} from './types'
} from './types.js'

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

Expand Down Expand Up @@ -167,10 +167,6 @@ function init(options: InitOptions): OnboardAPI {
}
}

if (!apiKey || !notifyUpdate.enabled) {
notifyUpdate.enabled = false
}

updateNotify(notifyUpdate)
} else {
const error = validateNotify(notify as Notify)
Expand All @@ -184,19 +180,11 @@ function init(options: InitOptions): OnboardAPI {
...notify
}

if (!apiKey || !notifyUpdate.enabled) {
notifyUpdate.enabled = false
}

updateNotify(notifyUpdate)
}
} else {
const notifyUpdate: Partial<Notify> = APP_INITIAL_STATE.notify

if (!apiKey) {
notifyUpdate.enabled = false
}

updateNotify(notifyUpdate)
}

Expand Down
12 changes: 6 additions & 6 deletions packages/core/src/notify.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ import type {
CustomNotification,
Notification,
NotificationType
} from './types'
} from './types.js'

import { validateTransactionHandlerReturn } from './validation'
import { state } from './store'
import { addNotification } from './store/actions'
import updateBalances from './update-balances'
import { updateTransaction } from './streams'
import { validateTransactionHandlerReturn } from './validation.js'
import { state } from './store/index.js'
import { addNotification } from './store/actions.js'
import updateBalances from './update-balances.js'
import { updateTransaction } from './streams.js'

export function handleTransactionUpdates(
transaction: EthereumTransactionData
Expand Down
14 changes: 6 additions & 8 deletions packages/core/src/preflight-notifications.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ import { nanoid } from 'nanoid'
import defaultCopy from './i18n/en.json'
import type { Network } from 'bnc-sdk'

import type { Notification, PreflightNotificationsOptions } from './types'
import { addNotification, removeNotification } from './store/actions'
import { state } from './store'
import { eventToType } from './notify'
import { networkToChainId } from './utils'
import { validatePreflightNotifications } from './validation'
import type { Notification, PreflightNotificationsOptions } from './types.js'
import { addNotification, removeNotification } from './store/actions.js'
import { state } from './store/index.js'
import { eventToType } from './notify.js'
import { networkToChainId } from './utils.js'
import { validatePreflightNotifications } from './validation.js'

let notificationsArr: Notification[]
state.select('notifications').subscribe(notifications => {
Expand All @@ -18,8 +18,6 @@ state.select('notifications').subscribe(notifications => {
export async function preflightNotifications(
options: PreflightNotificationsOptions
): Promise<string | void> {


const invalid = validatePreflightNotifications(options)

if (invalid) {
Expand Down
Loading