UNPKG

@ledgerhq/coin-canton

Version:
22 lines 1.13 kB
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); const deviceTransactionConfig_1 = __importDefault(require("./deviceTransactionConfig")); const bignumber_js_1 = __importDefault(require("bignumber.js")); describe("getDeviceTransactionConfig", () => { it("should return amount field when it's more than 0", () => { expect((0, deviceTransactionConfig_1.default)({ transaction: {}, status: { amount: new bignumber_js_1.default(1), estimatedFees: new bignumber_js_1.default(0) }, })[0]).toEqual({ type: "amount", label: "Amount" }); }); it("should return fee field when it's more than 0", () => { expect((0, deviceTransactionConfig_1.default)({ transaction: {}, status: { amount: new bignumber_js_1.default(0), estimatedFees: new bignumber_js_1.default(1) }, })[0]).toEqual({ type: "fees", label: "Fees" }); }); }); //# sourceMappingURL=deviceTransactionConfig.test.js.map