Skip to content

Commit 1542565

Browse files
committed
Actually use getDefaultEthereumBlockConfirmations
1 parent 34f562a commit 1542565

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

packages/ethereum-storage/src/ethereum-storage-ethers.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { CurrencyTypes, LogTypes, StorageTypes } from '@requestnetwork/types';
55
import { requestHashSubmitterArtifact } from '@requestnetwork/smart-contracts';
66
import { EthereumTransactionSubmitter } from './ethereum-tx-submitter';
77
import { getCurrentTimestampInSecond, SimpleLogger } from '@requestnetwork/utils';
8+
import { getDefaultEthereumBlockConfirmations } from './config';
89

910
export type GasDefinerProps = {
1011
gasPriceMin?: BigNumber;
@@ -85,7 +86,7 @@ export class EthereumStorageEthers implements StorageTypes.IStorageWrite {
8586
this.logger.debug(`TX ${tx.hash} submitted, waiting for confirmation...`);
8687

8788
void tx
88-
.wait(this.blockConfirmations)
89+
.wait(this.blockConfirmations || getDefaultEthereumBlockConfirmations())
8990
.then((receipt: providers.TransactionReceipt) => {
9091
this.logger.debug(
9192
`TX ${receipt.transactionHash} confirmed at block ${receipt.blockNumber}`,

packages/request-node/src/config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ const defaultValues: any = {
1919
networkId: 0,
2020
web3ProviderUrl: 'http://localhost:8545',
2121
gasPriceMin: '1000000000', // one gwei
22+
blockConfirmations: 2,
2223
},
2324
ipfs: {
2425
host: 'localhost',

0 commit comments

Comments
 (0)