Skip to content

Commit 228154e

Browse files
committedFeb 21, 2024·
watcher: fix aptos emitter format
1 parent 917d310 commit 228154e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed
 

‎watcher/src/watchers/AptosWatcher.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@ export class AptosWatcher extends Watcher {
6161
]);
6262
const timestamp = new Date(Number(block.block_timestamp) / 1000).toISOString();
6363
const blockKey = [block.block_height, timestamp, sequence_number].join('/'); // use custom block key for now so we can include sequence number
64-
const emitter = data.sender.padStart(64, '0');
64+
// Data.sender is a decimal as a string. It needs to be hexadecimal.
65+
const emitter = BigInt(data.sender).toString(16).padStart(64, '0');
6566
const vaaKey = makeVaaKey(transaction.hash, this.chain, emitter, data.sequence);
6667
vaasByBlock[blockKey] = [...(vaasByBlock[blockKey] ?? []), vaaKey];
6768
})

0 commit comments

Comments
 (0)
Please sign in to comment.