UNPKG

@ledgerhq/live-common

Version:
24 lines 1.02 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.isPlatformSupportedCurrency = isPlatformSupportedCurrency; exports.isPlatformCryptoCurrency = isPlatformCryptoCurrency; exports.isPlatformERC20TokenCurrency = isPlatformERC20TokenCurrency; const currencies_1 = require("../currencies"); const types_1 = require("./types"); const helpers_1 = require("../helpers"); function isPlatformSupportedCurrency(currency) { if ((0, currencies_1.isCryptoCurrency)(currency)) { return (0, helpers_1.includes)(types_1.PLATFORM_FAMILIES, currency.family); } if ((0, currencies_1.isTokenCurrency)(currency)) { return (0, helpers_1.includes)(types_1.PLATFORM_FAMILIES, currency.parentCurrency.family); } return false; } function isPlatformCryptoCurrency(currency) { return currency.type === types_1.PlatformCurrencyType.CryptoCurrency; } function isPlatformERC20TokenCurrency(currency) { return currency.standard === "ERC20"; } //# sourceMappingURL=helpers.js.map