From 8e1f497f430190e541eb67ba784ce17ff6c69d05 Mon Sep 17 00:00:00 2001 From: Bill He Date: Fri, 26 Jan 2024 14:14:49 -0800 Subject: [PATCH] add testflag --- src/lib/testFlags.ts | 4 ++++ src/views/forms/AccountManagementForms/SourceSelectMenu.tsx | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/lib/testFlags.ts b/src/lib/testFlags.ts index 66c4b59..0fc1faf 100644 --- a/src/lib/testFlags.ts +++ b/src/lib/testFlags.ts @@ -26,6 +26,10 @@ class TestFlags { get addressOverride():string { return this.queryParams.address; } + + get showCEXDepositOption() { + return !!this.queryParams.cexdeposit; + } } export const testFlags = new TestFlags(); diff --git a/src/views/forms/AccountManagementForms/SourceSelectMenu.tsx b/src/views/forms/AccountManagementForms/SourceSelectMenu.tsx index ac3a2b9..a2f656a 100644 --- a/src/views/forms/AccountManagementForms/SourceSelectMenu.tsx +++ b/src/views/forms/AccountManagementForms/SourceSelectMenu.tsx @@ -4,6 +4,8 @@ import { shallowEqual, useSelector } from 'react-redux'; import { TransferType } from '@/constants/abacus'; import { STRING_KEYS } from '@/constants/localization'; import { isTruthy } from '@/lib/isTruthy'; +import { testFlags } from '@/lib/testFlags'; + import { useStringGetter } from '@/hooks'; import { SearchSelectMenu } from '@/components/SearchSelectMenu'; @@ -60,7 +62,7 @@ export const SourceSelectMenu = ({ return ( 0 && { + exchangeItems.length > 0 && testFlags.showCEXDepositOption && { group: 'exchanges', groupLabel: stringGetter({ key: STRING_KEYS.EXCHANGES }), items: exchangeItems,