|
5 | 5 | </template> |
6 | 6 |
|
7 | 7 | <script lang="ts" setup> |
8 | | -import type { AppKitNetwork } from "@reown/appkit/networks"; |
9 | 8 | import { createAppKit } from "@reown/appkit/vue"; |
10 | 9 | import { WagmiAdapter } from "@reown/appkit-adapter-wagmi"; |
11 | 10 |
|
12 | | -import { supportedChains } from "./stores/client"; |
13 | | -
|
14 | 11 | // BigInt polyfill |
15 | 12 | // eslint-disable-next-line @typescript-eslint/no-explicit-any |
16 | 13 | (BigInt.prototype as any).toJSON = function () { |
17 | 14 | return this.toString(); |
18 | 15 | }; |
19 | 16 |
|
20 | 17 | // AppKit Configuration |
21 | | -const projectId = "9bc5059f6eed355858cc56a3388e9b50"; |
| 18 | +const { defaultChain } = useClientStore(); |
| 19 | +const runtimeConfig = useRuntimeConfig(); |
| 20 | +
|
| 21 | +const projectId = runtimeConfig.public.appKitProjectId; |
22 | 22 | const metadata = { |
23 | 23 | name: "ZKsync SSO Auth Server", |
24 | 24 | description: "ZKsync SSO Auth Server", |
25 | | - url: "https://auth-test.zksync.dev", |
26 | | - icons: ["https://auth-test.zksync.dev/icon-512.png"], |
| 25 | + url: runtimeConfig.public.appUrl, |
| 26 | + icons: [`${runtimeConfig.public.appUrl}/icon-512.png`], |
27 | 27 | }; |
28 | 28 | const wagmiAdapter = new WagmiAdapter({ |
29 | | - networks: supportedChains, |
| 29 | + networks: [defaultChain], |
30 | 30 | projectId, |
31 | 31 | }); |
32 | 32 |
|
33 | 33 | createAppKit({ |
34 | 34 | adapters: [wagmiAdapter], |
35 | | - networks: supportedChains as unknown as [AppKitNetwork, ...AppKitNetwork[]], |
| 35 | + networks: [defaultChain], |
36 | 36 | projectId, |
37 | 37 | metadata, |
38 | 38 | }); |
|
0 commit comments