File tree Expand file tree Collapse file tree 2 files changed +26
-1
lines changed
packages/auth-services/src Expand file tree Collapse file tree 2 files changed +26
-1
lines changed Original file line number Diff line number Diff 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 } ) ;
Original file line number Diff line number Diff line change @@ -21,4 +21,4 @@ export type AuthServiceMintRequestRaw = z.input<
2121// Transformed/Validated Type - after validation
2222export type AuthServiceMintRequestTransformed = z . infer <
2323 typeof AuthServiceMintRequestSchema
24- > ;
24+ > ;
You can’t perform that action at this time.
0 commit comments