Skip to content

Commit

Permalink
feat: upgrate to WCv2 according to Ledger migration guide
Browse files Browse the repository at this point in the history
  • Loading branch information
alfetopito committed Dec 12, 2023
1 parent 19ce803 commit b91281b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions libs/wallet/src/web3-react/connectors/LedgerConnector.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { Web3Provider, ExternalProvider } from '@ethersproject/providers'
import { ExternalProvider, Web3Provider } from '@ethersproject/providers'
import { Actions, Connector, Provider, RequestArguments } from '@web3-react/types'

import { LedgerConnectKit, SupportedProviders } from '@ledgerhq/connect-kit-loader'
import { WC_PROJECT_ID } from '../../constants'

type LedgerProvider = Provider & {
connected: () => boolean
Expand Down Expand Up @@ -81,9 +82,11 @@ export class Ledger extends Connector {

connectKit.checkSupport({
providerType: SupportedProviders.Ethereum,
walletConnectVersion: 2,
projectId: WC_PROJECT_ID,
chainId: this.options.chainId,
infuraId: this.options.infuraId,
rpc: this.options.rpc,
rpcMap: this.options.rpc,
})
}

Expand Down

0 comments on commit b91281b

Please sign in to comment.