mirror of
https://github.com/bisq-network/bisq.git
synced 2025-02-24 23:18:17 +01:00
Get payment method ID from offerPayload.
Was getting an NPE with closed trades older than v1.7.0. makerPaymentMethodId was new at that point (null for older trades). makerPaymentAccountPayload can be null for trades where we have removed account info for privacy reasons (see #6001). The payment method ID can always be obtained from offerPayload.
This commit is contained in:
parent
99be324aba
commit
2bdfa524cf
1 changed files with 2 additions and 2 deletions
|
@ -298,8 +298,8 @@ public final class Contract implements NetworkPayload {
|
|||
}
|
||||
|
||||
public String getPaymentMethodId() {
|
||||
// Either makerPaymentMethodId is set or available in makerPaymentAccountPayload
|
||||
return makerPaymentMethodId != null ? makerPaymentMethodId : Objects.requireNonNull(makerPaymentAccountPayload).getPaymentMethodId();
|
||||
// Either makerPaymentMethodId is set or available in offerPayload
|
||||
return makerPaymentMethodId != null ? makerPaymentMethodId : Objects.requireNonNull(getOfferPayload()).getPaymentMethodId();
|
||||
}
|
||||
|
||||
public Coin getTradeAmount() {
|
||||
|
|
Loading…
Add table
Reference in a new issue