Skip to content

Commit e95007f

Browse files
authored
Merge pull request #1657 from blocknative/release/2.21.3
Release 2.21.3
2 parents a4767aa + c82af09 commit e95007f

Some content is hidden

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

65 files changed

+5091
-2490
lines changed

.circleci/config.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -375,6 +375,12 @@ jobs:
375375
working_directory: ~/web3-onboard-monorepo/packages/taho
376376
steps:
377377
- node-build-steps
378+
build-unstoppable-resolution:
379+
docker:
380+
- image: cimg/node:16.13.1
381+
working_directory: ~/web3-onboard-monorepo/packages/unstoppable-resolution
382+
steps:
383+
- node-build-steps
378384

379385
# Build staging/Alpha releases
380386
build-staging-core:
@@ -587,6 +593,12 @@ jobs:
587593
working_directory: ~/web3-onboard-monorepo/packages/taho
588594
steps:
589595
- node-staging-build-steps
596+
build-staging-unstoppable-resolution:
597+
docker:
598+
- image: cimg/node:16.13.1
599+
working_directory: ~/web3-onboard-monorepo/packages/unstoppable-resolution
600+
steps:
601+
- node-staging-build-steps
590602

591603
workflows:
592604
version: 2
@@ -801,3 +813,9 @@ workflows:
801813
<<: *deploy_production_filters
802814
- build-staging-taho:
803815
<<: *deploy_staging_filters
816+
unstoppable-resolution:
817+
jobs:
818+
- build-unstoppable-resolution:
819+
<<: *deploy_production_filters
820+
- build-staging-unstoppable-resolution:
821+
<<: *deploy_staging_filters

.github/ISSUE_TEMPLATE/BUG.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
name: Bug Report
22
description: File a bug report
3-
title: '[Bug]: '
43
labels: [bug]
54
assignees:
65
- taylorjdawson

assets/custom-connect-1.png

118 KB
Loading

assets/custom-connect-2.png

200 KB
Loading

assets/custom-connect-default.png

124 KB
Loading

docs/package.json

