mirror of
https://github.com/bisq-network/bisq.git
synced 2024-11-19 09:52:23 +01:00
Handle NPE when checking isSignWitnessTrade.
This commit is contained in:
parent
9813ae7574
commit
e082eb1c86
@ -930,17 +930,21 @@ public class AccountAgeWitnessService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public boolean isSignWitnessTrade(Trade trade) {
|
public boolean isSignWitnessTrade(Trade trade) {
|
||||||
checkNotNull(trade, "trade must not be null");
|
try {
|
||||||
checkNotNull(trade.getOffer(), "offer must not be null");
|
checkNotNull(trade, "trade must not be null");
|
||||||
Contract contract = checkNotNull(trade.getContract());
|
checkNotNull(trade.getOffer(), "offer must not be null");
|
||||||
PaymentAccountPayload sellerPaymentAccountPayload = contract.getSellerPaymentAccountPayload();
|
Contract contract = checkNotNull(trade.getContract());
|
||||||
AccountAgeWitness myWitness = getMyWitness(sellerPaymentAccountPayload);
|
PaymentAccountPayload sellerPaymentAccountPayload = checkNotNull(
|
||||||
|
contract.getSellerPaymentAccountPayload(), "paymentAccountPayload must not be null");
|
||||||
getAccountAgeWitnessUtils().witnessDebugLog(trade, myWitness);
|
AccountAgeWitness myWitness = getMyWitness(sellerPaymentAccountPayload);
|
||||||
|
getAccountAgeWitnessUtils().witnessDebugLog(trade, myWitness);
|
||||||
return accountIsSigner(myWitness) &&
|
return accountIsSigner(myWitness) &&
|
||||||
!peerHasSignedWitness(trade) &&
|
!peerHasSignedWitness(trade) &&
|
||||||
tradeAmountIsSufficient(trade.getAmount());
|
tradeAmountIsSufficient(trade.getAmount());
|
||||||
|
} catch (NullPointerException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getSignInfoFromAccount(PaymentAccount paymentAccount) {
|
public String getSignInfoFromAccount(PaymentAccount paymentAccount) {
|
||||||
|
Loading…
Reference in New Issue
Block a user