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

Show transaction prices #890

Merged
merged 23 commits into from Jan 19, 2023

Conversation

gabrielmatei
Copy link
Contributor

@gabrielmatei gabrielmatei commented Nov 10, 2022

Reasoning

  • besides value, a usd price would be very helpful to be attached to the transaction operations, so that in situations like metabonding claim rewards, a total usd value of the claimed rewards can be estimated

Proposed Changes

  • remove dependency to data.elrond.com
  • use the plugin to extract token prices, which internally fetches historical price information.
  • ESDT prices are supported only for the tokens listed on xExchange and Jungle DEX

How to test

  • /transactions?function=claimRewards&withOperations=true should return valueUsd for each operation with supported tokens
  • /transactions/:txHash should return valueUsd for each operation with supported tokens

@gabrielmatei gabrielmatei marked this pull request as ready for review November 10, 2022 18:16
@codecov-commenter
Copy link

codecov-commenter commented Nov 10, 2022

Codecov Report

Base: 25.09% // Head: 25.18% // Increases project coverage by +0.09% 🎉

Coverage data is based on head (e673fed) compared to base (6817b09).
Patch coverage: 33.33% of modified lines in pull request are covered.

Additional details and impacted files
@@               Coverage Diff               @@
##           development     #890      +/-   ##
===============================================
+ Coverage        25.09%   25.18%   +0.09%     
===============================================
  Files                8        8              
  Lines              263      266       +3     
  Branches            10       10              
===============================================
+ Hits                66       67       +1     
- Misses             187      189       +2     
  Partials            10       10              
Flag Coverage Δ
unittests 25.18% <33.33%> (+0.09%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/utils/cache.info.ts 50.57% <33.33%> (-0.62%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@cfaur09 cfaur09 self-requested a review November 11, 2022 08:53
@gabrielmatei

This comment was marked as outdated.

@tanghel tanghel added the feature New feature or request label Jan 18, 2023
tanghel
tanghel previously approved these changes Jan 19, 2023
@tanghel tanghel merged commit d52e882 into development Jan 19, 2023
@tanghel tanghel deleted the SERVICES-708-transaction-token-operation-price branch January 19, 2023 14:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants