mirror of
https://github.com/bisq-network/bisq.git
synced 2025-02-24 15:10:44 +01:00
Add try/catch and null checks
This commit is contained in:
parent
76b24838f6
commit
bb6436eb0a
1 changed files with 14 additions and 13 deletions
|
@ -33,18 +33,19 @@ public class PublishTradeStatistics extends TradeTask {
|
|||
|
||||
@Override
|
||||
protected void run() {
|
||||
runInterceptHook();
|
||||
|
||||
|
||||
TradeStatistics tradeStatistics = new TradeStatistics(trade.getOffer(),
|
||||
trade.getTradePrice(),
|
||||
trade.getTradeAmount(),
|
||||
trade.getDate(),
|
||||
trade.getDepositTx().getHashAsString(),
|
||||
trade.getContractHash(),
|
||||
processModel.getPubKeyRing());
|
||||
processModel.getP2PService().addData(tradeStatistics, true);
|
||||
|
||||
|
||||
try {
|
||||
runInterceptHook();
|
||||
TradeStatistics tradeStatistics = new TradeStatistics(trade.getOffer(),
|
||||
trade.getTradePrice(),
|
||||
trade.getTradeAmount(),
|
||||
trade.getDate(),
|
||||
(trade.getDepositTx() != null ? trade.getDepositTx().getHashAsString() : ""),
|
||||
trade.getContractHash(),
|
||||
processModel.getPubKeyRing());
|
||||
processModel.getP2PService().addData(tradeStatistics, true);
|
||||
complete();
|
||||
} catch (Throwable t) {
|
||||
failed(t);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue