add test flag

This commit is contained in:
Bill He 2024-02-16 17:52:33 -08:00
parent 2eac714126
commit 502fafd5de
No known key found for this signature in database
GPG Key ID: 73AEEF9D79E5BBF8
2 changed files with 13 additions and 7 deletions

View File

@ -19,13 +19,17 @@ class TestFlags {
return !!this.queryParams.displayinitializingmarkets;
}
get addressOverride():string {
get addressOverride(): string {
return this.queryParams.address;
}
get showTradingRewards() {
return !!this.queryParams.tradingrewards;
}
get showCexWithdrawal() {
return !!this.queryParams.cexwithdrawal;
}
}
export const testFlags = new TestFlags();

View File

@ -14,6 +14,7 @@ import { popoverMixins } from '@/styles/popoverMixins';
import { getTransferInputs } from '@/state/inputsSelectors';
import { isTruthy } from '@/lib/isTruthy';
import { testFlags } from '@/lib/testFlags';
type ElementProps = {
label?: string;
@ -62,11 +63,12 @@ export const SourceSelectMenu = ({
return (
<SearchSelectMenu
items={[
exchangeItems.length > 0 && {
group: 'exchanges',
groupLabel: stringGetter({ key: STRING_KEYS.EXCHANGES }),
items: exchangeItems,
},
exchangeItems.length > 0 &&
(testFlags.showCexWithdrawal || type === TransferType.deposit) && {
group: 'exchanges',
groupLabel: stringGetter({ key: STRING_KEYS.EXCHANGES }),
items: exchangeItems,
},
chainItems.length > 0 && {
group: 'chains',
groupLabel: stringGetter({ key: STRING_KEYS.CHAINS }),