-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.ts
38 lines (33 loc) · 848 Bytes
/
config.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
polyfillForWagmi();
import {
createConnectorFromWallet,
Wallets,
} from "@mobile-wallet-protocol/wagmi-connectors";
import { http, createConfig } from "wagmi";
import { base } from "wagmi/chains";
import * as Linking from "expo-linking";
const PREFIX_URL = Linking.createURL("/");
export const config = createConfig({
chains: [base],
connectors: [
createConnectorFromWallet({
metadata: {
appName: "Wagmi CBSW Template DEMO",
appDeeplinkUrl: PREFIX_URL,
},
wallet: Wallets.CoinbaseSmartWallet,
}),
],
transports: {
[base.id]: http(),
},
});
function polyfillForWagmi() {
const noop = (() => {}) as any;
window.addEventListener = noop;
window.dispatchEvent = noop;
window.removeEventListener = noop;
window.CustomEvent = function CustomEvent() {
return {};
} as any;
}