@ledgerhq/live-common
Version:
Common ground for the Ledger Live apps
21 lines • 799 B
JavaScript
;
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