Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
jdevcs committed Oct 4, 2023
1 parent 0aade03 commit 9323849
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions packages/web3-eth/src/utils/wait_for_transaction_receipt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,14 @@ export async function waitForTransactionReceipt<ReturnFormat extends DataFormat>
const pollingInterval =
web3Context.transactionReceiptPollingInterval ?? web3Context.transactionPollingInterval;

const [awaitableTransactionReceipt, IntervalId] = pollTillDefinedAndReturnIntervalId(
async () => {
try {
return getTransactionReceipt(web3Context, transactionHash, returnFormat);
} catch (error) {
console.warn('An error happen while trying to get the transaction receipt', error);
return undefined;
}
},
pollingInterval
);
const [awaitableTransactionReceipt, IntervalId] = pollTillDefinedAndReturnIntervalId(async () => {

Check warning on line 38 in packages/web3-eth/src/utils/wait_for_transaction_receipt.ts

View check run for this annotation

Codecov / codecov/patch

packages/web3-eth/src/utils/wait_for_transaction_receipt.ts#L38

Added line #L38 was not covered by tests
try {
return getTransactionReceipt(web3Context, transactionHash, returnFormat);
} catch (error) {
console.warn('An error happen while trying to get the transaction receipt', error);
return undefined;
}
}, pollingInterval);

const [timeoutId, rejectOnTimeout] = rejectIfTimeout(
web3Context.transactionPollingTimeout,
Expand Down

0 comments on commit 9323849

Please sign in to comment.