UNPKG

@ledgerhq/coin-icon

Version:
26 lines 883 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const index_1 = require("@ledgerhq/coin-framework/account/index"); const index_2 = require("@ledgerhq/coin-framework/currencies/index"); function formatAccountSpecifics(account) { const { iconResources } = account; if (!iconResources) { throw new Error("icon account expected"); } const unit = (0, index_1.getAccountCurrency)(account).units[0]; const formatConfig = { disableRounding: true, alwaysShowSign: false, showCode: true, }; let str = " "; str += (0, index_2.formatCurrencyUnit)(unit, account.spendableBalance, formatConfig) + " spendable. "; if (iconResources.nonce) { str += "\nonce : " + iconResources.nonce; } return str; } exports.default = { formatAccountSpecifics, }; //# sourceMappingURL=account.js.map