-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Dylan DesRosier
committed
Jun 26, 2023
1 parent
824bca3
commit 5b52d4f
Showing
9 changed files
with
1,275 additions
and
485 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
import { connectorsForWallets, Wallet } from '@rainbow-me/rainbowkit' | ||
import { | ||
injectedWallet, | ||
rainbowWallet, | ||
walletConnectWallet, | ||
argentWallet, | ||
coinbaseWallet, | ||
ledgerWallet, | ||
metaMaskWallet, | ||
tahoWallet, | ||
trustWallet, | ||
zerionWallet | ||
} from '@rainbow-me/rainbowkit/wallets' | ||
import { Connector, Chain } from 'wagmi' | ||
|
||
const WALLETS = Object.freeze({ | ||
metamask: metaMaskWallet, | ||
walletconnect: walletConnectWallet, | ||
rainbow: rainbowWallet, | ||
injected: injectedWallet, | ||
argent: argentWallet, | ||
coinbase: coinbaseWallet, | ||
ledger: ledgerWallet, | ||
taho: tahoWallet, | ||
trust: trustWallet, | ||
zerion: zerionWallet | ||
}) | ||
|
||
export const getWalletConnectors = (chains: Chain[]): (() => Connector[]) => { | ||
const projectId = process.env.NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID | ||
const appName = 'PoolTogether' | ||
const walletGroups: { | ||
groupName: string | ||
wallets: Wallet[] | ||
}[] = [] | ||
|
||
const defaultWallets = ['metamask', 'walletconnect', 'rainbow', 'injected', 'coinbase'] | ||
const moreWallets = ['argent', 'ledger', 'taho', 'trust', 'zerion'] | ||
|
||
walletGroups.push({ | ||
groupName: 'Recommended', | ||
wallets: defaultWallets.map((wallet) => WALLETS[wallet]({ appName, chains, projectId })) | ||
}) | ||
|
||
walletGroups.push({ | ||
groupName: 'More', | ||
wallets: moreWallets.map((wallet) => WALLETS[wallet]({ appName, chains, projectId })) | ||
}) | ||
|
||
const connectors = connectorsForWallets(walletGroups) | ||
|
||
return connectors | ||
} |
Oops, something went wrong.