Skip to content

Commit ce9990f

Browse files
authored
fix: min gas (#940)
1 parent f063864 commit ce9990f

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

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

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,12 @@ export class EthereumStorageEthers implements StorageTypes.IStorageWrite {
6262
);
6363
const maxPriorityFeePerGas = BigNumber.from(suggestedFee.maxPriorityFeeSuggestions.urgent);
6464
const maxFeePerGas = maxPriorityFeePerGas.add(suggestedFee.baseFeeSuggestion);
65-
overrides.maxPriorityFeePerGas = maxPriorityFeePerGas;
66-
overrides.maxFeePerGas = maxFeePerGas;
65+
if (maxPriorityFeePerGas.gt(0)) {
66+
overrides.maxPriorityFeePerGas = maxPriorityFeePerGas;
67+
}
68+
if (maxFeePerGas.gt(0)) {
69+
overrides.maxFeePerGas = maxFeePerGas;
70+
}
6771
}
6872
const tx = await this.hashSubmitter.submitHash(
6973
ipfsHash,

packages/payment-detection/test/eth/info-retriever.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ describe('api/eth/info-retriever', () => {
3333
);
3434
expect(typeof events[0].parameters!.block).toBe('number');
3535
expect(typeof events[0].parameters!.confirmations).toBe('number');
36-
});
36+
}, 10000);
3737

3838
it('throws when trying to use it in local', async () => {
3939
const infoRetreiver = new EthInputDataInfoRetriever(

0 commit comments

Comments
 (0)