Skip to content

Commit e615141

Browse files
committed
fix: make sure entity keys parsed from tx receipts are always 32 bytes
1 parent 96c9244 commit e615141

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/client.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ export async function createClient(
299299
return {
300300
...receipts,
301301
createEntitiesReceipts: receipts.createEntitiesReceipts.concat([{
302-
entityKey: toHex(parsed.args.entityKey),
302+
entityKey: toHex(parsed.args.entityKey, { size: 32 }),
303303
expirationBlock: Number(parsed.args.expirationBlock),
304304
}]),
305305
}
@@ -308,7 +308,7 @@ export async function createClient(
308308
return {
309309
...receipts,
310310
updateEntitiesReceipts: receipts.updateEntitiesReceipts.concat([{
311-
entityKey: toHex(parsed.args.entityKey),
311+
entityKey: toHex(parsed.args.entityKey, { size: 32 }),
312312
expirationBlock: Number(parsed.args.expirationBlock),
313313
}]),
314314
}
@@ -317,7 +317,7 @@ export async function createClient(
317317
return {
318318
...receipts,
319319
extendEntitiesReceipts: receipts.extendEntitiesReceipts.concat([{
320-
entityKey: toHex(parsed.args.entityKey),
320+
entityKey: toHex(parsed.args.entityKey, { size: 32 }),
321321
newExpirationBlock: Number(parsed.args.newExpirationBlock),
322322
oldExpirationBlock: Number(parsed.args.oldExpirationBlock),
323323
}]),
@@ -327,7 +327,7 @@ export async function createClient(
327327
return {
328328
...receipts,
329329
deleteEntitiesReceipts: receipts.deleteEntitiesReceipts.concat([{
330-
entityKey: toHex(parsed.args.entityKey),
330+
entityKey: toHex(parsed.args.entityKey, { size: 32 }),
331331
}]),
332332
}
333333
}

0 commit comments

Comments
 (0)