Skip to content

Commit

Permalink
fix: provide all available data from sequencer GetTransaction
Browse files Browse the repository at this point in the history
  • Loading branch information
tabaktoni committed Oct 13, 2022
1 parent 7fca26d commit f3d2969
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/utils/responseParser/sequencer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ export class SequencerAPIResponseParser extends ResponseParser {
res: Sequencer.GetTransactionResponse
): GetTransactionResponse {
return {
...res,
calldata: 'calldata' in res.transaction ? (res.transaction.calldata as Array<string>) : [],
contract_address:
'contract_address' in res.transaction ? res.transaction.contract_address : undefined,
Expand Down Expand Up @@ -68,7 +69,7 @@ export class SequencerAPIResponseParser extends ResponseParser {
...('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'],
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 f3d2969

Please sign in to comment.