Skip to content

Commit

Permalink
Merge pull request #6955 from yonson2023/fix_npe_persistence
Browse files Browse the repository at this point in the history
Fix potential NPE in persistence of Contract.
  • Loading branch information
alejandrogarcia83 authored Dec 20, 2023
2 parents 237c705 + c7f36b2 commit 99d45f7
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -226,9 +226,10 @@ public protobuf.Contract toProtoMessage() {
.setTakerPayoutAddressString(takerPayoutAddressString)
.setMakerMultiSigPubKey(ByteString.copyFrom(makerMultiSigPubKey))
.setTakerMultiSigPubKey(ByteString.copyFrom(takerMultiSigPubKey))
.setLockTime(lockTime)
.setRefundAgentNodeAddress(refundAgentNodeAddress.toProtoMessage());
.setLockTime(lockTime);

Optional.ofNullable(refundAgentNodeAddress) // bisq/issues/6953 refundAgentNodeAddress sometimes is null
.ifPresent(e -> builder.setRefundAgentNodeAddress(refundAgentNodeAddress.toProtoMessage()));
Optional.ofNullable(hashOfMakersPaymentAccountPayload)
.ifPresent(e -> builder.setHashOfMakersPaymentAccountPayload(ByteString.copyFrom(hashOfMakersPaymentAccountPayload)));
Optional.ofNullable(hashOfTakersPaymentAccountPayload)
Expand Down

0 comments on commit 99d45f7

Please sign in to comment.