@kumori/aurora-backend-handler 1.0.134 → 1.0.135
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Account, errors, Notification } from "@kumori/aurora-interfaces";
|
|
2
|
-
import { AccountStatus } from "@kumori/aurora-interfaces/enums/accountStatusEnum";
|
|
3
2
|
import {
|
|
4
3
|
initializeGlobalWebSocketClient,
|
|
5
4
|
getWebSocketStatus,
|
|
@@ -622,11 +621,7 @@ export const createAccount = async (account: Account, security: Security) => {
|
|
|
622
621
|
"account",
|
|
623
622
|
account,
|
|
624
623
|
);
|
|
625
|
-
|
|
626
|
-
...account,
|
|
627
|
-
status: AccountStatus.ACTIVE,
|
|
628
|
-
};
|
|
629
|
-
eventHelper.account.publish.created(updatedAccount);
|
|
624
|
+
eventHelper.account.publish.created(account);
|
|
630
625
|
return response;
|
|
631
626
|
} catch (error) {
|
|
632
627
|
console.error("Error creating account:", {
|
|
@@ -348,11 +348,6 @@ export const handleAccountEvent = ({
|
|
|
348
348
|
};
|
|
349
349
|
|
|
350
350
|
|
|
351
|
-
const resolveStatusAfterCreate = (existingAccount?: Account): string =>
|
|
352
|
-
existingAccount?.status && existingAccount.status !== "pending"
|
|
353
|
-
? existingAccount.status
|
|
354
|
-
: AccountStatus.ACTIVE;
|
|
355
|
-
|
|
356
351
|
/**
|
|
357
352
|
* Handles successful account operations (CREATE, UPDATE, DELETE).
|
|
358
353
|
*/
|
|
@@ -382,9 +377,7 @@ export const handleAccountOperationSuccess = ({
|
|
|
382
377
|
const isCreate = action === "CREATE";
|
|
383
378
|
const updatedAccount: Account = {
|
|
384
379
|
...originalData,
|
|
385
|
-
status:
|
|
386
|
-
? resolveStatusAfterCreate(existingAccount)
|
|
387
|
-
: existingAccount?.status || AccountStatus.ACTIVE,
|
|
380
|
+
status: existingAccount?.status || AccountStatus.ACTIVE,
|
|
388
381
|
};
|
|
389
382
|
|
|
390
383
|
return {
|