Skip to content

Commit 79e2757

Browse files
authored
Merge pull request #1846 from blocknative/release/2.24.5
Release 2.24.5
2 parents a9e91d2 + 346b6d6 commit 79e2757

File tree

30 files changed

+671
-332
lines changed

30 files changed

+671
-332
lines changed

docs/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,13 @@
5050
"type": "module",
5151
"dependencies": {
5252
"@web3-onboard/blocto": "^2.0.0",
53-
"@web3-onboard/cede-store": "^2.0.2",
53+
"@web3-onboard/cede-store": "^2.1.0-alpha.1",
5454
"@web3-onboard/coinbase": "^2.2.5-alpha.1",
55-
"@web3-onboard/core": "^2.20.4",
55+
"@web3-onboard/core": "^2.20.5-alpha.1",
5656
"@web3-onboard/dcent": "^2.2.7",
5757
"@web3-onboard/enkrypt": "^2.0.4",
5858
"@web3-onboard/fortmatic": "^2.0.19",
59-
"@web3-onboard/frame": "^2.0.1",
59+
"@web3-onboard/frame": "^2.0.2-alpha.1",
6060
"@web3-onboard/frontier": "^2.0.4",
6161
"@web3-onboard/gas": "^2.1.8",
6262
"@web3-onboard/gnosis": "^2.1.10",

docs/src/lib/services/onboard.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ const intiOnboard = async (theme) => {
115115
})
116116

