Skip to content

Commit

Permalink
Fixed txHash not always present in trace.
Browse files Browse the repository at this point in the history
  • Loading branch information
NoahSaso committed Sep 25, 2023
1 parent 468f3a8 commit da00d45
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions src/scripts/export/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,15 +155,14 @@ const trace = async () => {
file: traceFile,
onData: (data) => {
const tracedEvent = data as TracedEvent
// Ensure this is a traced write event.
// Ensure this is a traced write or delete event.
if (
!objectMatchesStructure(tracedEvent, {
operation: {},
key: {},
value: {},
metadata: {
blockHeight: {},
txHash: {},
},
})
) {
Expand Down
4 changes: 2 additions & 2 deletions src/scripts/export/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ export type TracedEvent = {
value: string
metadata: {
blockHeight: number
txHash: string
store_name: string
txHash?: string
store_name?: string
}
}

Expand Down

0 comments on commit da00d45

Please sign in to comment.