Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 2.24.2 #1798

Merged
merged 35 commits into from
Jun 29, 2023
Merged
Show file tree
Hide file tree
Changes from 32 commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
5f2b2ce
Merge pull request #1768 from blocknative/release/2.23.2
Adamj1232 Jun 9, 2023
9491ca7
Merge pull request #1767 from blocknative/release/2.23.2
Adamj1232 Jun 9, 2023
478ad48
update Google Analytics Script (#1770)
leightkt Jun 12, 2023
bf2600f
feat: add OneKey wallet (#1739)
ByteZhang1024 Jun 12, 2023
d399e0b
Fix: Connect view on safari mobile & Remove unnecessary validation ch…
Adamj1232 Jun 13, 2023
348dcbf
feat: add blocto wallet (#1699)
sanyu1225 Jun 14, 2023
193b510
Release 2.24.1 (develop) (#1776)
leightkt Jun 15, 2023
895e056
Release 2.24.1 (docs) (#1778)
leightkt Jun 15, 2023
b8aeb4a
Update +page.md (#1775)
finessevanes Jun 15, 2023
dbddeb8
Feature- update appMetadata (#1779)
leightkt Jun 16, 2023
77e498f
Upgrade wallet connect v2 packages (#1788)
leightkt Jun 27, 2023
25a4c4e
Release 2.24.2 (develop) (#1791)
leightkt Jun 27, 2023
346bdba
Release 2.24.2 (docs) (#1792)
leightkt Jun 27, 2023
67fd651
Changed width and height of taho and tallyho svg to 100% to remedy ho…
jenkruk Jun 28, 2023
5846eb5
feat: Ledger connector with support for WalletConnect v2 (#1549)
hlopes-ledger Jun 28, 2023
dcf2f7d
Update: WalletConnect - v1 deprecation + additional init options (#1795)
Adamj1232 Jun 28, 2023
1d9b1d5
Fix: Ledger Walletconnect v2 handling and build (#1797)
Adamj1232 Jun 28, 2023
f96165d
Update: Uauth - walletconnect v1 deprecation handling (#1796)
Adamj1232 Jun 28, 2023
85a664c
Remove alpha flags for release
Adamj1232 Jun 29, 2023
c913729
Merge in main
Adamj1232 Jun 29, 2023
d5e08da
Bump semver from 7.3.7 to 7.5.3 in /examples/with-sveltekit (#1790)
dependabot[bot] Jun 29, 2023
7cc819c
Bump vite from 3.1.8 to 3.2.7 in /examples/with-vite-react (#1760)
dependabot[bot] Jun 29, 2023
0a42c88
Bump vite from 4.0.4 to 4.0.5 in /examples/with-vuejs-v2 (#1759)
dependabot[bot] Jun 29, 2023
b38ed75
Bump vite from 4.0.4 to 4.0.5 in /examples/with-vuejs (#1758)
dependabot[bot] Jun 29, 2023
8a9d655
Merge in docs and handle conflicts
Adamj1232 Jun 29, 2023
246373c
Merge in all and handle conflicts
Adamj1232 Jun 29, 2023
a734637
Merge branch 'develop' into release/2.24.2
Adamj1232 Jun 29, 2023
9753a37
Update UAuth in docs
Adamj1232 Jun 29, 2023
a2e0197
Bump semver from 7.3.7 to 7.5.3 in /examples/with-vuejs (#1789)
dependabot[bot] Jun 29, 2023
71cb735
Bump vite from 4.0.4 to 4.0.5 in /examples/with-sveltekit (#1756)
dependabot[bot] Jun 29, 2023
bda3475
fix: Add option to hide the where is my wallet notice (#1786)
usame-algan Jun 29, 2023
53cf91f
Merge in latest develop
Adamj1232 Jun 29, 2023
4ed48b7
Update packages/demo/package.json
Adamj1232 Jun 29, 2023
83108e7
Update to removeWhereIsMyWalletWarning api var
Adamj1232 Jun 29, 2023
da67b95
Merge branches 'release/2.24.2' and 'release/2.24.2' of github.com:bl…
Adamj1232 Jun 29, 2023
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
10 changes: 5 additions & 5 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
"@web3-onboard/blocto": "^2.0.0-alpha.1",
"@web3-onboard/cede-store": "^2.0.2",
"@web3-onboard/coinbase": "^2.2.4",
"@web3-onboard/core": "^2.20.3-alpha.1",
"@web3-onboard/core": "^2.20.4-alpha.1",
"@web3-onboard/dcent": "^2.2.7",
"@web3-onboard/enkrypt": "^2.0.4",
"@web3-onboard/fortmatic": "^2.0.19",
Expand All @@ -64,20 +64,20 @@
"@web3-onboard/injected-wallets": "^2.10.1",
"@web3-onboard/keepkey": "^2.3.7",
"@web3-onboard/keystone": "^2.3.7",
"@web3-onboard/ledger": "^2.4.6",
"@web3-onboard/ledger": "^2.5.0-alpha.1",
"@web3-onboard/magic": "^2.1.7",
"@web3-onboard/mew-wallet": "^2.0.4",
"@web3-onboard/phantom": "^2.0.2",
"@web3-onboard/portis": "^2.1.7",
"@web3-onboard/sequence": "^2.0.8",
"@web3-onboard/taho": "^2.0.4",
"@web3-onboard/taho": "^2.0.5-alpha.1",
"@web3-onboard/torus": "^2.2.5",
"@web3-onboard/transaction-preview": "^2.0.8",
"@web3-onboard/trezor": "^2.4.2",
"@web3-onboard/trust": "^2.0.4",
"@web3-onboard/uauth": "^2.0.5",
"@web3-onboard/uauth": "^2.1.0-alpha.1",
"@web3-onboard/venly": "^2.0.0",
"@web3-onboard/walletconnect": "^2.3.9",
"@web3-onboard/walletconnect": "^2.4.0-alpha.2",
"@web3-onboard/web3auth": "^2.2.3",
"@web3-onboard/xdefi": "^2.0.4",
"@web3-onboard/zeal": "^2.0.4",
Expand Down
5 changes: 3 additions & 2 deletions docs/src/lib/services/onboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ const intiOnboard = async (theme) => {
mobileLinks: ['rainbow', 'metamask', 'argent', 'trust', 'imtoken', 'pillar']
}
})
const ledger = ledgerModule()
const ledger = ledgerModule({ projectId: 'f6bd6e2911b56f5ac3bc8b2d0e2d7ad5' })
const keystone = keystoneModule()
const keepkey = keepkeyModule()
const gnosis = gnosisModule()
Expand Down Expand Up @@ -99,7 +99,8 @@ const intiOnboard = async (theme) => {
const uauthOptions = {
clientID: 'a25c3a65-a1f2-46cc-a515-a46fe7acb78c',
redirectUri: 'http://localhost:8080/',
scope: 'openid wallet email:optional humanity_check:optional profile:optional social:optional'
scope: 'openid wallet email:optional humanity_check:optional profile:optional social:optional',
walletConnectProjectId: 'f6bd6e2911b56f5ac3bc8b2d0e2d7ad5'
}
const uauth = uauthModule(uauthOptions)

Expand Down
6 changes: 6 additions & 0 deletions docs/src/routes/docs/[...3]modules/[...1]core/+page.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ This is the core package that contains all of the UI and logic to be able to sea

:::admonition type="tip"
_note: Release 2.24.0 moves the default position of the account center from topRight to bottomRight. To reset your application to topRight, include the following when initializing onboard:_

```typescript
accountCenter: {
desktop: {
Expand All @@ -31,6 +32,7 @@ _note: Release 2.24.0 moves the default position of the account center from topR
}
}
```

:::

## Install
Expand Down Expand Up @@ -279,6 +281,10 @@ type ConnectModalOptions = {
* Defaults to `https://www.blocknative.com/blog/metamask-wont-connect-web3-wallet-troubleshooting`
*/
wheresMyWalletLink?: string
/**
* Hide the where is my wallet link notice displayed in the connect modal
*/
hideWhereIsMyWallet?: boolean
/**
* @deprecated Has no effect unless `@web3-onboard/unstoppable-resolution`
* package has been added and passed into the web3-onboard initialization
Expand Down
45 changes: 43 additions & 2 deletions docs/src/routes/docs/[...4]wallets/[...13]ledger/+page.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,44 @@ npm install @web3-onboard/core @web3-onboard/ledger
## Options

```typescript
interface LedgerOptions {
type LedgerOptionsWCv1 = {
/**
* @deprecated
* Version 1 of WalletConnect has been deprecated by the WC team and the WC bridge is not available.
* To use version 1 a custom bridge url will need to be provided.
* Support will be completely remove from Web3-Onboard in the future
*/
walletConnectVersion?: 1
enableDebugLogs?: boolean
chainId?: number
bridge?: string
infuraId?: string
rpc?: { [chainId: number]: string }
}

type LedgerOptionsWCv2 = {
walletConnectVersion: 2
enableDebugLogs?: boolean
/**
* Project ID associated with [WalletConnect account](https://cloud.walletconnect.com)
*/
projectId: string
/**
* List of Optional Chain(s) ID for wallets to support in number format (integer or hex)
* Defaults to the chains provided within the web3-onboard init chain property
*/
requiredChains?: string[] | number[]
requiredMethods?: string[]
/**
* Additional methods to be added to the default list of ['eth_sendTransaction', 'eth_signTransaction', 'personal_sign', 'eth_sign', 'eth_signTypedData', 'eth_signTypedData_v4']
* Passed methods to be included along with the defaults methods - see https://docs.walletconnect.com/2.0/web/walletConnectModal/options
*/
optionalMethods?: string[]
requiredEvents?: string[]
optionalEvents?: string[]
}

type LedgerOptions = LedgerOptionsWCv1 | LedgerOptionsWCv2
```

## Usage
Expand All @@ -42,7 +74,16 @@ interface LedgerOptions {
import Onboard from '@web3-onboard/core'
import ledgerModule from '@web3-onboard/ledger'

const ledger = ledgerModule()
const ledger = ledgerModule({
/**
* Project ID associated with [WalletConnect account](https://cloud.walletconnect.com)
*/
projectId: 'abc123...',
/**
* Chains required to be supported by all wallets connecting to your DApp
*/
requiredChains: [1, 137]
})

const onboard = Onboard({
// ... other Onboard options
Expand Down
69 changes: 50 additions & 19 deletions docs/src/routes/docs/[...4]wallets/[...23]uauth/+page.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,49 @@ Follow the [Login Client Congifuration Docs](https://docs.unstoppabledomains.com

```typescript
type UauthInitOptions = {
clientID: string // required and will throw an error if not included: links dapp to Unstoppable Domains for customization
redirectUri: string // required and will throw an error if not included: used for pop-up and callback redirection
scope?: string // default = 'openid wallet'
shouldLoginWithRedirect?: boolean // if true, redirects to your callback page
bridge?: string // default = 'https://bridge.walletconnect.org'
qrcodeModalOptions?: {
mobileLinks: string[] // set the order and list of mobile linking wallets
}
connectFirstChainId?: boolean // if true, connects to the first network chain provided
/**
* Required and will throw an error if not included: links dapp to Unstoppable Domains for customization
*/
clientID: string
/**
* Required and will throw an error if not included: used for pop-up and callback redirection
*/
redirectUri: string
/**
* Optional string: Default = 'openid wallet'
*/
scope?: string
/**
* Optional boolean: If true, redirects to your callback page
*/
shouldLoginWithRedirect?: boolean
/**
* Project ID associated with [WalletConnect account](https://cloud.walletconnect.com)
*/
walletConnectProjectId: string
/**
* Defaults to version: 2
*/
version?: 2
/**
* List of Required Chain(s) ID for wallets to support in number format (integer or hex)
* Defaults to [1] - Ethereum
*/
requiredChains?: number[] | undefined
/**
* List of Optional Chain(s) ID for wallets to support in number format (integer or hex)
* Defaults to the chains provided within the web3-onboard init chain property
*/
optionalChains?: number[] | undefined
/**
* Additional methods to be added to the default list of ['eth_sendTransaction', 'eth_signTransaction', 'personal_sign', 'eth_sign', 'eth_signTypedData', 'eth_signTypedData_v4']
* Passed methods to be included along with the defaults methods - see https://docs.walletconnect.com/2.0/web/walletConnectModal/options
*/
additionalOptionalMethods?: string[] | undefined
/**
* Optional function to handle WalletConnect URI when it becomes available
*/
handleUri?: (uri: string) => Promise<unknown>
}
```

Expand All @@ -52,21 +86,18 @@ import uauthModule from '@web3-onboard/uauth'

// initialize the module with options
const uauth = uauthModule({
clientID: 'YOUR_CLIENT_ID',
redirectUri: 'YOUR_REDIRECT_URI',
scope?: 'YOUR_SCOPES',
shouldLoginWithRedirect?: false
bridge?: 'YOUR_CUSTOM_BRIDGE_SERVER',
qrcodeModalOptions?: {
mobileLinks: ['rainbow', 'metamask', 'argent', 'trust', 'imtoken', 'pillar']
},
connectFirstChainId?: true
clientID: 'a25c3a65-a1f2-46cc-a515-a46fe7acb78c',
walletConnectProjectId: 'f6bd6e2911b56f5ac3bc8b2d0e2d7ad5',
redirectUri: 'http://localhost:8080/',
scope:
'openid wallet email:optional humanity_check:optional profile:optional social:optional'
})

// can also initialize with basic options...
// const uauth = uauthModule({
// clientID: "YOUR_CLIENT_ID",
// redirectUri: "YOUR_REDIRECT_URI"
// redirectUri: "YOUR_REDIRECT_URI",
// walletConnectProjectId: 'f6bd6e2911b56f5ac3bc8b2d0e2d7ad5',
// })

const onboard = Onboard({
Expand Down
60 changes: 32 additions & 28 deletions docs/src/routes/docs/[...4]wallets/[...24]walletconnect/+page.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ title: WalletConnect
Wallet module for connecting WalletConnect to web3-onboard, currently supporting both v1 and v2.

:::admonition type=warning
_Not all Wallets support WalletConnect V2 currently. For an up to date list please see the [WalletConnect Explorer](https://explorer.walletconnect.com/?version=2)_
_Version 1 of WalletConnect has been deprecated by the WC team and the WC bridge is not available. Upgrading to use WalletConnect v2 is recommended. Support will be completely removed from Web3-Onboard in the future_
:::

## Install
Expand All @@ -33,42 +33,59 @@ npm install @web3-onboard/walletconnect

```typescript
type WalletConnectOptions = {
bridge?: string // default = 'https://bridge.walletconnect.org'
qrcodeModalOptions?: {
mobileLinks: string[] // set the order and list of mobile linking wallets
}
connectFirstChainId?: boolean // if true, connects to the first network chain provided
/**
* Optional function to handle WalletConnect URI when it becomes available
*/
handleUri?: (uri: string) => Promise<unknown>
} & (
| {
/**
* Defaults to version: 1 - this behavior will be deprecated after the WalletConnect v1 sunset
* @deprecated
* Version 1 of WalletConnect has been deprecated by the WC team and the WC bridge is not available.
* To use version 1 a custom bridge url will need to be provided.
* Support will be completely remove from Web3-Onboard in the future
*/
version?: 1
version: 1
/**
* Custom URL Bridge must be defined for V1 usage.
* WalletConnect no longer supports a v1 bridge.
* Upgrading to use WalletConnect v2 is recommended.
* A potential bridge can be found here: 'https://derelay.rabby.io'
*/
bridge: string
connectFirstChainId?: boolean
qrcodeModalOptions?: {
mobileLinks: string[]
}
}
| {
/**
* Project ID associated with [WalletConnect account](https://cloud.walletconnect.com)
*/
projectId: string
/**
* Defaults to version: 1 - this behavior will be deprecated after the WalletConnect v1 sunset
* Defaults to version: 2
*/
version: 2
version?: 2
/**
* List of Required Chain(s) ID for wallets to support in number format (integer or hex)
* Defaults to [1] - Ethereum
* The chains defined within the web3-onboard config will define the
* optional chains for the WalletConnect module
*/
requiredChains?: number[] | undefined
/**
* List of Optional Chain(s) ID for wallets to support in number format (integer or hex)
* Defaults to the chains provided within the web3-onboard init chain property
*/
optionalChains?: number[] | undefined
/**
* `undefined` by default, see https://docs.walletconnect.com/2.0/web/walletConnectModal/options
*/
qrModalOptions?: EthereumProviderOptions['qrModalOptions']
/**
* Additional methods to be added to the default list of ['eth_sendTransaction', 'eth_signTransaction', 'personal_sign', 'eth_sign', 'eth_signTypedData', 'eth_signTypedData_v4']
* Passed methods to be included along with the defaults methods - see https://docs.walletconnect.com/2.0/web/walletConnectModal/options
*/
additionalOptionalMethods?: string[] | undefined
}
)
```
Expand All @@ -79,36 +96,23 @@ type WalletConnectOptions = {
import Onboard from '@web3-onboard/core'
import walletConnectModule from '@web3-onboard/walletconnect'

const wcV1InitOptions = {
bridge: 'YOUR_CUSTOM_BRIDGE_SERVER',
qrcodeModalOptions: {
mobileLinks: ['metamask', 'argent', 'trust']
},
connectFirstChainId: true
}

const wcV2InitOptions = {
version: 2,
/**
* Project ID associated with [WalletConnect account](https://cloud.walletconnect.com)
*/
projectId: 'abc123...',
/**
* Optional function to handle WalletConnect URI when it becomes available
*/
handleUri: (uri) => console.log(uri),
/**
* Chains required to be supported by all wallets connecting to your DApp
*/
requiredChains: [1, 56]
}

// initialize the module with options
// If version isn't set it will default to V1 until V1 sunset
const walletConnect = walletConnectModule(wcV2InitOptions || wcV1InitOptions)
// If version isn't set it will default to V2 - V1 support will be completely removed shortly as it is deprecated
const walletConnect = walletConnectModule(wcV2InitOptions)

// can also initialize with no options...
// Defaults to V1 until V1 sunset
// Defaults to V2 - V1 support will be completely removed shortly as it is deprecated
// const walletConnect = walletConnectModule()

const onboard = Onboard({
Expand Down
Loading