Skip to content

Commit

Permalink
clearer name
Browse files Browse the repository at this point in the history
  • Loading branch information
lvndry committed Aug 18, 2023
1 parent 44fe396 commit 086b4a6
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ import ErrorBanner from "~/renderer/components/ErrorBanner";
import { CryptoCurrencyId, CryptoOrTokenCurrency } from "@ledgerhq/types-cryptoassets";
import { Feature } from "@ledgerhq/types-live";

const listSupportedTokens = () => listTokens().filter(t => isCurrencySupported(t.parentCurrency));
const listSupportedTokens = () =>
listTokens().filter(token => isCurrencySupported(token.parentCurrency));

const StepChooseCurrency = ({ currency, setCurrency }: StepProps) => {
const axelar = useFeature("currencyAxelar");
Expand Down Expand Up @@ -144,11 +145,13 @@ const StepChooseCurrency = ({ currency, setCurrency }: StepProps) => {
const currencies = (listSupportedCurrencies() as CryptoOrTokenCurrency[]).concat(
listSupportedTokens(),
);

const deactivatedCurrencies = mock
? []
: Object.entries(featureFlaggedCurrencies)
.filter(([, feature]) => !feature?.enabled)
.map(([name]) => name);

return currencies.filter(c => !deactivatedCurrencies.includes(c.id));
}, [featureFlaggedCurrencies, mock]);

Expand Down

0 comments on commit 086b4a6

Please sign in to comment.