Skip to content

Commit

Permalink
Potential fix for add registration credit undefined transaction hash
Browse files Browse the repository at this point in the history
  • Loading branch information
jim-toth committed Aug 12, 2024
1 parent afa433e commit 6461243
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/events/events.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -387,19 +387,25 @@ export class EventsService implements OnApplicationBootstrap {
fingerprintString = _fingerprint
}

let transactionHash = event.transactionHash
if (!event.transactionHash) {
const tx = await event.getTransaction()
transactionHash = tx.hash
}

if (accountString != undefined) {
this.logger.log(
`Noticed registration lock for ${accountString} `
+ `with fingerprint ${fingerprintString} `
+ `and tx ${event.transactionHash}`,
+ `and tx ${transactionHash}`,
)
await this.registratorUpdatesFlow.add({
name: 'add-registration-credit',
queueName: 'registrator-updates-queue',
data: {
address: accountString,
fingerprint: fingerprintString,
tx: event.transactionHash
tx: transactionHash
},
opts: EventsService.jobOpts,
children: [
Expand Down

0 comments on commit 6461243

Please sign in to comment.