Skip to content

Commit

Permalink
Turn defualt gas price value to const, turn log to warn
Browse files Browse the repository at this point in the history
  • Loading branch information
Mihajlo-Pavlovic committed Jan 16, 2024
1 parent 83e3216 commit 87e4dfa
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 2 additions & 0 deletions src/constants/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,8 @@ export const COMMAND_TX_GAS_INCREASE_FACTORS = {
SUBMIT_PROOFS: 1.2,
};

export const GNOSIS_DEFAULT_GAS_PRICE = 2;

export const WEBSOCKET_PROVIDER_OPTIONS = {
reconnect: {
auto: true,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import axios from 'axios';
import Web3Service from '../web3-service.js';
import { BLOCK_TIME_MILLIS } from '../../../../constants/constants.js';
import { BLOCK_TIME_MILLIS, GNOSIS_DEFAULT_GAS_PRICE } from '../../../../constants/constants.js';

class GnosisService extends Web3Service {
constructor(ctx) {
Expand All @@ -26,10 +26,10 @@ class GnosisService extends Web3Service {
this.logger.debug(`Gas price on Gnosis: ${gasPrice}`);
return gasPrice;
} catch (error) {
this.logger.debug(
`Failed to fetch the gas price from the Gnosis: ${error}. Using default value: 2 Gwei.`,
this.logger.warn(
`Failed to fetch the gas price from the Gnosis: ${error}. Using default value: ${GNOSIS_DEFAULT_GAS_PRICE} Gwei.`,
);
this.convertToWei(2, 'gwei');
this.convertToWei(GNOSIS_DEFAULT_GAS_PRICE, 'gwei');
}
}

Expand Down

0 comments on commit 87e4dfa

Please sign in to comment.