mirror of
https://github.com/bisq-network/bisq.git
synced 2025-02-24 23:18:17 +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
|
@Override
|
||||||
protected void run() {
|
protected void run() {
|
||||||
|
try {
|
||||||
runInterceptHook();
|
runInterceptHook();
|
||||||
|
|
||||||
|
|
||||||
TradeStatistics tradeStatistics = new TradeStatistics(trade.getOffer(),
|
TradeStatistics tradeStatistics = new TradeStatistics(trade.getOffer(),
|
||||||
trade.getTradePrice(),
|
trade.getTradePrice(),
|
||||||
trade.getTradeAmount(),
|
trade.getTradeAmount(),
|
||||||
trade.getDate(),
|
trade.getDate(),
|
||||||
trade.getDepositTx().getHashAsString(),
|
(trade.getDepositTx() != null ? trade.getDepositTx().getHashAsString() : ""),
|
||||||
trade.getContractHash(),
|
trade.getContractHash(),
|
||||||
processModel.getPubKeyRing());
|
processModel.getPubKeyRing());
|
||||||
processModel.getP2PService().addData(tradeStatistics, true);
|
processModel.getP2PService().addData(tradeStatistics, true);
|
||||||
|
complete();
|
||||||
|
} catch (Throwable t) {
|
||||||
|
failed(t);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue