[#964] feat: 14 decimal places for prices in db#966
Merged
Conversation
Klakurka
approved these changes
Feb 25, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related to #964
Description
Updates DB to have 14 decimal digits for price values.
Test plan
paybutton-devcontainer (yarn docker ns) and runyarn prisma migrate devPriceentries in the database now have 14 decimal digits. These digits so far should be the same as before, but padded with 6 extra zeroes.payubutton-devcontainer, runyarn updateAllPrices. Confirm you want to update the prices.Pricedb now. The entries now should have the complete 14 digits information, not only the 0-padded values of before.Remarks
Many prices do actually end with some zeroes at the end, especially the BCH prices which at the least will have 3 right side zeroes. To see prices that should have 14 significant decimal digits:
select * from Price where networkId = 1 order by timestamp desc limit 16;