diff --git a/core/src/main/java/bisq/core/payment/PaymentAccount.java b/core/src/main/java/bisq/core/payment/PaymentAccount.java index 25414d1b28..24d04b2b03 100644 --- a/core/src/main/java/bisq/core/payment/PaymentAccount.java +++ b/core/src/main/java/bisq/core/payment/PaymentAccount.java @@ -209,6 +209,14 @@ public abstract class PaymentAccount implements PersistablePayload { return Utilities.bytesAsHexString(getSalt()); } + public void setHolderName(String value) { + paymentAccountPayload.setHolderName(value); + } + + public String getHolderName() { + return paymentAccountPayload.getHolderName(); + } + public String getOwnerId() { return paymentAccountPayload.getOwnerId(); } diff --git a/core/src/main/java/bisq/core/payment/payload/PaymentAccountPayload.java b/core/src/main/java/bisq/core/payment/payload/PaymentAccountPayload.java index bef7ee466c..e766931db9 100644 --- a/core/src/main/java/bisq/core/payment/payload/PaymentAccountPayload.java +++ b/core/src/main/java/bisq/core/payment/payload/PaymentAccountPayload.java @@ -23,6 +23,8 @@ import bisq.common.proto.network.NetworkPayload; import bisq.common.util.JsonExclude; import bisq.common.util.Utilities; +import com.google.common.base.Strings; + import org.apache.commons.lang3.ArrayUtils; import java.nio.charset.StandardCharsets; @@ -129,6 +131,14 @@ public abstract class PaymentAccountPayload implements NetworkPayload, UsedForTr excludeFromJsonDataMap.put(SALT, Utilities.encodeToHex(salt)); } + public String getHolderName() { + return excludeFromJsonDataMap.getOrDefault(HOLDER_NAME, ""); + } + + public void setHolderName(String holderName) { + excludeFromJsonDataMap.compute(HOLDER_NAME, (k, v) -> Strings.emptyToNull(holderName)); + } + // Identifying data of payment account (e.g. IBAN). // This is critical code for verifying age of payment account. // Any change would break validation of historical data!