Skip to content

Commit 9ad8feb

Browse files
authored
Merge branch 'develop' into feature/arcana-auth
2 parents 8f9fccf + dbddeb8 commit 9ad8feb

File tree

87 files changed

+1538
-498
lines changed

Some content is hidden

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

87 files changed

+1538
-498
lines changed

.circleci/config.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -399,6 +399,10 @@ jobs:
399399
docker:
400400
- image: cimg/node:16.13.1
401401
working_directory: ~/web3-onboard-monorepo/packages/arcana-auth
402+
build-blocto:
403+
docker:
404+
- image: cimg/node:16.13.1
405+
working_directory: ~/web3-onboard-monorepo/packages/blocto
402406
steps:
403407
- node-build-steps
404408
build-venly:
@@ -641,6 +645,10 @@ jobs:
641645
docker:
642646
- image: cimg/node:16.13.1
643647
working_directory: ~/web3-onboard-monorepo/packages/arcana-auth
648+
build-staging-blocto:
649+
docker:
650+
- image: cimg/node:16.13.1
651+
working_directory: ~/web3-onboard-monorepo/packages/blocto
644652
steps:
645653
- node-staging-build-steps
646654
build-staging-venly:
@@ -887,6 +895,12 @@ workflows:
887895
<<: *deploy_production_filters
888896
- build-staging-arcana-auth:
889897
<<: *deploy_staging_filters
898+
blocto:
899+
jobs:
900+
- build-blocto:
901+
<<: *deploy_production_filters
902+
- build-staging-blocto:
903+
<<: *deploy_staging_filters
890904
venly:
891905
jobs:
892906
- build-venly:

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ For full documentation, check out the README.md for each package or the [docs pa
105105
- [XDEFI](packages/xdefi/README.md)
106106
- [Infinity Wallet](packages/infinity-wallet/README.md)
107107
- [Frame](packages/frame/README.md)
108+
- [Blocto](packages/blocto/README.md)
108109

109110
**Hardware Wallets**
110111

docs/package.json

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
"format": "prettier --plugin-search-dir . --write .",
1313
"prepare": "svelte-kit sync",
1414
"test": "playwright test",
15-
"w3o-latest-prod": "yarn add '@web3-onboard/core' '@web3-onboard/coinbase' '@web3-onboard/transaction-preview' '@web3-onboard/dcent' '@web3-onboard/frontier' '@web3-onboard/fortmatic' '@web3-onboard/frame' '@web3-onboard/gas' '@web3-onboard/gnosis' '@web3-onboard/keepkey' '@web3-onboard/keystone' '@web3-onboard/ledger' '@web3-onboard/infinity-wallet' '@web3-onboard/injected-wallets' '@web3-onboard/magic' '@web3-onboard/phantom' '@web3-onboard/portis' '@web3-onboard/sequence' '@web3-onboard/trezor' '@web3-onboard/trust' '@web3-onboard/torus' '@web3-onboard/taho' '@web3-onboard/web3auth' '@web3-onboard/walletconnect' '@web3-onboard/enkrypt' '@web3-onboard/mew-wallet' '@web3-onboard/xdefi' '@web3-onboard/uauth' '@web3-onboard/zeal' '@web3-onboard/cede-store'",
16-
"w3o-latest-alpha": "yarn add '@web3-onboard/core@next' '@web3-onboard/coinbase@next' '@web3-onboard/transaction-preview@next' '@web3-onboard/dcent@next' '@web3-onboard/frontier@next' '@web3-onboard/fortmatic@next' '@web3-onboard/frame@next' '@web3-onboard/gas@next' '@web3-onboard/gnosis@next' '@web3-onboard/keepkey@next' '@web3-onboard/keystone@next' '@web3-onboard/ledger@next' '@web3-onboard/infinity-wallet@next' '@web3-onboard/injected-wallets@next' '@web3-onboard/magic@next' '@web3-onboard/phantom@next' '@web3-onboard/portis@next' '@web3-onboard/sequence@next' '@web3-onboard/trezor@next' '@web3-onboard/trust@next' '@web3-onboard/torus@next' '@web3-onboard/taho@next' '@web3-onboard/web3auth@next' '@web3-onboard/walletconnect@next' '@web3-onboard/enkrypt@next' '@web3-onboard/mew-wallet@next' '@web3-onboard/xdefi@next' '@web3-onboard/uauth@next' '@web3-onboard/zeal@next' '@web3-onboard/cede-store@next'"
15+
"w3o-latest-prod": "yarn add '@web3-onboard/core' '@web3-onboard/coinbase' '@web3-onboard/transaction-preview' '@web3-onboard/dcent' '@web3-onboard/frontier' '@web3-onboard/fortmatic' '@web3-onboard/frame' '@web3-onboard/gas' '@web3-onboard/gnosis' '@web3-onboard/keepkey' '@web3-onboard/keystone' '@web3-onboard/ledger' '@web3-onboard/infinity-wallet' '@web3-onboard/injected-wallets' '@web3-onboard/magic' '@web3-onboard/phantom' '@web3-onboard/portis' '@web3-onboard/sequence' '@web3-onboard/trezor' '@web3-onboard/trust' '@web3-onboard/torus' '@web3-onboard/taho' '@web3-onboard/web3auth' '@web3-onboard/walletconnect' '@web3-onboard/enkrypt' '@web3-onboard/mew-wallet' '@web3-onboard/xdefi' '@web3-onboard/uauth' '@web3-onboard/zeal' '@web3-onboard/cede-store' '@web3-onboard/blocto'",
16+
"w3o-latest-alpha": "yarn add '@web3-onboard/core@next' '@web3-onboard/coinbase@next' '@web3-onboard/transaction-preview@next' '@web3-onboard/dcent@next' '@web3-onboard/frontier@next' '@web3-onboard/fortmatic@next' '@web3-onboard/frame@next' '@web3-onboard/gas@next' '@web3-onboard/gnosis@next' '@web3-onboard/keepkey@next' '@web3-onboard/keystone@next' '@web3-onboard/ledger@next' '@web3-onboard/infinity-wallet@next' '@web3-onboard/injected-wallets@next' '@web3-onboard/magic@next' '@web3-onboard/phantom@next' '@web3-onboard/portis@next' '@web3-onboard/sequence@next' '@web3-onboard/trezor@next' '@web3-onboard/trust@next' '@web3-onboard/torus@next' '@web3-onboard/taho@next' '@web3-onboard/web3auth@next' '@web3-onboard/walletconnect@next' '@web3-onboard/enkrypt@next' '@web3-onboard/mew-wallet@next' '@web3-onboard/xdefi@next' '@web3-onboard/uauth@next' '@web3-onboard/zeal@next' '@web3-onboard/cede-store@next' '@web3-onboard/blocto@next'"
1717
},
1818
"devDependencies": {
1919
"@algolia/client-search": "^4.17.0",
@@ -50,9 +50,10 @@
5050
"type": "module",
5151
"dependencies": {
5252
"@web3-onboard/arcana-auth": "^2.0.0-alpha.1",
53+
"@web3-onboard/blocto": "^2.0.0-alpha.1",
5354
"@web3-onboard/cede-store": "^2.0.2",
5455
"@web3-onboard/coinbase": "^2.2.4",
55-
"@web3-onboard/core": "^2.20.0-alpha.1",
56+
"@web3-onboard/core": "^2.20.2-alpha.1",
5657
"@web3-onboard/dcent": "^2.2.7",
5758
"@web3-onboard/enkrypt": "^2.0.4",
5859
"@web3-onboard/fortmatic": "^2.0.19",
@@ -61,7 +62,7 @@
6162
"@web3-onboard/gas": "^2.1.8",
6263
"@web3-onboard/gnosis": "^2.1.10",
6364
"@web3-onboard/infinity-wallet": "^2.0.4",
64-
"@web3-onboard/injected-wallets": "^2.9.0",
65+
"@web3-onboard/injected-wallets": "^2.10.1-alpha.1",
6566
"@web3-onboard/keepkey": "^2.3.7",
6667
"@web3-onboard/keystone": "^2.3.7",
6768
"@web3-onboard/ledger": "^2.4.6",
@@ -76,8 +77,8 @@
7677
"@web3-onboard/trezor": "^2.4.2",
7778
"@web3-onboard/trust": "^2.0.4",
7879
"@web3-onboard/uauth": "^2.0.5",
79-
"@web3-onboard/venly": "^2.0.0-alpha.1",
80-
"@web3-onboard/walletconnect": "^2.3.8",
80+
"@web3-onboard/venly": "^2.0.0",
81+
"@web3-onboard/walletconnect": "^2.3.9",
8182
"@web3-onboard/web3auth": "^2.2.3",
8283
"@web3-onboard/xdefi": "^2.0.4",
8384
"@web3-onboard/zeal": "^2.0.4",

docs/src/app.html

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,14 @@
1818

1919
%sveltekit.head%
2020

21-
<!-- Global site tag (gtag.js) - Google Analytics -->
22-
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-121780722-2"></script>
21+
<!-- Google tag (gtag.js) -->
22+
<script async src="https://www.googletagmanager.com/gtag/js?id=G-WQ8M55VX1Z"></script>
23+
<script>
24+
window.dataLayer = window.dataLayer || [];
25+
function gtag(){dataLayer.push(arguments);}
26+
gtag('js', new Date());
27+
gtag('config', 'G-WQ8M55VX1Z');
28+
</script>
2329
</head>
2430
<body data-sveltekit-preload-data="hover">
2531
<div style="display: contents">%sveltekit.body%</div>

docs/src/lib/services/onboard.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ const intiOnboard = async (theme) => {
5454
const { default: cedeModule } = await import('@web3-onboard/cede-store')
5555
const { default: frameModule } = await import('@web3-onboard/frame')
5656
const { default: arcanaModule } = await import('@web3-onboard/arcana-auth')
57+
const { default: bloctoModule } = await import('@web3-onboard/blocto')
5758
const { default: venlyModule } = await import('@web3-onboard/venly')
5859
const INFURA_ID = '8b60d52405694345a99bcb82e722e0af'
5960

@@ -112,6 +113,7 @@ const intiOnboard = async (theme) => {
112113

113114
const frame = frameModule()
114115

116+
const blocto = bloctoModule()
115117
const venly = venlyModule({
116118
clientId: 'blocknative',
117119
environment: 'staging'
@@ -143,6 +145,7 @@ const intiOnboard = async (theme) => {
143145
portis,
144146
frame,
145147
infinityWallet,
148+
blocto
146149
// venly
147150
],
148151
chains: [

docs/src/routes/docs/[...1]overview/[...1]introduction/+page.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,7 @@ We recommend you add the [Core Repo](../../modules/core.md#install) and consider
157157
- [Portis](../../wallets/portis.md#install)
158158
- [Web3Auth](../../wallets/web3auth.md#install)
159159
- [Frame](../../wallets/frame.md#install)
160+
- [Blocto](../../docs/wallets/blocto.md#install)
160161

161162
**Hardware Wallets**
162163

docs/src/routes/docs/[...3]modules/[...1]core/+page.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,18 @@ type RecommendedInjectedWallets = {
223223
}
224224
```
225225
226+
**`updateAppMetadata`**
227+
228+
If you need to update your Application Metadata after initialization, you can call the `updateAppMetadata` function with the new configuration
229+
230+
```typescript
231+
onboard.state.actions.updateAppMetadata({
232+
logo: `<svg width="100%" height="100%" viewBox="0 0 12 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M0 0L0.0100002 6L4 10L0.0100002 14.01L0 20H12V14L8 10L12 6.01V0H0ZM10 14.5V18H2V14.5L6 10.5L10 14.5Z" fill="#929BED"/>
233+
</svg>`,
234+
description: 'Updated Description!'
235+
})
236+
```
237+
226238
---
227239
228240
#### connect

docs/src/routes/docs/[...4]wallets/[...9]injected/+page.md renamed to docs/src/routes/docs/[...4]wallets/[...10]injected/+page.md

Lines changed: 28 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,12 @@ const equal = {
153153
provider: window.ethereum
154154
}),
155155
// A list of platforms that this wallet supports
156-
platforms: ['desktop']
156+
platforms: ['desktop'],
157+
/**
158+
* A Url to link users to a download page for the wallet
159+
* to be shown if not installed or available on the browser
160+
*/
161+
externalUrl: 'http://www.CoolEqualWalletDownload.com'
157162
}
158163

159164
const injected = injectedModule({
@@ -172,17 +177,22 @@ You may want to display injected wallets that are not currently available to the
172177

173178
```javascript
174179
const injected = injectedModule({
175-
displayUnavailable: true
180+
// display all unavailable injected wallets
181+
displayUnavailable: true,
182+
||
183+
// display specific unavailable wallets
184+
displayUnavailable: [ProviderLabel.MetaMask, ProviderLabel.Trust]
176185
})
177186
```
178187

179-
This will render every injected wallet as regardless of whether it has been detected in the window, happy days.
180-
Then the issue of the order of wallets displayed becomes apparent when you have 21 injected wallets at the top of the wallets list. To solve this, all injected wallets are sorted alphabetically by default and there is an additional `sort` parameter which receives the final list of wallets and then returns the list to be rendered. This allows for example setting MetaMask and Coinbase first and then just the rest alphabetically:
188+
This can be set to an array top specify which unavailable injected wallets to show or set to true to display all unavailable injected wallets regardless of whether it has been detected in the window, happy days.
189+
Then the issue of the order of wallets displayed becomes apparent when you have 21 injected wallets at the top of the wallets list. To solve this, all injected wallets are sorted **alphabetically** by default and there is an additional `sort` parameter which receives the final list of wallets and then returns the list to be rendered. This allows for example setting MetaMask and Coinbase first and then just the rest alphabetically:
181190

182191
```javascript
183192
const injected = injectedModule({
184-
// display all wallets even if they are unavailable
185-
displayUnavailable: true,
193+
// display specific injected wallets even if they are unavailable
194+
// can also be set to `true` to display all unavailable injected wallets
195+
displayUnavailable: [ProviderLabel.MetaMask, ProviderLabel.Trust],
186196
// do a manual sort of injected wallets so that MetaMask and Coinbase are ordered first
187197
sort: (wallets) => {
188198
const metaMask = wallets.find(({ label }) => label === ProviderLabel.MetaMask)
@@ -203,11 +213,12 @@ const injected = injectedModule({
203213
})
204214
```
205215

206-
You may want to display all wallets, but filter out specific wallets based on their availability. For example I may want to display all unavailable wallets except when Binance and Bitski wallet is unavailable, then don't show them, but if they are available, then do show them. To do this, the filters value has been extended to have a new value: `'unavailable'`, as in; remove this wallet if it is unavailable, even though `displayUnavailable` wallets is set:
216+
You may want to display all unavailable injected wallets, but filter out specific wallets based on their availability. For example I may want to display all unavailable wallets except when Binance and Bitski wallet is unavailable, then don't show them, but if they are available, then do show them. To do this, the filters value has been extended to have a new value: `'unavailable'`, as in; remove this wallet if it is unavailable, even though `displayUnavailable` wallets is set:
207217

208218
```javascript
209219
const injected = injectedModule({
210-
// display all wallets even if they are unavailable
220+
// display specific injected wallets even if they are unavailable
221+
// can also be set to `true` to display all unavailable injected wallets
211222
displayUnavailable: true,
212223
// but only show Binance and Bitski wallet if they are available
213224
filter: {
@@ -234,15 +245,16 @@ const injected = injectedModule({
234245
})
235246
```
236247

237-
If a wallet is selected, but is not available the default error message is: `Please install or enable ${walletName} to continue`. You may want to customise that message, so there is the `walletUnavailableMessage` parameter which is a function that takes the wallet object that is unavailable and returns a string which is the message to display:
248+
If a wallet is selected, but is not available the default error message is: `Oops ${wallet.label} is unavailable! Please <a href="${wallet.externalUrl}" target="_blank">install</a>` if a download link is available for that wallet. If there isn't a download link for that wallet the default is: `Please install or enable ${walletName} to continue`. You may want to customize that message, so there is the `walletUnavailableMessage` parameter which is a function that takes the wallet object that is unavailable and returns a string which is the message to display:
238249

239250
```javascript
240251
const injected = injectedModule({
241252
custom: [
242253
// include custom (not natively supported) injected wallet modules here
243254
],
244-
// display all wallets even if they are unavailable
245-
displayUnavailable: true,
255+
// display specific injected wallets even if they are unavailable
256+
// can also be set to `true` to display all unavailable injected wallets
257+
displayUnavailable: [ProviderLabel.MetaMask, ProviderLabel.Trust],
246258
// but only show Binance and Bitski wallet if they are available
247259
filter: {
248260
[ProviderLabel.Binance]: 'unavailable',
@@ -265,7 +277,10 @@ const injected = injectedModule({
265277
.filter((wallet) => wallet)
266278
)
267279
},
268-
walletUnavailableMessage: (wallet) => `Oops ${wallet.label} is unavailable!`
280+
walletUnavailableMessage: (wallet) =>
281+
wallet.externalUrl
282+
? `Oops ${wallet.label} is unavailable! Please <a href="${wallet.externalUrl}" target="_blank">install</a>`
283+
: `Oops ${wallet.label} is unavailable!`
269284
})
270285
```
271286

@@ -319,6 +334,7 @@ const injected = injectedModule({
319334
- BifrostWallet - _Desktop & Mobile_
320335
- Safeheron - _Desktop_
321336
- Talisman - _Desktop_
337+
- OneKey - _Desktop & Mobile_
322338

323339
## Build Environments
324340

File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)