mirror of
https://github.com/haveno-dex/haveno.git
synced 2024-12-25 23:39:26 -05:00
add check to prevent null payment account name
This commit is contained in:
parent
48d902b58d
commit
fe70a087c4
@ -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 New Issue
Block a user