Lines changed: 27 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
"check:watch": "svelte-check --tsconfig ./tsconfig.json --watch",
1313
"lint": "prettier --check --plugin-search-dir=. . && eslint .",
1414
"format": "prettier --write --plugin-search-dir=. .",
15-
"update-w3o-to-prod": "yarn add '@web3-onboard/coinbase@next' '@web3-onboard/core@next' '@web3-onboard/dcent@next' '@web3-onboard/enkrypt@next' '@web3-onboard/fortmatic@next' '@web3-onboard/gas@next' '@web3-onboard/gnosis@next' '@web3-onboard/infinity-wallet@next' '@web3-onboard/injected-wallets@next' '@web3-onboard/keepkey@next' '@web3-onboard/keystone@next' '@web3-onboard/ledger@next' '@web3-onboard/magic@next' '@web3-onboard/mew-wallet@next' '@web3-onboard/portis@next' '@web3-onboard/sequence@next' '@web3-onboard/taho@next' '@web3-onboard/torus@next' '@web3-onboard/transaction-preview@next' '@web3-onboard/trezor@next' '@web3-onboard/trust@next' '@web3-onboard/uauth@next' '@web3-onboard/walletconnect@next' '@web3-onboard/web3auth@next' '@web3-onboard/xdefi@next'"
15+
"w3o-latest-prod": "yarn add '@web3-onboard/coinbase' '@web3-onboard/core' '@web3-onboard/dcent' '@web3-onboard/enkrypt' '@web3-onboard/fortmatic' '@web3-onboard/gas' '@web3-onboard/gnosis' '@web3-onboard/infinity-wallet' '@web3-onboard/injected-wallets' '@web3-onboard/keepkey' '@web3-onboard/keystone' '@web3-onboard/ledger' '@web3-onboard/magic' '@web3-onboard/mew-wallet' '@web3-onboard/portis' '@web3-onboard/sequence' '@web3-onboard/taho' '@web3-onboard/torus' '@web3-onboard/transaction-preview' '@web3-onboard/trezor' '@web3-onboard/trust' '@web3-onboard/uauth' '@web3-onboard/walletconnect' '@web3-onboard/web3auth' '@web3-onboard/xdefi'",
16+
"w3o-latest-alpha": "yarn add '@web3-onboard/coinbase@next' '@web3-onboard/core@next' '@web3-onboard/dcent@next' '@web3-onboard/enkrypt@next' '@web3-onboard/fortmatic@next' '@web3-onboard/gas@next' '@web3-onboard/gnosis@next' '@web3-onboard/infinity-wallet@next' '@web3-onboard/injected-wallets@next' '@web3-onboard/keepkey@next' '@web3-onboard/keystone@next' '@web3-onboard/ledger@next' '@web3-onboard/magic@next' '@web3-onboard/mew-wallet@next' '@web3-onboard/portis@next' '@web3-onboard/sequence@next' '@web3-onboard/taho@next' '@web3-onboard/torus@next' '@web3-onboard/transaction-preview@next' '@web3-onboard/trezor@next' '@web3-onboard/trust@next' '@web3-onboard/uauth@next' '@web3-onboard/walletconnect@next' '@web3-onboard/web3auth@next' '@web3-onboard/xdefi@next'"
1617
},
1718
"devDependencies": {
1819
"@algolia/client-search": "^4.14.2",
@@ -55,31 +56,31 @@
5556
},
5657
"type": "module",
5758
"dependencies": {
58-
"@web3-onboard/coinbase": "^2.2.2-alpha.1",
59-
"@web3-onboard/core": "^2.16.2-alpha.2",
60-
"@web3-onboard/dcent": "^2.2.5-alpha.1",
61-
"@web3-onboard/enkrypt": "^2.0.2-alpha.1",
62-
"@web3-onboard/fortmatic": "^2.0.17-alpha.1",
63-
"@web3-onboard/gas": "^2.1.6-alpha.1",
64-
"@web3-onboard/gnosis": "^2.1.8-alpha.1",
65-
"@web3-onboard/infinity-wallet": "^2.0.2-alpha.1",
66-
"@web3-onboard/injected-wallets": "^2.8.4-alpha.1",
67-
"@web3-onboard/keepkey": "^2.3.5-alpha.1",
68-
"@web3-onboard/keystone": "^2.3.5-alpha.1",
69-
"@web3-onboard/ledger": "^2.4.4-alpha.1",
70-
"@web3-onboard/magic": "^2.1.5-alpha.1",
71-
"@web3-onboard/mew-wallet": "^2.0.2-alpha.1",
72-
"@web3-onboard/portis": "^2.1.5-alpha.1",
73-
"@web3-onboard/sequence": "^2.0.6-alpha.1",
74-
"@web3-onboard/taho": "^2.0.2-alpha.1",
75-
"@web3-onboard/torus": "^2.2.3-alpha.1",
76-
"@web3-onboard/transaction-preview": "^2.0.6-alpha.1",
77-
"@web3-onboard/trezor": "^2.3.5-alpha.1",
78-
"@web3-onboard/trust": "^2.0.2-alpha.1",
79-
"@web3-onboard/uauth": "^2.0.3-alpha.1",
80-
"@web3-onboard/walletconnect": "^2.3.5-alpha.1",
81-
"@web3-onboard/web3auth": "^2.2.1-alpha.1",
82-
"@web3-onboard/xdefi": "^2.0.2-alpha.1",
59+
"@web3-onboard/coinbase": "^2.2.2",
60+
"@web3-onboard/core": "^2.17.0-alpha.1",
61+
"@web3-onboard/dcent": "^2.2.5",
62+
"@web3-onboard/enkrypt": "^2.0.2",
63+
"@web3-onboard/fortmatic": "^2.0.17",
64+
"@web3-onboard/gas": "^2.1.6",
65+
"@web3-onboard/gnosis": "^2.1.8",
66+
"@web3-onboard/infinity-wallet": "^2.0.2",
67+
"@web3-onboard/injected-wallets": "^2.8.5-alpha.1",
68+
"@web3-onboard/keepkey": "^2.3.5",
69+
"@web3-onboard/keystone": "^2.3.5",
70+
"@web3-onboard/ledger": "^2.4.4",
71+
"@web3-onboard/magic": "^2.1.5",
72+
"@web3-onboard/mew-wallet": "^2.0.2",
73+
"@web3-onboard/portis": "^2.1.5",
74+
"@web3-onboard/sequence": "^2.0.6",
75+
"@web3-onboard/taho": "^2.0.2",
76+
"@web3-onboard/torus": "^2.2.3",
77+
"@web3-onboard/transaction-preview": "^2.0.6",
78+
"@web3-onboard/trezor": "^2.4.0-alpha.1",
79+
"@web3-onboard/trust": "^2.0.2",
80+
"@web3-onboard/uauth": "^2.0.3",
81+
"@web3-onboard/walletconnect": "^2.3.6-alpha.1",
82+
"@web3-onboard/web3auth": "^2.2.1",
83+
"@web3-onboard/xdefi": "^2.0.2",
8384
"animejs": "^3.2.1",
8485
"bnc-sdk": "^4.6.6",
8586
"ethers": "^5.7.0"
118 KB
Loading
200 KB
Loading
124 KB
Loading

docs/src/routes/docs/[...3]modules/core.md

Lines changed: 42 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
import notifyCustomImg from '$lib/assets/notify-custom-example.png'
44
import notifyImg from '$lib/assets/notify-example.png'
55
import notifyPreflightImg from '$lib/assets/notify-preflight-example.png'
6+
import customConnect1 from '$lib/assets/custom-connect-1.png'
7+
import customConnect2 from '$lib/assets/custom-connect-2.png'
8+
import customConnectDefault from '$lib/assets/custom-connect-default.png'
69
</script>
710

811
# Core
@@ -229,11 +232,10 @@ type ConnectModalOptions = {
229232
*/
230233
wheresMyWalletLink?: string
231234
/**
232-
* Define support for Unstoppable Domains resolutions
233-
* after a user connects. Similar to ens, uns can be used for users who
234-
* have minted an Unstoppable Domain and associated it with their wallet.
235-
* ENS resolution takes precedent over UNS
236-
* Defaults to false
235+
* @deprecated Has no effect unless `@web3-onboard/unstoppable-resolution`
236+
* package has been added and passed into the web3-onboard initialization
237+
* In this case remove the `@web3-onboard/unstoppable-resolution` package
238+
* to remove unstoppableDomain resolution support
237239
*/
238240
disableUDResolution?: boolean
239241
}
@@ -253,6 +255,29 @@ type i18nOptions = Record<Locale, i18n>
253255
To see a list of all of the text values that can be internationalized or replaced, check out the [default en file](https://github.com/blocknative/web3-onboard/blob/develop/packages/core/src/i18n/en.json).
254256
Onboard is using the [ICU syntax](https://formatjs.io/docs/core-concepts/icu-syntax/) for formatting under the hood.
255257
258+
For example, to update the connect interface language for Metamask, while giving a different message for other wallets, you can include the following:
259+
260+
```typescript
261+
i18n: {
262+
en: {
263+
connect: {
264+
connectingWallet: {
265+
paragraph: "{wallet, select, MetaMask {{wallet} can only present one account, so connect just the one account you want.} other {Please connect to all of your accounts in {wallet}.}}"
266+
}
267+
}
268+
}
269+
}
270+
```
271+
272+
MetaMask message:
273+
<img src="{customConnect2}" alt="Web3-Onboard connect wallet modal with custom message"/>
274+
275+
All other wallets:
276+
<img src="{customConnect1}" alt="Web3-Onboard connect wallet modal with custom message"/>
277+
278+
Default Message- with no i18n override:
279+
<img src="{customConnectDefault}" alt="Web3-Onboard connect wallet modal with default message"/>
280+
256281
---
257282
258283
#### theme
@@ -429,7 +454,8 @@ unsubscribe()
429454
```
430455

431456
##### **Notifications as Toast Messages**
432-
The Notifications messages can also be used to send fully customized Dapp toast messages and updated. Check out the [customNotifications API docs for examples and code snippets](#customnotification)
457+
458+
The Notifications messages can also be used to send fully customized Dapp toast messages and updated. Check out the [customNotifications API docs for examples and code snippets](#customnotification)
433459

434460
```ts
435461
type NotifyOptions = {
@@ -640,6 +666,7 @@ const onboard = Onboard({
640666
```
641667

642668
---
669+
643670
## Connecting a Wallet
644671

645672
To initiate a user to select and connect a wallet you can call the `connectWallet` function on an initialized Onboard instance. It will return a `Promise` that will resolve when the user either successfully connects a wallet, or when they dismiss the UI. The resolved value from the promise will be the latest state of the `wallets` array. The order of the wallets array is last to first, so the most recently selected wallet will be the first item in the array and can be thought of as the "primary wallet". If no wallet was selected, then the `wallets` array will have the same state as it had before calling `connectWallet`.
@@ -1016,7 +1043,7 @@ The `customNotification` method also returns a `dismiss` method that is called w
10161043

10171044
#### **preflightNotifications**
10181045

1019-
Notify can be used to deliver standard notifications along with preflight updates by passing a `PreflightNotificationsOptions` object to the `preflightNotifications` API action.
1046+
Notify can be used to deliver standard notifications along with preflight updates by passing a `PreflightNotificationsOptions` object to the `preflightNotifications` API action.
10201047

10211048
<img src="{notifyPreflightImg}" alt="Preflight notifications image"/>
10221049

@@ -1033,6 +1060,7 @@ Preflight event types include:
10331060
This API call will return a promise that resolves to the transaction hash (if `sendTransaction` resolves the transaction hash and is successful), the internal notification id (if no `sendTransaction` function is provided) or return nothing if an error occurs or `sendTransaction` is not provided or doesn't resolve to a string.
10341061

10351062
Example:
1063+
10361064
```typescript copy
10371065
const balanceValue = Object.values(balance)[0]
10381066
// if using ethers v6 this is:
@@ -1483,7 +1511,7 @@ module.exports = function override(config) {
14831511

14841512
Add the following dev dependencies:
14851513

1486-
`yarn add rollup-plugin-polyfill-node -D`
1514+
`yarn add rollup-plugin-polyfill-node crypto-browserify stream-browserify assert -D`
14871515

14881516
Then add the following to your `svelte.config.js` file:
14891517

@@ -1544,11 +1572,11 @@ export default config
15441572

15451573
### SvelteKit + Vite
15461574

1547-
Checkout a boilerplate example (here)[https://github.com/blocknative/web3-onboard/tree/develop/examples/with-sveltekit]
1575+
Checkout a boilerplate example [here](https://github.com/blocknative/web3-onboard/tree/develop/examples/with-sveltekit)
15481576

15491577
Add the following dev dependencies:
15501578

1551-
`yarn add rollup-plugin-polyfill-node -D`
1579+
`yarn add rollup-plugin-polyfill-node crypto-browserify stream-browserify assert -D`
15521580

15531581
Then add the following to your `svelte.config.js` file:
15541582

@@ -1657,11 +1685,11 @@ See [this github issue](https://github.com/blocknative/web3-onboard/issues/1568#
16571685

16581686
### Vite
16591687

1660-
Checkout a boilerplate example for Vite-React (here)[https://github.com/blocknative/web3-onboard/tree/develop/examples/with-vite-react]
1688+
Checkout a boilerplate example for Vite-React [here](https://github.com/blocknative/web3-onboard/tree/develop/examples/with-vite-react)
16611689

16621690
Add the following dev dependencies:
16631691

1664-
`npm i --save-dev rollup-plugin-polyfill-node`
1692+
`npm i --save-dev rollup-plugin-polyfill-node crypto-browserify stream-browserify assert`
16651693

16661694
Then add the following to your `vite.config.js` file:
16671695

@@ -1732,9 +1760,9 @@ build: {
17321760

17331761
### Next.js
17341762

1735-
Checkout a boilerplate example for NextJS v13 (here)[https://github.com/blocknative/web3-onboard/tree/develop/examples/with-nextjs-13]
1763+
Checkout a boilerplate example for NextJS v13 [here](https://github.com/blocknative/web3-onboard/tree/develop/examples/with-nextjs-13)
17361764

1737-
Checkout a boilerplate example for NextJS (here)[https://github.com/blocknative/web3-onboard/tree/develop/examples/with-nextjs]
1765+
Checkout a boilerplate example for NextJS [here](https://github.com/blocknative/web3-onboard/tree/develop/examples/with-nextjs)
17381766

17391767
:::admonition type=note
17401768

docs/src/routes/docs/[...3]modules/react.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -589,7 +589,7 @@ module.exports = function override(config) {
589589

590590
Add the following dev dependencies:
591591

592-
`npm i --save-dev rollup-plugin-polyfill-node`
592+
`npm i --save-dev rollup-plugin-polyfill-node crypto-browserify stream-browserify assert`
593593

594594
Then add the following to your `vite.config.js` file:
595595

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Unstoppable Domains Resolution
2+
3+
A module to add Unstoppable Domain resolution to web3-onboard.
4+
5+
### Install
6+
7+
<Tabs values={['yarn', 'npm']}>
8+
<TabPanel value="yarn">
9+
10+
```sh copy
11+
yarn add @web3-onboard/unstoppable-resolution
12+
```
13+
14+
</TabPanel>
15+
<TabPanel value="npm">
16+
17+
```sh copy
18+
npm install @web3-onboard/unstoppable-resolution
19+
```
20+
21+
</TabPanel>
22+
</Tabs>
23+
24+
### Standalone Setup
25+
26+
```typescript
27+
import Onboard from '@web3-onboard/core'
28+
import unstoppableResolution from '@web3-onboard/unstoppable-resolution'
29+
30+
const onboard = Onboard({
31+
// ... other Onboard options
32+
unstoppableResolution
33+
})
34+
```
35+
36+
## Build Environments
37+
38+
For build env configurations and setups please see the Build Env section [here](/docs/modules/core#build-environments)

docs/src/routes/docs/[...3]modules/vue.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,7 @@ module.exports = {
449449

450450
Add the following dev dependencies:
451451

452-
`npm i --save-dev rollup-plugin-polyfill-node`
452+
`npm i --save-dev rollup-plugin-polyfill-node crypto-browserify stream-browserify assert`
453453

454454
Then add the following to your `vite.config.js` file:
455455

docs/src/routes/docs/[...4]wallets/injected.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -313,6 +313,7 @@ const injected = injectedModule({
313313
- DeFiWallet - _Desktop & Mobile_
314314
- ApexWallet - _Desktop_
315315
- BifrostWallet - _Desktop & Mobile_
316+
- Safeheron - _Desktop_
316317

317318
## Build Environments
318319

0 commit comments

Comments
 (0)