mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-08-22 05:29:33 -04:00
improve error handling in protocol pipelines
support getTrades() from grpc api consistently use timeouts in protocol pipelines remove trade and repost offer on protocol errors delete multisig wallet when trade removed protocol advances on ack messages instead of network onArrived() re-order protocol class methods to correct order
This commit is contained in:
parent
d2ddfad5bc
commit
7c9c35b1b8
21 changed files with 1096 additions and 930 deletions
|
@ -244,11 +244,15 @@ public class CoreApi {
|
|||
String paymentAccountId,
|
||||
Consumer<Trade> resultHandler,
|
||||
ErrorMessageHandler errorMessageHandler) {
|
||||
Offer offer = coreOffersService.getOffer(offerId);
|
||||
coreTradesService.takeOffer(offer,
|
||||
paymentAccountId,
|
||||
resultHandler,
|
||||
errorMessageHandler);
|
||||
try {
|
||||
Offer offer = coreOffersService.getOffer(offerId);
|
||||
coreTradesService.takeOffer(offer,
|
||||
paymentAccountId,
|
||||
resultHandler,
|
||||
errorMessageHandler);
|
||||
} catch (Exception e) {
|
||||
errorMessageHandler.handleErrorMessage(e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
public void confirmPaymentStarted(String tradeId) {
|
||||
|
@ -271,6 +275,10 @@ public class CoreApi {
|
|||
return coreTradesService.getTrade(tradeId);
|
||||
}
|
||||
|
||||
public List<Trade> getTrades() {
|
||||
return coreTradesService.getTrades();
|
||||
}
|
||||
|
||||
public String getTradeRole(String tradeId) {
|
||||
return coreTradesService.getTradeRole(tradeId);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue