-
Notifications
You must be signed in to change notification settings - Fork 0
/
walletConfig.ts
50 lines (45 loc) · 973 Bytes
/
walletConfig.ts
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
import '@rainbow-me/rainbowkit/styles.css';
import {
getDefaultWallets,
} from '@rainbow-me/rainbowkit';
import {
configureChains,
createClient,
Chain
} from 'wagmi';
import { publicProvider } from 'wagmi/providers/public';
const tFil: Chain = {
id: 3141,
name: "Filecoin — Hyperspace testnet",
network: "tfil",
rpcUrls: {
default: {
http: ["https://api.hyperspace.node.glif.io/rpc/v1"]
},
public: {
http: ["https://api.hyperspace.node.glif.io/rpc/v1"]
}
},
nativeCurrency: {
name: "FIL",
decimals: 18,
symbol: "tFIL"
},
testnet: true
}
const { chains, provider } = configureChains(
[tFil],
[
publicProvider()
]
);
const { connectors } = getDefaultWallets({
appName: 'DFP',
chains
});
export const Chains = chains
export const wagmiClient = createClient({
autoConnect: true,
connectors,
provider
})