Skip to content

Commit

Permalink
Remove named imports for web3auth packages in "@everipedia/iq-login".
Browse files Browse the repository at this point in the history
  • Loading branch information
Royal-lobster committed Sep 3, 2024
1 parent 36f3275 commit 3454344
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 6 deletions.
5 changes: 5 additions & 0 deletions .changeset/tidy-lies-draw.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@everipedia/iq-login": patch
---

removes named imports for web3auth packages
18 changes: 12 additions & 6 deletions src/lib/integrations/web3-auth-connector.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
import type { Wallet } from '@rainbow-me/rainbowkit'
import { WALLET_ADAPTERS } from '@web3auth/base'
import ethProvider from '@web3auth/ethereum-provider'
import { Web3Auth } from '@web3auth/modal'
import { WalletServicesPlugin } from '@web3auth/wallet-services-plugin'
import { Web3AuthConnector } from '@web3auth/web3auth-wagmi-connector'
import basePackage from '@web3auth/base'
import ethProviderPackage from '@web3auth/ethereum-provider'
import modalPackage from '@web3auth/modal'
import walletServicesPluginPackage from '@web3auth/wallet-services-plugin'
import web3AuthWagmiConnectorPackage from '@web3auth/web3auth-wagmi-connector'
import type { Chain } from 'viem'
import { createConnector } from 'wagmi'

const { WALLET_ADAPTERS } = basePackage
const { EthereumPrivateKeyProvider } = ethProviderPackage
const { Web3Auth } = modalPackage
const { WalletServicesPlugin } = walletServicesPluginPackage
const { Web3AuthConnector } = web3AuthWagmiConnectorPackage

if (!process.env.NEXT_PUBLIC_WEB3_AUTH_CLIENT_ID) {
throw new Error('NEXT_PUBLIC_WEB3_AUTH_CLIENT_ID is not set')
}
Expand All @@ -28,7 +34,7 @@ export const rainbowWeb3AuthConnector = ({
blockExplorerUrl: chain.blockExplorers?.default.url[0] as string,
}

const privateKeyProvider = new ethProvider.EthereumPrivateKeyProvider({
const privateKeyProvider = new EthereumPrivateKeyProvider({
config: { chainConfig },
})

Expand Down

0 comments on commit 3454344

Please sign in to comment.