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);
|
||||
|
||||
if (!(paymentAccount instanceof AssetAccount))
|
||||
|
@ -126,6 +127,7 @@ class CryptoAccountsDataModel extends ActivatableDataModel {
|
|||
}
|
||||
|
||||
public void onUpdateAccount(PaymentAccount paymentAccount) {
|
||||
if (paymentAccount.getAccountName() == null) throw new IllegalStateException("Account name cannot be null");
|
||||
paymentAccount.onPersistChanges();
|
||||
user.requestPersistence();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue