UNPKG

@ledgerhq/live-common

Version:
21 lines 799 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.isCryptoCurrency = isCryptoCurrency; exports.isTokenCurrency = isTokenCurrency; exports.isUTXOCompliant = isUTXOCompliant; exports.getFamilyByCurrencyId = getFamilyByCurrencyId; const cryptoassets_1 = require("@ledgerhq/cryptoassets"); function isCryptoCurrency(currency) { return currency.type === "CryptoCurrency"; } function isTokenCurrency(currency) { return currency.type === "TokenCurrency"; } function isUTXOCompliant(currencyFamily) { return currencyFamily === "bitcoin" || currencyFamily === "cardano"; } function getFamilyByCurrencyId(currencyId) { const currency = (0, cryptoassets_1.findCryptoCurrencyById)(currencyId); return currency?.family; } //# sourceMappingURL=helpers.js.map