mirror of
https://github.com/haveno-dex/haveno.git
synced 2024-12-22 11:39:29 +00:00
fix npe in arbitrator when dispute is opened
This commit is contained in:
parent
c32550997d
commit
cb10a65a83
1 changed files with 4 additions and 4 deletions
|
@ -584,14 +584,14 @@ public abstract class TradeProtocol implements DecryptedDirectMessageListener, D
|
|||
|
||||
private boolean isPubKeyValid(DecryptedMessageWithPubKey message, NodeAddress sender) {
|
||||
|
||||
// valid if arbitrator's pub key ring
|
||||
if (trade.getArbitratorPubKeyRing() != null && message.getSignaturePubKey().equals(trade.getArbitratorPubKeyRing().getSignaturePubKey())) return true;
|
||||
|
||||
// not invalid if pub key rings are unknown
|
||||
if (trade.getTradingPeer().getPubKeyRing() == null && trade.getArbitratorPubKeyRing() == null) return true;
|
||||
|
||||
// valid if peer's pub key ring
|
||||
if (trade.getTradingPeer().getPubKeyRing() != null && message.getSignaturePubKey().equals(trade.getTradingPeer().getPubKeyRing().getSignaturePubKey())) return true;
|
||||
|
||||
// valid if arbitrator's pub key ring
|
||||
if (trade.getArbitratorPubKeyRing() != null && message.getSignaturePubKey().equals(trade.getArbitratorPubKeyRing().getSignaturePubKey())) return true;
|
||||
if (trade.getTradingPeer() != null && trade.getTradingPeer().getPubKeyRing() != null && message.getSignaturePubKey().equals(trade.getTradingPeer().getPubKeyRing().getSignaturePubKey())) return true;
|
||||
|
||||
// invalid
|
||||
log.error("SignaturePubKey in message does not match the SignaturePubKey we have set for our trading peer and arbitrator.");
|
||||
|
|
Loading…
Reference in a new issue