persist payment account on creation to fix null accountName

This commit is contained in:
woodser 2024-02-04 13:30:49 -05:00
parent d1d6576986
commit 7509a80895
2 changed files with 2 additions and 0 deletions

View File

@ -121,6 +121,7 @@ class CryptoAccountsDataModel extends ActivatableDataModel {
if (paymentAccount.getAccountName() == null) throw new IllegalStateException("Account name cannot be null");
user.addPaymentAccount(paymentAccount);
paymentAccount.onPersistChanges();
if (!(paymentAccount instanceof AssetAccount))
accountAgeWitnessService.publishMyAccountAgeWitness(paymentAccount.getPaymentAccountPayload());

View File

@ -127,6 +127,7 @@ class TraditionalAccountsDataModel extends ActivatableDataModel {
}
user.addPaymentAccount(paymentAccount);
paymentAccount.onPersistChanges();
accountAgeWitnessService.publishMyAccountAgeWitness(paymentAccount.getPaymentAccountPayload());
accountAgeWitnessService.signAndPublishSameNameAccounts();