@ledgerhq/coin-canton
Version:
15 lines • 666 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.broadcast = void 0;
const operation_1 = require("@ledgerhq/ledger-wallet-framework/operation");
const common_logic_1 = require("../common-logic");
const broadcast = async ({ account, signedOperation, }) => {
const { operation, signature } = signedOperation;
const hash = await (0, common_logic_1.broadcast)(account.currency, signature);
if (!hash) {
throw new Error("canton: broadcast returned no transaction id");
}
return (0, operation_1.patchOperationWithHash)(operation, hash);
};
exports.broadcast = broadcast;
//# sourceMappingURL=broadcast.js.map