add testflag

This commit is contained in:
Bill He 2024-01-26 14:14:49 -08:00
parent a4750921d6
commit 8e1f497f43
No known key found for this signature in database
GPG Key ID: 73AEEF9D79E5BBF8
2 changed files with 7 additions and 1 deletions

View File

@ -26,6 +26,10 @@ class TestFlags {
get addressOverride():string {
return this.queryParams.address;
}
get showCEXDepositOption() {
return !!this.queryParams.cexdeposit;
}
}
export const testFlags = new TestFlags();

View File

@ -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 (
<SearchSelectMenu
items={[
exchangeItems.length > 0 && {
exchangeItems.length > 0 && testFlags.showCEXDepositOption && {
group: 'exchanges',
groupLabel: stringGetter({ key: STRING_KEYS.EXCHANGES }),
items: exchangeItems,