Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure Gas Prices is at least 2 GWEI when on Gnosis Chain #3630

Merged
merged 1 commit into from
Jul 15, 2022

Conversation

rdig
Copy link
Member

@rdig rdig commented Jul 14, 2022

Exactly as it says on the tin, when on Gnosis Chain, if the gas estimate from the Oracle will be less than 2, set it to 2, otherwise, use the value from the Oracle.

This is to counteract transactions failing to be sent out, if the Gas paid was lower.

Granted this should't be that much of a problem anymore, with the advent of Metatransactions, but since we've been running this code in production since before the Token Sale, might as well merge it in.

@rdig rdig requested a review from a team July 14, 2022 13:24
@rdig rdig self-assigned this Jul 14, 2022
Copy link
Collaborator

@willm30 willm30 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Noted a couple of character-saving suggestions.

@@ -97,18 +97,33 @@ const fetchGasPrices = async (
// API prices are in Gwei, so they need to be normalised
const oneGwei = bigNumberify(10 ** 9);

let { average } = data;
let { fast } = data;
/*
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could be written as

let { average, fast } = data;

src/modules/core/sagas/utils/getGasPrices.ts Show resolved Hide resolved
Copy link
Contributor

@chinins chinins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Beautiful!

@rdig rdig force-pushed the maintenance/ensure-2gwei-gas-price branch from 46b3adf to 294bcc7 Compare July 15, 2022 09:44
@rdig rdig merged commit d9543e2 into master Jul 15, 2022
@rdig rdig deleted the maintenance/ensure-2gwei-gas-price branch July 15, 2022 10:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants