Skip to content

Commit

Permalink
refactor: simplify account balances update for signer (#768)
Browse files Browse the repository at this point in the history
simplify account update for signer
  • Loading branch information
justraman authored Dec 18, 2023
1 parent 608f5e2 commit 2f4dd2b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 81 deletions.
79 changes: 0 additions & 79 deletions src/mappings/util/nonce.ts

This file was deleted.

3 changes: 1 addition & 2 deletions src/processor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import { updateClaimDetails } from './mappings/claims/common'
import { syncAllCollections } from './jobs/collection-stats'
import { metadataQueue } from './jobs/process-metadata'
import { getTankDataFromCall } from './mappings/fuelTanks/common'
import { fetchNonces } from './mappings/util/nonce'

Sentry.init({
dsn: config.sentryDsn,
Expand Down Expand Up @@ -442,8 +441,8 @@ processor.run(
}
}

map.balances.processor.addAccountsToSet(Array.from(signers))
await map.balances.processor.saveAccounts(ctx as unknown as CommonContext, block.header)
await fetchNonces(ctx as unknown as CommonContext, block.header, signers)
_.chunk(extrinsics, 2000).forEach((chunk) => ctx.store.insert(Extrinsic, chunk as any))
_.chunk(events, 2000).forEach((chunk) => ctx.store.insert(Event, chunk as any))
_.chunk(accountTokenEvents, 2000).forEach((chunk) => ctx.store.insert(AccountTokenEvent, chunk as any))
Expand Down

0 comments on commit 2f4dd2b

Please sign in to comment.