Skip to content

Commit c16bc5d

Browse files
committed
refactor(auth-services): migrate away from using Bun
1 parent 0779fe7 commit c16bc5d

File tree

2 files changed

+26
-1
lines changed

2 files changed

+26
-1
lines changed

packages/auth-services/src/_setup/initSystemContext.ts

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,31 @@ export async function initSystemContext({ appName }: { appName: string }) {
2929
else if (env.NETWORK === 'naga-staging') networkModule = nagaStaging;
3030
else throw new Error(`Unsupported network: ${env.NETWORK}`);
3131

32+
const overrideRpc = rpcUrl || env.LIT_TXSENDER_RPC_URL;
33+
34+
// Apply runtime override if rpcUrl provided
35+
const effectiveModule =
36+
overrideRpc && typeof networkModule.withOverrides === 'function'
37+
? networkModule.withOverrides({ rpcUrl: overrideRpc })
38+
: networkModule;
39+
40+
try {
41+
const baseRpc =
42+
typeof networkModule.getRpcUrl === 'function'
43+
? networkModule.getRpcUrl()
44+
: 'n/a';
45+
const effRpc =
46+
typeof effectiveModule.getRpcUrl === 'function'
47+
? effectiveModule.getRpcUrl()
48+
: 'n/a';
49+
console.log(
50+
'[initSystemContext] RPC (base → effective):',
51+
baseRpc,
52+
'→',
53+
effRpc
54+
);
55+
} catch {}
56+
3257
const litClient = await createLitClient({
3358
network: networkModule,
3459
});

packages/auth-services/src/auth-server/src/schemas/AuthServiceMintRequestSchema.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ export type AuthServiceMintRequestRaw = z.input<
2121
// Transformed/Validated Type - after validation
2222
export type AuthServiceMintRequestTransformed = z.infer<
2323
typeof AuthServiceMintRequestSchema
24-
>;
24+
>;

0 commit comments

Comments
 (0)