UNPKG

@ledgerhq/live-common

Version:
19 lines 731 B
import { isCryptoCurrency, isTokenCurrency } from "../currencies"; import { PlatformCurrencyType, PLATFORM_FAMILIES, } from "./types"; import { includes } from "../helpers"; export function isPlatformSupportedCurrency(currency) { if (isCryptoCurrency(currency)) { return includes(PLATFORM_FAMILIES, currency.family); } if (isTokenCurrency(currency)) { return includes(PLATFORM_FAMILIES, currency.parentCurrency.family); } return false; } export function isPlatformCryptoCurrency(currency) { return currency.type === PlatformCurrencyType.CryptoCurrency; } export function isPlatformERC20TokenCurrency(currency) { return currency.standard === "ERC20"; } //# sourceMappingURL=helpers.js.map