-
Notifications
You must be signed in to change notification settings - Fork 170
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
feat(oracle): add timestamp to exchange rates #2254
Conversation
Codecov Report
@@ Coverage Diff @@
## main #2254 +/- ##
==========================================
- Coverage 75.38% 70.50% -4.89%
==========================================
Files 100 169 +69
Lines 8025 12735 +4710
==========================================
+ Hits 6050 8979 +2929
- Misses 1589 3155 +1566
- Partials 386 601 +215
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
first quick review
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As noted in the previous review you only need new type for Genesis.
So, instead of changing ExchangeRate
, keep it as is, and don't change Set/GetExchange rate. Instead, as you did in the latest version, use DenomExchangeRate
(and add denom there) for Genesis.
Merge queue setting changed
and using ExchangeRate for return types on oracle
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left comments - my main concerns are codec usage and making sure we don't accidentally mess with upper/lower case in a way that needs a migration or affects mainnet
I did not use codec for ExchangeRate because it is only just go struct and I revert the UMEE to umee in defaultParams |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Check comments - other than that I have no more issues
* add timestamp to denom price * address the first review comments * add SetExchangeRateWithTimestamp func * storing rate and timestamp without denom into exg rates * renamed ExchangeRate to DenomExchangeRate on oracle genesis and using ExchangeRate for return types on oracle * address the review comments * add some tests and cli query for getting timestamps of exgrates * add tests to cli and grpc exg rates with timestamp req * fix the tests on oracle * fix the tests --------- Co-authored-by: Adam Moser <63419657+toteki@users.noreply.github.com>
Description
closes: #XXXX
Author Checklist
All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.
I have...
!
to the type prefix if API or client breaking changeCHANGELOG.md
Reviewers Checklist
All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.
I have...