UNPKG

@sangaman/xud

Version:
34 lines 1.03 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const orders_1 = require("../types/orders"); class MatchesProcessor { constructor(logger, pool, raidenClient) { this.logger = logger; this.pool = pool; this.raidenClient = raidenClient; this.buffer = []; } add(match) { this.buffer.push(match); if (orders_1.isPeerOrder(match.maker)) { this.notifyPeer(match); } else if (orders_1.isPeerOrder(match.taker)) { this.executeSwap(match); } else { this.notifyClient(match); } } notifyPeer(_args) { // TODO: notify the peer to trigger swap execution from his side } notifyClient(_args) { // TODO: notify the local exchange client on the match } executeSwap(_args) { // TODO: execute the swap procedure } } exports.default = MatchesProcessor; //# sourceMappingURL=MatchesProcessor.js.map