Skip to content

Commit

Permalink
changed to using this.trackers instead of local promise array
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewlee348 committed Nov 11, 2024
1 parent 5f6d278 commit 48aa93c
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions packages/sessions/src/trackers/multiple.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@ export class MultipleTracker implements migrator.PresignedMigrationTracker, Conf
let result1: { res: commons.config.Config | undefined; i: number } | undefined

if (this.isSerial) {
for (const request of requests) {
const result = await request
if (result.res) {
if (universal.genericCoderFor(result.res.version).config.isComplete(result.res)) {
result1 = result
for (const [i, tracker] of this.trackers.entries()) {
const result = await tracker.configOfImageHash(args)
if (result) {
if (universal.genericCoderFor(result.version).config.isComplete(result)) {
result1 = { res: result, i }
break
}
}
Expand Down Expand Up @@ -103,10 +103,10 @@ export class MultipleTracker implements migrator.PresignedMigrationTracker, Conf
const requests = this.trackers.map(t => t.imageHashOfCounterfactualWallet(args))

if (this.isSerial) {
for (const request of requests) {
const result = await request
for (const tracker of this.trackers) {
const result = await tracker.imageHashOfCounterfactualWallet(args)
if (result) {
imageHash = result
imageHash = { imageHash: result.imageHash, context: result.context }
break
}
}
Expand Down

0 comments on commit 48aa93c

Please sign in to comment.