Merge pull request #6072 from jmacxx/5396_privacy_enhancement

[1.8.3 fix] Get payment method ID from offerPayload pt.II
This commit is contained in:
Christoph Atteneder 2022-02-23 15:42:54 +01:00 committed by GitHub
commit 07f0e70731
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -151,12 +151,12 @@ public final class Contract implements NetworkPayload {
this.makerPaymentMethodId = makerPaymentMethodId; this.makerPaymentMethodId = makerPaymentMethodId;
this.takerPaymentMethodId = takerPaymentMethodId; this.takerPaymentMethodId = takerPaymentMethodId;
// Either makerPaymentAccountPayload is set or makerPaymentMethodId // Either makerPaymentMethodId is set, or obtained from offerPayload.
if (makerPaymentMethodId == null) { if (makerPaymentMethodId == null) {
makerPaymentMethodId = checkNotNull(makerPaymentAccountPayload).getPaymentMethodId(); makerPaymentMethodId = checkNotNull(offerPayload).getPaymentMethodId();
} }
if (takerPaymentMethodId == null) { if (takerPaymentMethodId == null) {
takerPaymentMethodId = checkNotNull(takerPaymentAccountPayload).getPaymentMethodId(); takerPaymentMethodId = checkNotNull(offerPayload).getPaymentMethodId();
} }
checkNotNull(makerPaymentMethodId); checkNotNull(makerPaymentMethodId);
checkNotNull(takerPaymentMethodId); checkNotNull(takerPaymentMethodId);