Skip to content

Commit

Permalink
fix: getPriorityOpResponse correctly assigns waitL1Commit to l2Respon…
Browse files Browse the repository at this point in the history
…se object
  • Loading branch information
danijelTxFusion committed May 9, 2024
1 parent 9a81cc2 commit a0a0cef
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1697,7 +1697,9 @@ export class Provider extends ethers.providers.JsonRpcProvider {
): Promise<PriorityOpResponse> {
const l2Response = {...l1TxResponse} as PriorityOpResponse;

l2Response.waitL1Commit = l2Response.wait;
l2Response.waitL1Commit = l1TxResponse.wait.bind(
l1TxResponse
) as PriorityOpResponse['wait'];
l2Response.wait = async () => {
const l2Tx = await this.getL2TransactionFromPriorityOp(l1TxResponse);
return await l2Tx.wait();
Expand Down

0 comments on commit a0a0cef

Please sign in to comment.