You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

check-cash.js 1.6KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. "use strict";
  2. var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
  3. if (k2 === undefined) k2 = k;
  4. Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
  5. }) : (function(o, m, k, k2) {
  6. if (k2 === undefined) k2 = k;
  7. o[k2] = m[k];
  8. }));
  9. var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
  10. Object.defineProperty(o, "default", { enumerable: true, value: v });
  11. }) : function(o, v) {
  12. o["default"] = v;
  13. });
  14. var __importStar = (this && this.__importStar) || function (mod) {
  15. if (mod && mod.__esModule) return mod;
  16. var result = {};
  17. if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
  18. __setModuleDefault(result, mod);
  19. return result;
  20. };
  21. var __importDefault = (this && this.__importDefault) || function (mod) {
  22. return (mod && mod.__esModule) ? mod : { "default": mod };
  23. };
  24. Object.defineProperty(exports, "__esModule", { value: true });
  25. const assert = __importStar(require("assert"));
  26. const common_1 = require("../../common");
  27. const amount_1 = __importDefault(require("./amount"));
  28. const utils_1 = require("./utils");
  29. function parseCheckCash(tx) {
  30. assert.ok(tx.TransactionType === 'CheckCash');
  31. return common_1.removeUndefined({
  32. memos: utils_1.parseMemos(tx),
  33. checkID: tx.CheckID,
  34. amount: tx.Amount && amount_1.default(tx.Amount),
  35. deliverMin: tx.DeliverMin && amount_1.default(tx.DeliverMin)
  36. });
  37. }
  38. exports.default = parseCheckCash;
  39. //# sourceMappingURL=check-cash.js.map