From f02de1de7204090bd318af100ce303fea81d2d40 Mon Sep 17 00:00:00 2001 From: Chloe <44501120+chloezxyy@users.noreply.github.com> Date: Thu, 16 Nov 2023 14:13:57 +0800 Subject: [PATCH] fix(ops): handle production environment in DefaultNetworkInterceptor.ts (#354) * fix(ops): handle production environment in DefaultNetworkInterceptor.ts * fix: lint --- apps/server/src/faucet/DefaultNetworkInterceptor.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/server/src/faucet/DefaultNetworkInterceptor.ts b/apps/server/src/faucet/DefaultNetworkInterceptor.ts index 1a517494..49bcab06 100644 --- a/apps/server/src/faucet/DefaultNetworkInterceptor.ts +++ b/apps/server/src/faucet/DefaultNetworkInterceptor.ts @@ -6,7 +6,7 @@ export class DefaultNetworkInterceptor implements NestInterceptor { intercept(context: ExecutionContext, next: CallHandler) { const request = context.switchToHttp().getRequest(); const { network } = request.query; - const { networks } = getEnvironment(process.env.NODE_ENV); + const { networks } = getEnvironment(process.env.NODE_ENV || 'production'); if (!network || !networks.includes(network)) { request.query.network = EnvironmentNetwork.MainNet; // Set your default network here