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

Investigate & fix bug: Gas data is not available on "mainnet" network #130

Open
2 tasks
florianstoecker opened this issue Mar 7, 2022 · 1 comment
Open
2 tasks
Labels
bug Something isn't working

Comments

@florianstoecker
Copy link
Contributor

florianstoecker commented Mar 7, 2022

Goal
Know where the bug came from & have it fixed.

Context
This Sunday at around 2pm, I got a Twitter notification that an auction has started. After visiting auctions.makerdao.com/collateral, an error was shown in the auctions table (See assets for screenshot of the auctions table & console message). I've tested it out on mobile & computer. The error was shown on both devices for me.

Re-visiting the page after some time, the error disappeared for me.

Tasks

  • Investigate the error & document your findings here.
  • Fix the error.

Assets
image

image

@florianstoecker florianstoecker added the bug Something isn't working label Mar 7, 2022
@valiafetisov
Copy link
Contributor

The issue is obviously thrown at getGasPrice:

export const getGasPrice = async function (network: string): Promise<BigNumber> {
const networkConfig = getNetworkConfigByType(network);
if (networkConfig.gasPrice) {
return new BigNumber(networkConfig.gasPrice).shiftedBy(-ETH_NUMBER_OF_DIGITS);
}
try {
return await getCurrentGasPrice();
} catch (error) {
throw new Error(`Gas data is not available on "${network}" network`);
}
};

And we use getGasPrice when calculating auction fees.

Since we expect that gas price endpoint can be down (and it is periodically down, since it's a free service), we should not depend the whole website on it. What we can do:

I think a combination of B + C or A + B + C would be good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants