Skip to content
This repository has been archived by the owner on Sep 28, 2022. It is now read-only.

Revert 1559 updates #316

Merged
merged 1 commit into from
Dec 15, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions packages/dai/src/eth/TransactionManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -184,11 +184,7 @@ export default class TransactionManager extends PublicService {

if (!this.get('gas').disablePrice) {
let txSpeed = options.transactionSpeed;
options.maxFeePerGas = await this.get('gas').getGasPrice(txSpeed);
options.maxPriorityFeePerGas = this.get('web3')._web3.utils.toWei(
(2.5).toString(),
'gwei'
);
options.gasPrice = await this.get('gas').getGasPrice(txSpeed);
}

return {
Expand Down
13 changes: 3 additions & 10 deletions packages/dai/test/eth/TransactionManager.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,7 @@ test('wrapped contract call adds nonce, web3 settings', async () => {
{
gasLimit: 1234567,
nonce: expect.any(Number),
maxFeePerGas: gasPrice,
maxPriorityFeePerGas: '2500000000'
gasPrice: gasPrice
}
);
}, 30000);
Expand Down Expand Up @@ -322,12 +321,7 @@ describe('transaction options', () => {
'open',
[]
);
expect(Object.keys(options)).toEqual([
'gasLimit',
'maxFeePerGas',
'maxPriorityFeePerGas',
'nonce'
]);
expect(Object.keys(options)).toEqual(['gasLimit', 'gasPrice', 'nonce']);

txManager.get('gas').disablePrice = true;
options = await txManager._buildTransactionOptions(
Expand All @@ -349,8 +343,7 @@ describe('transaction options', () => {
expect(Object.keys(options)).toEqual([
'value',
'gasLimit',
'maxFeePerGas',
'maxPriorityFeePerGas',
'gasPrice',
'nonce'
]);
}, 30000);
Expand Down