Skip to content

Commit

Permalink
Merge pull request #11 from matter-labs/deniallugo-set-timeout
Browse files Browse the repository at this point in the history
Set timeout for sending eth
  • Loading branch information
Deniallugo authored Nov 24, 2022
2 parents cba5257 + 5af1c35 commit b48edff
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,8 @@ async function sendETH(ethWallet: ethers.Wallet, to: string, amount: BigNumber)
gasPrice
});
console.log(`Sending ${ethers.utils.formatEther(amount)} ETH to ${to}, tx hash: ${tx.hash}`);
await tx.wait();

// Do not wait for more than 30 minutes
await ethWallet.provider.waitForTransaction(tx.hash, 3, 1800000);
console.log(`Transfer has succeded, tx hash: ${tx.hash}`);
});
} else {
Expand Down

0 comments on commit b48edff

Please sign in to comment.