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) {
|
||||
try {
|
||||
checkNotNull(trade, "trade must not be null");
|
||||
checkNotNull(trade.getOffer(), "offer must not be null");
|
||||
Contract contract = checkNotNull(trade.getContract());
|
||||
PaymentAccountPayload sellerPaymentAccountPayload = contract.getSellerPaymentAccountPayload();
|
||||
PaymentAccountPayload sellerPaymentAccountPayload = checkNotNull(
|
||||
contract.getSellerPaymentAccountPayload(), "paymentAccountPayload must not be null");
|
||||
AccountAgeWitness myWitness = getMyWitness(sellerPaymentAccountPayload);
|
||||
|
||||
getAccountAgeWitnessUtils().witnessDebugLog(trade, myWitness);
|
||||
|
||||
return accountIsSigner(myWitness) &&
|
||||
!peerHasSignedWitness(trade) &&
|
||||
tradeAmountIsSufficient(trade.getAmount());
|
||||
} catch (NullPointerException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public String getSignInfoFromAccount(PaymentAccount paymentAccount) {
|
||||
|
Loading…
Reference in New Issue
Block a user