Skip to content

Commit

Permalink
Merge pull request #342 from 0xs34n/fix/issue-296
Browse files Browse the repository at this point in the history
fix: issue 296 GetTransactionReceiptResponse
  • Loading branch information
ivpavici authored Sep 27, 2022
2 parents 8a2d2f1 + 96630b3 commit 292037a
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions src/utils/responseParser/sequencer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,20 @@ export class SequencerAPIResponseParser extends ResponseParser {
): GetTransactionReceiptResponse {
return {
transaction_hash: res.transaction_hash,
actual_fee: 'actual_fee' in res ? res.actual_fee : undefined,
status: res.status,
status_data: undefined,
messages_sent: res.l2_to_l1_messages as any, // TODO: parse
events: res.events as any,
l1_origin_message: undefined,
...('block_hash' in res && { block_hash: res.block_hash }),
...('block_number' in res && { block_number: res.block_number }),
...('actual_fee' in res && { actual_fee: res.actual_fee }),
...('transaction_index' in res && { transaction_index: res.transaction_index }),
...('execution_resources' in res && { execution_resources: res.execution_resources }),
...('l1_to_l2_consumed_message' in res && {
l1_to_l2_consumed_message: res['l1_to_l2_consumed_message'],
}),
...('transaction_failure_reason' in res && {
transaction_failure_reason: res.transaction_failure_reason,
}),
};
}

Expand Down

0 comments on commit 292037a

Please sign in to comment.