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

Fix: Bump packages with WC deps to latest (Ledger, Uauth, WC) #1807

Merged
merged 1 commit into from
Jul 5, 2023
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
12 changes: 6 additions & 6 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@
},
"type": "module",
"dependencies": {
"@web3-onboard/blocto": "^2.0.0-alpha.1",
"@web3-onboard/blocto": "^2.0.0",
"@web3-onboard/cede-store": "^2.0.2",
"@web3-onboard/coinbase": "^2.2.4",
"@web3-onboard/core": "^2.20.4-alpha.1",
"@web3-onboard/core": "^2.20.4",
"@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.5.0-alpha.1",
"@web3-onboard/ledger": "^2.5.1-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.5-alpha.1",
"@web3-onboard/taho": "^2.0.5",
"@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.1.0-alpha.1",
"@web3-onboard/uauth": "^2.1.1-alpha.1",
"@web3-onboard/venly": "^2.0.0",
"@web3-onboard/walletconnect": "^2.4.0-alpha.2",
"@web3-onboard/walletconnect": "^2.4.1-alpha.1",
"@web3-onboard/web3auth": "^2.2.3",
"@web3-onboard/xdefi": "^2.0.4",
"@web3-onboard/zeal": "^2.0.4",
Expand Down
13 changes: 9 additions & 4 deletions docs/src/app.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,15 @@
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-WQ8M55VX1Z"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-WQ8M55VX1Z');
window.dataLayer = window.dataLayer || []
function gtag() {
dataLayer.push(arguments)
}
gtag('js', new Date())
gtag('config', 'G-WQ8M55VX1Z')
</script>
<script>
var global = global || window
</script>
</head>
<body data-sveltekit-preload-data="hover">
Expand Down
6 changes: 1 addition & 5 deletions docs/src/lib/services/onboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,8 @@ const intiOnboard = async (theme) => {
const coinbase = coinbaseModule()
const dcent = dcentModule()
const walletConnect = walletConnectModule({
connectFirstChainId: true,
version: 2,
projectId: 'f6bd6e2911b56f5ac3bc8b2d0e2d7ad5',
qrcodeModalOptions: {
mobileLinks: ['rainbow', 'metamask', 'argent', 'trust', 'imtoken', 'pillar']
}
projectId: 'f6bd6e2911b56f5ac3bc8b2d0e2d7ad5'
})
const ledger = ledgerModule({ projectId: 'f6bd6e2911b56f5ac3bc8b2d0e2d7ad5' })
const keystone = keystoneModule()
Expand Down
3 changes: 3 additions & 0 deletions docs/vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ const config = {
include: [
'@web3-onboard/core',
'@web3-onboard/gas',
'@web3-onboard/ledger',
'@web3-onboard/uauth',
'@web3-onboard/walletconnect',
'@web3-onboard/sequence',
'js-sha3',
'@ethersproject/bignumber'
Expand Down
42 changes: 21 additions & 21 deletions docs/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4480,7 +4480,7 @@
"@walletconnect/window-getters" "^1.0.1"
tslib "1.14.1"

"@web3-onboard/blocto@^2.0.0-alpha.1":
"@web3-onboard/blocto@^2.0.0":
version "2.0.0"
resolved "https://registry.yarnpkg.com/@web3-onboard/blocto/-/blocto-2.0.0.tgz#eb631e911b7c13ad11089bb3574e97b673f14463"
integrity sha512-99/YzRuE9VBXWVLI6tAKxwFvCXq7WV24a3rM76yY5yVEEeNfewh8PWQ/2Yfz71Vfi6YWVPKzGo3LHspz4caTzA==
Expand Down Expand Up @@ -4513,10 +4513,10 @@
ethers "5.5.4"
joi "17.9.1"

"@web3-onboard/core@^2.20.4-alpha.1":
version "2.20.4-alpha.1"
resolved "https://registry.yarnpkg.com/@web3-onboard/core/-/core-2.20.4-alpha.1.tgz#fb28c5fb68af989a9ef96fa05376de58e7c03af8"
integrity sha512-B4NPf2zSIry+wKTBDlN+gKfaAFSqQ8jYJ7V9un7llGXwllc6Zf91GiIUYecluk8UaanogYGRrTMR0njTPIsN0w==
"@web3-onboard/core@^2.20.4":
version "2.20.4"
resolved "https://registry.yarnpkg.com/@web3-onboard/core/-/core-2.20.4.tgz#ccc9ff509e56720e526b4ceae5459a1f2a435d22"
integrity sha512-IFI3DVq5QgFj5w1TyL61gHmeOlkX8AJiBAARO3cd4zW8I3h9K2+7HeE7LbsfwefZYLILzXCfF0gMB3qRN/GWYQ==
dependencies:
"@web3-onboard/common" "^2.3.3"
bignumber.js "^9.0.0"
Expand Down Expand Up @@ -4641,10 +4641,10 @@
"@web3-onboard/common" "^2.3.3"
"@web3-onboard/hw-common" "^2.3.0"

"@web3-onboard/ledger@^2.5.0-alpha.1":
version "2.5.0-alpha.1"
resolved "https://registry.yarnpkg.com/@web3-onboard/ledger/-/ledger-2.5.0-alpha.1.tgz#3552a580f15bcb9c037f27e88b70a9d60a83faec"
integrity sha512-l53egi5Ncy0hFG1Nij+toLm/3OjL+PTyyuigHdnHcey8R8fVBdaYIRKSpilMyuN0/luSk/ttSGL+5lBK8rurlw==
"@web3-onboard/ledger@^2.5.0":
version "2.5.0"
resolved "https://registry.yarnpkg.com/@web3-onboard/ledger/-/ledger-2.5.0.tgz#0ed29ece757706caa88a352ef33e63f9b2a0fedb"
integrity sha512-hMgQk/mX+/Ed6T18eEBPy3i8QgN9JYr2brplWRssRLX+pTGtic57CchkxvLRpgm4Qpz5YQyX3IuyoIILwfUjzA==
dependencies:
"@ledgerhq/connect-kit-loader" "^1.1.0"
"@walletconnect/client" "^1.8.0"
Expand Down Expand Up @@ -4694,10 +4694,10 @@
"0xsequence" "^0.43.1"
"@web3-onboard/common" "^2.3.3"

"@web3-onboard/taho@^2.0.5-alpha.1":
version "2.0.5-alpha.1"
resolved "https://registry.yarnpkg.com/@web3-onboard/taho/-/taho-2.0.5-alpha.1.tgz#ae0306a17a0426253fe706e7d0df393e40959f03"
integrity sha512-6ErW3+d7H1LD3rlABHYCReBhM84a33+axNWkPZONYcdd3zgfyTlmPKMi1JWYpX89hbK1y09f+yAX73bTP3/UAA==
"@web3-onboard/taho@^2.0.5":
version "2.0.5"
resolved "https://registry.yarnpkg.com/@web3-onboard/taho/-/taho-2.0.5.tgz#899d147c234d61e1fb81045fc7339182c230c632"
integrity sha512-Z5n2UMumLNppOlDgYM9MhrM+YGyz8Emouaf7htH8l4B2r/meV4F3Wkgol2xYuwwu5SJyPaJH2GxNeh/EAfyBxg==
dependencies:
"@web3-onboard/common" "^2.3.3"
tallyho-detect-provider "^1.0.0"
Expand Down Expand Up @@ -4746,10 +4746,10 @@
dependencies:
"@web3-onboard/common" "^2.3.3"

"@web3-onboard/uauth@^2.1.0-alpha.1":
version "2.1.0-alpha.1"
resolved "https://registry.yarnpkg.com/@web3-onboard/uauth/-/uauth-2.1.0-alpha.1.tgz#1c666c4e0537ab36c90f0fc442b10ed0fe6d7109"
integrity sha512-q0FuDPaRNKI/G3yLFVBgWwnqkhjr0a2pRBAd0p97RMbk/pJ3fAKUZaYTWN3UQ1eTDMQcnOaGtw3MOGX5GNpyhg==
"@web3-onboard/uauth@^2.1.0":
version "2.1.0"
resolved "https://registry.yarnpkg.com/@web3-onboard/uauth/-/uauth-2.1.0.tgz#f17dcad227e5ee57e12c539873ce3c7680968e9e"
integrity sha512-havy9Kj3sJs/q1EYSKRujaXr0StWQF3zYM9nBkynOVycQyOCcb12w//hceVnBNEf9GjVNXO9j5ssz8fSzMmSHw==
dependencies:
"@ethersproject/providers" "^5.5.0"
"@uauth/js" "^2.4.0"
Expand All @@ -4769,10 +4769,10 @@
"@venly/web3-provider" "^3.1.1"
"@web3-onboard/common" "^2.3.1"

"@web3-onboard/walletconnect@^2.4.0-alpha.2":
version "2.4.0-alpha.2"
resolved "https://registry.yarnpkg.com/@web3-onboard/walletconnect/-/walletconnect-2.4.0-alpha.2.tgz#8c959c51194b8703bb174075feb5874e115cea6d"
integrity sha512-qyDZT4iw7EQrk7HLi+G9LMON13Z//w+ipQFH0NHZPuLVaQ/w6oS7HD+bFQHYsC9Xn7XMrE/sGRCw8wEX3de4ZA==
"@web3-onboard/walletconnect@^2.4.0":
version "2.4.0"
resolved "https://registry.yarnpkg.com/@web3-onboard/walletconnect/-/walletconnect-2.4.0.tgz#fe446706cde736ca629c56c190bc9b314eaa70b3"
integrity sha512-Qu3uHWsumOedHDzwqOoUrA40rNO0C6Sgw62XeIxSC+JsIB2K4Y5rXhTbMeYtO0lmWmHA8DYXxk8czYkdMZh19Q==
dependencies:
"@ethersproject/providers" "5.5.0"
"@walletconnect/client" "^1.8.0"
Expand Down
6 changes: 3 additions & 3 deletions packages/demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"@web3-onboard/injected-wallets": "^2.10.1",
"@web3-onboard/keepkey": "^2.3.7",
"@web3-onboard/keystone": "^2.3.7",
"@web3-onboard/ledger": "^2.5.0",
"@web3-onboard/ledger": "^2.5.1-alpha.1",
"@web3-onboard/magic": "^2.1.6",
"@web3-onboard/mew-wallet": "^2.0.3",
"@web3-onboard/phantom": "^2.0.3-alpha.1",
Expand All @@ -50,9 +50,9 @@
"@web3-onboard/transaction-preview": "^2.0.7",
"@web3-onboard/trezor": "^2.4.2",
"@web3-onboard/trust": "^2.0.3",
"@web3-onboard/uauth": "^2.1.0",
"@web3-onboard/uauth": "^2.1.1-alpha.1",
"@web3-onboard/venly": "^2.0.0",
"@web3-onboard/walletconnect": "^2.4.0",
"@web3-onboard/walletconnect": "^2.4.1-alpha.1",
"@web3-onboard/web3auth": "^2.2.2",
"@web3-onboard/xdefi": "^2.0.3",
"@web3-onboard/zeal": "^2.0.3",
Expand Down
1 change: 0 additions & 1 deletion packages/demo/src/App.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@
const walletConnect = walletConnectModule({
handleUri: uri => console.log(uri),
projectId: 'f6bd6e2911b56f5ac3bc8b2d0e2d7ad5',
requiredChains:[1, 56]
})
const portis = portisModule({
apiKey: 'b2b7586f-2b1e-4c30-a7fb-c2d1533b153b'
Expand Down
7 changes: 4 additions & 3 deletions packages/ledger/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@web3-onboard/ledger",
"version": "2.5.0",
"version": "2.5.1-alpha.1",
"description": "Ledger hardware wallet module for connecting to Web3-Onboard. 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 @@ -59,10 +59,11 @@
"typescript": "^4.5.5"
},
"dependencies": {
"@ethersproject/providers": "5.5.0",
"@ledgerhq/connect-kit-loader": "^1.1.0",
"@walletconnect/client": "^1.8.0",
"@walletconnect/ethereum-provider": "2.8.4",
"@walletconnect/modal":"2.5.4",
"@walletconnect/ethereum-provider": "2.8.6",
"@walletconnect/modal": "2.5.9",
"@web3-onboard/common": "^2.3.3",
"rxjs": "^7.5.2"
}
Expand Down
4 changes: 2 additions & 2 deletions packages/ledger/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { WalletInit } from '@web3-onboard/common'
import v1 from './v1'
import v2 from './v2'
import v1 from './v1.js'
import v2 from './v2.js'

export type LedgerOptionsWCv1 = {
/**
Expand Down
35 changes: 17 additions & 18 deletions packages/ledger/src/v2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,9 @@ import {
Chain,
WalletInit,
EIP1193Provider,
ProviderAccounts,
createEIP1193Provider
ProviderAccounts
} from '@web3-onboard/common'
import type {
EthereumProvider as LedgerEthereumProvider
} from '@ledgerhq/connect-kit-loader'
import type { EthereumProvider as LedgerEthereumProvider } from '@ledgerhq/connect-kit-loader'
import { isHexString, LedgerOptionsWCv2 } from './index.js'
import type { JQueryStyleEventEmitter } from 'rxjs/internal/observable/fromEvent'

Expand Down Expand Up @@ -45,17 +42,16 @@ function ledger(options?: LedgerOptionsWCv2): WalletInit {
}

// accept both hex and decimal chain ids
const requiredChains = options?.requiredChains?.map((id) => (
(typeof id === 'string' && isHexString(id))
const requiredChains = options?.requiredChains?.map(id =>
typeof id === 'string' && isHexString(id)
? parseInt(id, 16)
: id as number
))

const optionalMethods =
options.optionalMethods && Array.isArray(options.optionalMethods)
? [...options.optionalMethods, ...defaultOptionalMethods]
: defaultOptionalMethods
: (id as number)
)

const optionalMethods =
options.optionalMethods && Array.isArray(options.optionalMethods)
? [...options.optionalMethods, ...defaultOptionalMethods]
: defaultOptionalMethods

const checkSupportResult = connectKit.checkSupport({
providerType: SupportedProviders.Ethereum,
Expand All @@ -72,17 +68,18 @@ function ledger(options?: LedgerOptionsWCv2): WalletInit {
.reduce((rpcMap: Record<number, string>, { id, rpcUrl }) => {
rpcMap[parseInt(id, 16)] = rpcUrl || ''
return rpcMap
}, {}),
}, {})
})

// get the provider instance, it can be either the Ledger Extension
// or WalletConnect
const instance = (await connectKit.getProvider()) as LedgerEthereumProvider
const instance =
(await connectKit.getProvider()) as LedgerEthereumProvider

// return the Ledger Extension provider
if (
checkSupportResult.providerImplementation ===
SupportedProviderImplementations.LedgerConnect
SupportedProviderImplementations.LedgerConnect
) {
return {
provider: instance
Expand All @@ -98,7 +95,9 @@ function ledger(options?: LedgerOptionsWCv2): WalletInit {
const { Subject, fromEvent } = await import('rxjs')
const { takeUntil, take } = await import('rxjs/operators')

const connector = instance as unknown as InstanceType<typeof EthereumProvider>
const connector = instance as unknown as InstanceType<
typeof EthereumProvider
>
const emitter = new EventEmitter()

class EthProvider {
Expand Down
6 changes: 3 additions & 3 deletions packages/uauth/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@web3-onboard/uauth",
"version": "2.1.0",
"version": "2.1.1-alpha.1",
"description": "Unstoppable Domains 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 @@ -65,8 +65,8 @@
"@uauth/js": "^2.4.0",
"@ethersproject/providers": "^5.5.0",
"@walletconnect/client": "^1.8.0",
"@walletconnect/ethereum-provider": "2.8.4",
"@walletconnect/modal": "2.5.5",
"@walletconnect/ethereum-provider": "2.8.6",
"@walletconnect/modal": "2.5.9",
"@walletconnect/qrcode-modal": "^1.8.0",
"@web3-onboard/common": "^2.3.3",
"joi": "17.9.1",
Expand Down
8 changes: 4 additions & 4 deletions packages/walletconnect/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@web3-onboard/walletconnect",
"version": "2.4.0",
"version": "2.4.1-alpha.1",
"description": "WalletConnect SDK 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 @@ -56,13 +56,13 @@
"license": "MIT",
"devDependencies": {
"typescript": "^4.5.5",
"@walletconnect/types": "^2.7.0"
"@walletconnect/types": "^2.8.6"
},
"dependencies": {
"@ethersproject/providers": "5.5.0",
"@walletconnect/client": "^1.8.0",
"@walletconnect/ethereum-provider": "2.8.4",
"@walletconnect/modal":"2.5.5",
"@walletconnect/ethereum-provider": "2.8.6",
"@walletconnect/modal":"2.5.9",
"@walletconnect/qrcode-modal": "^1.8.0",
"@web3-onboard/common": "^2.3.3",
"rxjs": "^7.5.2"
Expand Down
Loading