Skip to content

Commit 9dea73c

Browse files
committed
watcher: fix aptos emitter format
1 parent 917d310 commit 9dea73c

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)