Skip to content

Commit 3d171fc

Browse files
committed
feat: add missing nuxt config
1 parent 36232c0 commit 3d171fc

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

packages/auth-server/app.vue

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,34 +5,34 @@
55
</template>
66

77
<script lang="ts" setup>
8-
import type { AppKitNetwork } from "@reown/appkit/networks";
98
import { createAppKit } from "@reown/appkit/vue";
109
import { WagmiAdapter } from "@reown/appkit-adapter-wagmi";
1110
12-
import { supportedChains } from "./stores/client";
13-
1411
// BigInt polyfill
1512
// eslint-disable-next-line @typescript-eslint/no-explicit-any
1613
(BigInt.prototype as any).toJSON = function () {
1714
return this.toString();
1815
};
1916
2017
// AppKit Configuration
21-
const projectId = "9bc5059f6eed355858cc56a3388e9b50";
18+
const { defaultChain } = useClientStore();
19+
const runtimeConfig = useRuntimeConfig();
20+
21+
const projectId = runtimeConfig.public.appKitProjectId;
2222
const metadata = {
2323
name: "ZKsync SSO Auth Server",
2424
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`],
2727
};
2828
const wagmiAdapter = new WagmiAdapter({
29-
networks: supportedChains,
29+
networks: [defaultChain],
3030
projectId,
3131
});
3232
3333
createAppKit({
3434
adapters: [wagmiAdapter],
35-
networks: supportedChains as unknown as [AppKitNetwork, ...AppKitNetwork[]],
35+
networks: [defaultChain],
3636
projectId,
3737
metadata,
3838
});

packages/auth-server/nuxt.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ export default defineNuxtConfig({
7373
},
7474
appUrl: process.env.NUXT_PUBLIC_APP_URL || "https://auth-test.zksync.dev",
7575
ssoAccountInterfaceId: "0xb9094997",
76+
appKitProjectId: process.env.NUXT_PUBLIC_APPKIT_PROJECT_ID || "",
7677
},
7778
},
7879
});

0 commit comments

Comments
 (0)