Skip to content

Commit

Permalink
watcher: fix aptos emitter format
Browse files Browse the repository at this point in the history
  • Loading branch information
panoel committed Feb 21, 2024
1 parent 917d310 commit 228154e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion watcher/src/watchers/AptosWatcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ export class AptosWatcher extends Watcher {
]);
const timestamp = new Date(Number(block.block_timestamp) / 1000).toISOString();
const blockKey = [block.block_height, timestamp, sequence_number].join('/'); // use custom block key for now so we can include sequence number
const emitter = data.sender.padStart(64, '0');
// Data.sender is a decimal as a string. It needs to be hexadecimal.
const emitter = BigInt(data.sender).toString(16).padStart(64, '0');
const vaaKey = makeVaaKey(transaction.hash, this.chain, emitter, data.sequence);
vaasByBlock[blockKey] = [...(vaasByBlock[blockKey] ?? []), vaaKey];
})
Expand Down

0 comments on commit 228154e

Please sign in to comment.