Skip to content

Commit 474562a

Browse files
authored
SHARD-1204: Add Secure Account Storage Support (#44)
* add SecureAccount type and update ethAddress assignment in account processing * Remove commented out SecureAccount type from AccountSearchType enum in account.ts
1 parent f554d51 commit 474562a

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

src/storage/account.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,8 @@ export async function processAccountData(accounts: AccountsCopy[]): Promise<Acco
374374
accountType === AccountType.NetworkAccount ||
375375
accountType === AccountType.DevAccount ||
376376
accountType === AccountType.NodeAccount ||
377-
accountType === AccountType.NodeAccount2
377+
accountType === AccountType.NodeAccount2 ||
378+
accountType === AccountType.SecureAccount
378379
) {
379380
accObj.ethAddress = account.accountId // Adding accountId as ethAddess for these account types for now; since we need ethAddress for mysql index
380381
}

src/storage/receipt.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,8 @@ export async function processReceiptData(receipts: Receipt[], saveOnlyNewData =
154154
accountType === AccountType.NetworkAccount ||
155155
accountType === AccountType.DevAccount ||
156156
accountType === AccountType.NodeAccount ||
157-
accountType === AccountType.NodeAccount2
157+
accountType === AccountType.NodeAccount2 ||
158+
accountType === AccountType.SecureAccount
158159
) {
159160
accObj.ethAddress = account.accountId // Adding accountId as ethAddess for these account types for now; since we need ethAddress for mysql index
160161
}

src/types/account.ts

+1
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ export enum AccountType {
5454
StakeReceipt,
5555
UnstakeReceipt,
5656
InternalTxReceipt,
57+
SecureAccount,
5758
}
5859

5960
export enum AccountSearchType {

0 commit comments

Comments
 (0)