UNPKG

@ledgerhq/live-common

Version:
32 lines 1.27 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getAccountBridge = exports.getCurrencyBridge = void 0; exports.fromScanAccountEventRaw = fromScanAccountEventRaw; exports.toScanAccountEventRaw = toScanAccountEventRaw; const account_1 = require("../account"); var impl_1 = require("./impl"); Object.defineProperty(exports, "getCurrencyBridge", { enumerable: true, get: function () { return impl_1.getCurrencyBridge; } }); Object.defineProperty(exports, "getAccountBridge", { enumerable: true, get: function () { return impl_1.getAccountBridge; } }); async function fromScanAccountEventRaw(raw) { switch (raw.type) { case "discovered": return { type: raw.type, account: await (0, account_1.fromAccountRaw)(raw.account), }; default: throw new Error("unsupported ScanAccountEvent " + raw.type); } } function toScanAccountEventRaw(e) { switch (e.type) { case "discovered": return { type: e.type, account: (0, account_1.toAccountRaw)(e.account), }; default: throw new Error("unsupported ScanAccountEvent " + e.type); } } //# sourceMappingURL=index.js.map