mirror of
https://github.com/haveno-dex/haveno.git
synced 2024-11-17 08:17:57 +00:00
add check to prevent null payment account name
This commit is contained in:
parent
48d902b58d
commit
fe70a087c4
1 changed files with 2 additions and 0 deletions
|
@ -119,6 +119,7 @@ class CryptoAccountsDataModel extends ActivatableDataModel {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (paymentAccount.getAccountName() == null) throw new IllegalStateException("Account name cannot be null");
|
||||||
user.addPaymentAccount(paymentAccount);
|
user.addPaymentAccount(paymentAccount);
|
||||||
|
|
||||||
if (!(paymentAccount instanceof AssetAccount))
|
if (!(paymentAccount instanceof AssetAccount))
|
||||||
|
@ -126,6 +127,7 @@ class CryptoAccountsDataModel extends ActivatableDataModel {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onUpdateAccount(PaymentAccount paymentAccount) {
|
public void onUpdateAccount(PaymentAccount paymentAccount) {
|
||||||
|
if (paymentAccount.getAccountName() == null) throw new IllegalStateException("Account name cannot be null");
|
||||||
paymentAccount.onPersistChanges();
|
paymentAccount.onPersistChanges();
|
||||||
user.requestPersistence();
|
user.requestPersistence();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue