UNPKG

@airgap/etherlink

Version:

The @airgap/etherlink package is an implementation of the ICoinProtocol interface from @airgap/coinlib-core.

16 lines 534 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.newAmount = void 0; var amount_1 = require("../types/amount"); var amount_2 = require("../utils/amount"); function newAmount(amount, unitOrUndefined) { if ((0, amount_2.isAmount)(amount)) { return new amount_1.AmountEnhanced(amount.value, amount.unit); } else { var unit = unitOrUndefined; return new amount_1.AmountEnhanced(amount, unit); } } exports.newAmount = newAmount; //# sourceMappingURL=amount.js.map