Skip to content
This repository has been archived by the owner on Nov 10, 2023. It is now read-only.

fix: check that calculated gas price is a number #3441

Merged
merged 2 commits into from
Feb 7, 2022
Merged

Conversation

iamacook
Copy link
Member

@iamacook iamacook commented Feb 7, 2022

What it solves

Resolves down oracles

How this PR fixes it

Gas price oracles that are down, namely Rinkeby (atm), do not throw when there is an issue but return a string. This was not breaking out of the oracle estimation loop we use.

The fetced gas price is first checked (!isNaN()), throwing if so, before returning it.

How to test it

This is very hard to test because manually switching to another oracle in Django will likely throw. You would likely have to mock the response of an oracle, returning a string (that is not a number).

This is the error returned:

image

Hopefully this PR is reviewed whilst there is an Etherscan issue.

@iamacook iamacook self-assigned this Feb 7, 2022
@github-actions
Copy link

github-actions bot commented Feb 7, 2022

CLA Assistant Lite All Contributors have signed the CLA.

Copy link
Member

@katspaugh katspaugh left a comment

Choose a reason for hiding this comment

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

👍

@github-actions
Copy link

github-actions bot commented Feb 7, 2022

ESLint Summary View Full Report

Annotations are provided inline on the Files Changed tab. You can also see all annotations that were generated on the annotations page.

Type Occurrences Fixable
Errors 0 0
Warnings 0 0
Ignored 0 N/A
  • Result: ✅ success
  • Annotations: 0 total

Report generated by eslint-plus-action

@coveralls
Copy link

coveralls commented Feb 7, 2022

Pull Request Test Coverage Report for Build 1805525864

  • 0 of 4 (0.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.01%) to 33.569%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/logic/wallets/ethTransactions.ts 0 4 0.0%
Totals Coverage Status
Change from base Build 1796214395: -0.01%
Covered Lines: 3167
Relevant Lines: 8465

💛 - Coveralls

Copy link
Member

@usame-algan usame-algan left a comment

Choose a reason for hiding this comment

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

Well done!

@github-actions
Copy link

github-actions bot commented Feb 7, 2022

Deployment links

🟠 Rinkeby Mainnet 🟣 Polygon 🟡 BSC Arbitrum 🟢 Gnosis Chain

@github-actions
Copy link

github-actions bot commented Feb 7, 2022

E2E Tests Failed
Check the results here: https://github.com/gnosis/safe-react-e2e-tests/actions/runs/1805582102

Failed tests:

  • ❌ Read-only transaction creation and review Read-only transaction creation and review

@iamacook iamacook merged commit 60ffbe5 into dev Feb 7, 2022
@iamacook iamacook deleted the check-gas-price branch February 7, 2022 10:02
@github-actions github-actions bot locked and limited conversation to collaborators Feb 7, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants