@cordystackx/cordy_minikit 0.3.9 → 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,3 +1,4 @@
1
1
  import { createConfig } from 'wagmi';
2
+ export declare function getConfig(): ReturnType<typeof createConfig>;
2
3
  export declare const config: ReturnType<typeof createConfig>;
3
4
  //# sourceMappingURL=walletConfig.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"walletConfig.d.ts","sourceRoot":"","sources":["../../config/walletConfig.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,YAAY,EAAE,MAAM,OAAO,CAAC;AAO3C,eAAO,MAAM,MAAM,EAAE,UAAU,CAAC,OAAO,YAAY,CAejD,CAAC"}
1
+ {"version":3,"file":"walletConfig.d.ts","sourceRoot":"","sources":["../../config/walletConfig.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,YAAY,EAA0B,MAAM,OAAO,CAAC;AAQnE,wBAAgB,SAAS,IAAI,UAAU,CAAC,OAAO,YAAY,CAAC,CAiB3D;AAGD,eAAO,MAAM,MAAM,EAAE,UAAU,CAAC,OAAO,YAAY,CAEV,CAAC"}
@@ -3,19 +3,26 @@ import { mainnet, base } from 'wagmi/chains';
3
3
  import { walletConnect, metaMask, coinbaseWallet } from 'wagmi/connectors';
4
4
  import { BaseSepolia } from "../chains";
5
5
  const projectId = process.env.NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID;
6
- export const config = createConfig({
7
- chains: [mainnet, base, BaseSepolia()],
8
- connectors: [
9
- metaMask(),
10
- walletConnect({ projectId }),
11
- coinbaseWallet({
12
- appName: "cordy_minikit",
13
- version: "3"
14
- })
15
- ],
16
- transports: {
17
- [mainnet.id]: http(),
18
- [base.id]: http(),
19
- [BaseSepolia().id]: http()
20
- },
21
- });
6
+ // Function to create config - only called on client side
7
+ export function getConfig() {
8
+ return createConfig({
9
+ chains: [mainnet, base, BaseSepolia()],
10
+ connectors: [
11
+ metaMask(),
12
+ walletConnect({ projectId }),
13
+ coinbaseWallet({
14
+ appName: "cordy_minikit",
15
+ version: "3"
16
+ })
17
+ ],
18
+ transports: {
19
+ [mainnet.id]: http(),
20
+ [base.id]: http(),
21
+ [BaseSepolia().id]: http()
22
+ },
23
+ });
24
+ }
25
+ // Create config only on client side
26
+ export const config = typeof window !== 'undefined'
27
+ ? getConfig()
28
+ : {};