mirror of
https://github.com/bisq-network/bisq.git
synced 2024-11-19 09:52:23 +01:00
Log exception and return "Not Available" when trade role cannot be found
This commit is contained in:
parent
210d966702
commit
4ab4c3d213
@ -270,9 +270,14 @@ class CoreTradesService {
|
||||
coreWalletsService.verifyWalletsAreAvailable();
|
||||
coreWalletsService.verifyEncryptedWalletIsUnlocked();
|
||||
var isBsqSwapTrade = tradeModel instanceof BsqSwapTrade;
|
||||
return isBsqSwapTrade
|
||||
? tradeUtil.getRole((BsqSwapTrade) tradeModel)
|
||||
: tradeUtil.getRole((Trade) tradeModel);
|
||||
try {
|
||||
return isBsqSwapTrade
|
||||
? tradeUtil.getRole((BsqSwapTrade) tradeModel)
|
||||
: tradeUtil.getRole((Trade) tradeModel);
|
||||
} catch (Exception ex) {
|
||||
log.error("Role not found for trade with Id {}.", tradeModel.getId(), ex);
|
||||
return "Not Available";
|
||||
}
|
||||
}
|
||||
|
||||
Trade getTrade(String tradeId) {
|
||||
|
Loading…
Reference in New Issue
Block a user