117117
return Onboard({
118+
connect: { autoConnectAllPreviousWallet: true },
118119
wallets: [
119120
injected,
120121
walletConnect,

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,9 +282,15 @@ type ConnectModalOptions = {
282282
*/
283283
wheresMyWalletLink?: string
284284
/**
285-
* Hide the where is my wallet link notice displayed in the connect modal
285+
* Hide the "Where is my wallet?" link notice displayed in the connect modal
286+
* at the bottom of the wallets list
286287
*/
287288
removeWhereIsMyWalletWarning?: boolean
289+
/**
290+
* Hide the "I don't have a wallet" link displayed
291+
* on the left panel of the connect modal
292+
*/
293+
removeIDontHaveAWalletInfoLink?: boolean
288294
/**
289295
* @deprecated Has no effect unless `@web3-onboard/unstoppable-resolution`
290296
* package has been added and passed into the web3-onboard initialization

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -335,6 +335,7 @@ const injected = injectedModule({
335335
- Safeheron - _Desktop_
336336
- Talisman - _Desktop_
337337
- OneKey - _Desktop & Mobile_
338+
- Fordefi - _Desktop_
338339

339340
## Build Environments
340341

docs/yarn.lock

Lines changed: 246 additions & 167 deletions
Large diffs are not rendered by default.

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-monorepo",
3-
"version": "2.24.4",
3+
"version": "2.24.5",
44
"private": true,
55
"workspaces": {
66
"packages": [

packages/cede-store/README.md

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,16 @@ console.log(connectedWallets)
3131

3232
## Vault management
3333

34-
Vaults allow creating bundles of CEX accounts. The extension connects with CEX through CEX API keys and everything is stored in the Local Storage of the browser, on a mobile or on a Ledger (more coming soon...). We can compare Vaults with the [Keyring concept](https://www.wispwisp.com/index.php/2020/12/25/how-metamask-stores-your-wallet-secret/) of Metamask.
34+
Vaults allow creating bundles of CEX accounts. The extension connects with CEX through CEX API keys and everything is stored in the Local Storage of the browser. Mobile and Ledger storage are coming soon.
35+
We can compare Vaults with the [Keyring concept](https://www.wispwisp.com/index.php/2020/12/25/how-metamask-stores-your-wallet-secret/) of
36+
Metamask.
3537

36-
A user can have multiple vaults with different CEX accounts inside.
37-
This system allows the user to give a dApp custom access to his accounts depending on the degree of trust he has in the dApp in question.
38+
A user can have multiple vaults with different CEX accounts inside. This system allows the user to give a dApp custom
39+
access to his accounts depending on the degree of trust he has in the dApp in question.
3840

39-
Let's say the user has three vaults: a main one with full access (track, trade, withdraw) to all his CEX, one just for tracking and one just for trading.
40-
If the user does not know the reputation of the dApp he is using, the most logical solution would be to give access
41-
only to the tracking vault so the dApp will not be able to initiate trade requests.
41+
Let's say the user has three vaults: a main one with full access (track, trade, withdraw) to all his CEX, one just for
42+
tracking and one just for trading. If the user does not know the reputation of the dApp he is using, the most logical
43+
solution would be to give access only to the tracking vault so the dApp will not be able to initiate trade requests.
4244

4345
## CEX connection
4446

@@ -47,17 +49,19 @@ All requests are divided into two categories:
4749
- private requests
4850
- public requests
4951

50-
All public data, such as prices, volumes, historical data are collected from different exchanges and
51-
provided with our API.
52+
All public data, such as prices, volumes, historical data are collected from different exchanges and streamed in real
53+
time through our API.
5254

53-
All private requests, such as user balances, trades, open positions are coming from cede.store (from the user's machine).
55+
All private requests, such as user balances, trades, open positions are coming from cede.store (from the user's
56+
machine).
5457

55-
You can access both public and private data through the extension's API. cede.store handles all exchanges requests, as well as API keys secure storage.
58+
You can access both public and private data through the extension's API. Cede.store handles all exchanges requests, as
59+
well as API keys secure storage.
5660

5761
## Example of a workflow (fetch user's balances and transactions)
5862

5963
```typescript
60-
// get available vaults and accounts
64+
// Get available vaults and accounts
6165
const { vaultPreview } = provider.getVaultPreviews()
6266
console.log(vaultPreview)
6367

packages/cede-store/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/cede-store",
3-
"version": "2.0.2",
3+
"version": "2.1.0",
44
"description": "cede.store 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",
@@ -69,7 +69,7 @@
6969
"window": "^4.2.7"
7070
},
7171
"dependencies": {
72-
"@cedelabs/providers": "^0.0.7",
72+
"@cedelabs/providers": "^1.1.0",
7373
"@web3-onboard/common": "^2.3.3"
7474
}
7575
}

packages/cede-store/src/index.ts

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
import { detectCedeProvider } from '@cedelabs/providers'
1+
import { CedeProvider, detectCedeProvider } from '@cedelabs/providers'
22
import type { WalletInit } from '@web3-onboard/common'
33
import { createEIP1193Provider } from '@web3-onboard/common'
4-
import { CustomWindow } from './types'
5-
declare const window: CustomWindow
4+
5+
type CustomWindow = typeof window & {
6+
cede: CedeProvider
7+
}
68

79
function cedeStoreWallet(): WalletInit {
810
if (typeof window === 'undefined') return () => null
@@ -12,7 +14,7 @@ function cedeStoreWallet(): WalletInit {
1214
checkProviderIdentity: () => (window as CustomWindow).cede,
1315
getIcon: async () => (await import('./icon.js')).default,
1416
getInterface: async () => {
15-
const provider: any = await detectCedeProvider()
17+
const provider = await detectCedeProvider()
1618
if (!provider) {
1719
window.open('https://cede.store', '_blank')
1820
throw new Error('Please, install cede.store to use this wallet')
@@ -24,24 +26,24 @@ function cedeStoreWallet(): WalletInit {
2426
})
2527

2628
return Promise.resolve({
27-
provider: createEIP1193Provider(window.cede, {
28-
eth_requestAccounts: async ({ baseRequest }) => {
29-
const accounts = (await baseRequest({
29+
provider: createEIP1193Provider(provider, {
30+
eth_requestAccounts: async () => {
31+
const accounts = await provider.request({
3032
method: 'connect'
31-
})) as any[]
33+
})
3234

3335
if (!accounts.length) {
3436
return []
3537
}
3638

3739
const activeVault = accounts.find(account => account.isActive)
3840

39-
return [activeVault?.name || accounts[0].name] as string[]
41+
return [activeVault?.name || accounts[0].name]
4042
},
4143
eth_chainId: () => Promise.resolve('0x1'), // cede.store doesn't support chains, but we have to provide a value to complete the connection
4244
wallet_switchEthereumChain: null,
4345
wallet_addEthereumChain: null,
44-
eth_getBalance: null,
46+
eth_getBalance: () => Promise.resolve('0x0'),
4547
eth_selectAccounts: null
4648
})
4749
})

packages/cede-store/src/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
import type { ExternalProvider } from '@ethersproject/providers'
22
export interface CustomWindow extends Window {
33
cede: ExternalProvider
4-
}
4+
}

packages/core/README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,9 +248,15 @@ type ConnectModalOptions = {
248248
*/
249249
wheresMyWalletLink?: string
250250
/**
251-
* Hide the where is my wallet link notice displayed in the connect modal
251+
* Hide the "Where is my wallet?" link notice displayed in the connect modal
252+
* at the bottom of the wallets list
252253
*/
253254
removeWhereIsMyWalletWarning?: boolean
255+
/**
256+
* Hide the "I don't have a wallet" link displayed
257+
* on the left panel of the connect modal
258+
*/
259+
removeIDontHaveAWalletInfoLink?: boolean
254260
/**
255261
* @deprecated Has no effect unless `@web3-onboard/unstoppable-resolution`
256262
* package has been added and passed into the web3-onboard initialization

packages/core/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/core",
3-
"version": "2.20.4",
3+
"version": "2.20.5",
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",

packages/core/src/types.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,9 +244,15 @@ export type ConnectModalOptions = {
244244
*/
245245
wheresMyWalletLink?: string
246246
/**
247-
* Hide the where is my wallet link notice displayed in the connect modal
247+
* Hide the "Where is my wallet?" link notice displayed in the connect modal
248+
* at the bottom of the wallets list
248249
*/
249250
removeWhereIsMyWalletWarning?: boolean
251+
/**
252+
* Hide the "I don't have a wallet" link displayed
253+
* on the left panel of the connect modal
254+
*/
255+
removeIDontHaveAWalletInfoLink?: boolean
250256
/**
251257
* @deprecated Has no effect unless `@web3-onboard/unstoppable-resolution`
252258
* package has been added and passed into the web3-onboard initialization

packages/core/src/validation.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,7 @@ const connectModalOptions = Joi.object({
203203
iDontHaveAWalletLink: Joi.string(),
204204
wheresMyWalletLink: Joi.string(),
205205
removeWhereIsMyWalletWarning: Joi.boolean(),
206+
removeIDontHaveAWalletInfoLink: Joi.boolean(),
206207
disableUDResolution: Joi.boolean()
207208
})
208209

0 commit comments

Comments
 (0)