From 9dd3430e36ad24d0381a7d1ebc64f693189d093e Mon Sep 17 00:00:00 2001 From: Krzysztof Kaczor Date: Fri, 20 Oct 2023 08:17:32 +0200 Subject: [PATCH] Add feature flag to disable usdc deposits --- .env.development | 3 ++- .env.example | 1 + custom.d.ts | 1 + .../dashboard/lists/SupplyAssetsList/SupplyAssetsList.tsx | 4 ++-- 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.env.development b/.env.development index d9843a792..2c3131213 100644 --- a/.env.development +++ b/.env.development @@ -3,4 +3,5 @@ NEXT_PUBLIC_API_BASEURL=https://api.spark.fi #NEXT_PUBLIC_FORK_BASE_CHAIN_ID=1 #NEXT_PUBLIC_FORK_CHAIN_ID=1 #NEXT_PUBLIC_FORK_URL_RPC="https://rpc.tenderly.co/fork/1234567" -NEXT_PUBLIC_ENABLE_GNOSIS=1 \ No newline at end of file +NEXT_PUBLIC_ENABLE_GNOSIS=1 +NEXT_PUBLIC_HIDE_USDC_DEPOSITS=0 \ No newline at end of file diff --git a/.env.example b/.env.example index e8d8ff1cd..2788b8ef0 100644 --- a/.env.example +++ b/.env.example @@ -13,3 +13,4 @@ NEXT_PUBLIC_TURNSTILE_SITE_KEY=0x4AAAAAAABe-kMUW_1JUfT7 NEXT_PUBLIC_FORK_BASE_CHAIN_ID=1 NEXT_PUBLIC_FORK_CHAIN_ID=1 NEXT_PUBLIC_FORK_URL_RPC=https://rpc.tenderly.co/fork/1234567 +NEXT_PUBLIC_HIDE_USDC_DEPOSITS=0 \ No newline at end of file diff --git a/custom.d.ts b/custom.d.ts index 21aa2cdee..21a238117 100644 --- a/custom.d.ts +++ b/custom.d.ts @@ -16,6 +16,7 @@ namespace NodeJS { NEXT_PUBLIC_WALLET_CONNECT_PROJECT_ID: string; NEXT_PUBLIC_VPN_PROTECTION: string; NEXT_PUBLIC_DISABLE_SDAI_MARKET?: '1' | '0'; + NEXT_PUBLIC_HIDE_USDC_DEPOSITS?: '1' | '0'; NEXT_PUBLIC_ENABLE_GNOSIS?: '1' | '0'; } } diff --git a/src/modules/dashboard/lists/SupplyAssetsList/SupplyAssetsList.tsx b/src/modules/dashboard/lists/SupplyAssetsList/SupplyAssetsList.tsx index 84cb14881..59c2a91ec 100644 --- a/src/modules/dashboard/lists/SupplyAssetsList/SupplyAssetsList.tsx +++ b/src/modules/dashboard/lists/SupplyAssetsList/SupplyAssetsList.tsx @@ -140,7 +140,7 @@ export const SupplyAssetsList = () => { reserve.symbol === 'DAI' || reserve.symbol === 'USDC' || reserve.symbol === 'sDAI', hideSupply: reserve.symbol === 'DAI' || - reserve.symbol === 'USDC' || + (process.env.NEXT_PUBLIC_HIDE_USDC_DEPOSITS === '1' && reserve.symbol === 'USDC') || (process.env.NEXT_PUBLIC_DISABLE_SDAI_MARKET === '1' && reserve.symbol === 'sDAI'), }, ]; @@ -161,7 +161,7 @@ export const SupplyAssetsList = () => { reserve.symbol === 'DAI' || reserve.symbol === 'USDC' || reserve.symbol === 'sDAI', hideSupply: reserve.symbol === 'DAI' || - reserve.symbol === 'USDC' || + (process.env.NEXT_PUBLIC_HIDE_USDC_DEPOSITS === '1' && reserve.symbol === 'USDC') || (process.env.NEXT_PUBLIC_DISABLE_SDAI_MARKET === '1' && reserve.symbol === 'sDAI'), }; })