UNPKG

test-ic-wallet-middleware-icrc

Version:
10 lines (9 loc) 426 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getCurrencyAmount = void 0; const common_1 = require("@ic-wallet-middleware/common"); const getCurrencyAmount = (tokenMarket, balance, decimals) => { const result = tokenMarket ? (0, common_1.getUSDfromToken)(balance.toString(), tokenMarket.price, decimals) : "0.00"; return result; }; exports.getCurrencyAmount = getCurrencyAmount;