Skip to content

Commit

Permalink
Use tempTradingPeerNodeAddress if the trade doesn't have a trading pe…
Browse files Browse the repository at this point in the history
…er set yet

This should fix the errors on the maker side when there's a disagreement
about market price.

Fixes bisq-network#2910
Fixes bisq-network#2924
  • Loading branch information
a123b authored and fflo committed Jul 13, 2019
1 parent a84395a commit d49e949
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,9 @@ private void sendAckMessage(@Nullable TradeMessage tradeMessage, boolean result,
tradeId,
result,
errorMessage);
final NodeAddress peersNodeAddress = trade.getTradingPeerNodeAddress();
// If there was an error during offer verification, the tradingPeerNodeAddress of the trade might not be set yet.
// We can find the peer's node address in the processModel's tempTradingPeerNodeAddress in that case.
final NodeAddress peersNodeAddress = trade.getTradingPeerNodeAddress() != null ? trade.getTradingPeerNodeAddress() : processModel.getTempTradingPeerNodeAddress();
log.info("Send AckMessage for {} to peer {}. tradeId={}, sourceUid={}",
ackMessage.getSourceMsgClassName(), peersNodeAddress, tradeId, sourceUid);
String finalSourceUid = sourceUid;
Expand Down

0 comments on commit d49e949

Please sign in to comment.