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.

account-trustline.js 1.1KB

12345678910111213141516171819202122232425262728
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. const utils_1 = require("./utils");
  4. const common_1 = require("../../common");
  5. function parseAccountTrustline(trustline) {
  6. const specification = common_1.removeUndefined({
  7. limit: trustline.limit,
  8. currency: trustline.currency,
  9. counterparty: trustline.account,
  10. qualityIn: utils_1.parseQuality(trustline.quality_in) || undefined,
  11. qualityOut: utils_1.parseQuality(trustline.quality_out) || undefined,
  12. ripplingDisabled: trustline.no_ripple,
  13. frozen: trustline.freeze,
  14. authorized: trustline.authorized
  15. });
  16. const counterparty = common_1.removeUndefined({
  17. limit: trustline.limit_peer,
  18. ripplingDisabled: trustline.no_ripple_peer,
  19. frozen: trustline.freeze_peer,
  20. authorized: trustline.peer_authorized
  21. });
  22. const state = {
  23. balance: trustline.balance
  24. };
  25. return { specification, counterparty, state };
  26. }
  27. exports.default = parseAccountTrustline;
  28. //# sourceMappingURL=account-trustline.js.map