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

Get eth price, update deps #88

Merged
merged 9 commits into from
Feb 7, 2022
Merged

Get eth price, update deps #88

merged 9 commits into from
Feb 7, 2022

Conversation

kchojn
Copy link
Collaborator

@kchojn kchojn commented Feb 1, 2022

  • support EthTx 0.3.9 version
  • add current ETH price to the transaction page

if response.status_code == 200:
eth_price = float(json.loads(response.content)["data"]["amount"])
return eth_price

Copy link
Contributor

Choose a reason for hiding this comment

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

Guess we can return 0 at least if coinbase is not responding

Copy link
Contributor

Choose a reason for hiding this comment

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

And some caching is required, global var that holds price and timestamp to see when was the last time we got a price, we could refresh it every 5 minutes or something similar

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done

@kchojn kchojn deleted the branch EthTx:dev February 7, 2022 11:47
@kchojn kchojn closed this Feb 7, 2022
@kchojn kchojn reopened this Feb 7, 2022
feld and others added 2 commits February 7, 2022 12:52
* You must provide a default database in the connection string or it will fail to start
* Remove duplicated ENVs
@kchojn kchojn merged commit ec464a4 into EthTx:dev Feb 7, 2022
@kchojn kchojn deleted the dev branch February 7, 2022 12:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants