listen for published payout tx

fix "Swapping pending OFFER_FUNDING" warning
move payout tx from TradingPeer to Trade
This commit is contained in:
woodser 2022-10-01 09:51:16 -04:00
parent 5fbc41946e
commit dc9c04759f
30 changed files with 231 additions and 279 deletions

View file

@ -176,11 +176,12 @@ class GrpcTradesService extends TradesImplBase {
}
}
// TODO: rename KeepFundsRequest to CloseTradeRequest
@Override
public void keepFunds(KeepFundsRequest req,
StreamObserver<KeepFundsReply> responseObserver) {
try {
coreApi.keepFunds(req.getTradeId());
coreApi.closeTrade(req.getTradeId());
var reply = KeepFundsReply.newBuilder().build();
responseObserver.onNext(reply);
responseObserver.onCompleted();