mirror of
https://github.com/bisq-network/bisq.git
synced 2025-02-24 23:18:17 +01:00
Validate AddressEntry.segwit
This commit is contained in:
parent
4a2c0ad75a
commit
86ddd06e27
1 changed files with 4 additions and 0 deletions
|
@ -97,6 +97,10 @@ public final class AddressEntry implements PersistablePayload {
|
|||
Context context,
|
||||
@Nullable String offerId,
|
||||
boolean segwit) {
|
||||
if (segwit && (!Context.AVAILABLE.equals(context) || offerId != null)) {
|
||||
throw new IllegalArgumentException("Segwit addresses are only allowed for " +
|
||||
"AVAILABLE entries without an offerId");
|
||||
}
|
||||
this.keyPair = keyPair;
|
||||
this.context = context;
|
||||
this.offerId = offerId;
|
||||
|
|
Loading…
Add table
Reference in a new issue