-
Notifications
You must be signed in to change notification settings - Fork 172
Expand file tree
/
Copy pathgetDefaultWallets.ts
More file actions
60 lines (57 loc) · 1.29 KB
/
getDefaultWallets.ts
File metadata and controls
60 lines (57 loc) · 1.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
import { connectorsForWallets, WalletList } from '@rainbow-me/rainbowkit'
import {
argentWallet,
braveWallet,
coinbaseWallet,
injectedWallet,
ledgerWallet,
metaMaskWallet,
phantomWallet,
rainbowWallet,
safeWallet,
walletConnectWallet,
} from '@rainbow-me/rainbowkit/wallets'
import { isInsideSafe } from './safe'
export const getDefaultWallets = ({
appName,
projectId,
}: {
appName: string
projectId: string
}) => {
const wallets: WalletList = isInsideSafe()
? [
{
groupName: 'Popular',
wallets: [safeWallet],
},
]
: [
{
groupName: 'Popular',
wallets: [
// injected / not always shown
injectedWallet,
safeWallet,
braveWallet,
() => ({
...phantomWallet(),
iconUrl: async () => (await import('../assets/PhantomWallet')).default,
iconBackground: '#9A8AEE',
downloadUrls: {},
}),
// always shown
walletConnectWallet,
rainbowWallet,
coinbaseWallet,
metaMaskWallet,
ledgerWallet,
argentWallet,
],
},
]
return connectorsForWallets(wallets, {
appName,
projectId,
})
}