Skip to content

[#964] feat: 14 decimal places for prices in db#966

Merged
Klakurka merged 3 commits intomasterfrom
feat/14-decimal-places-for-prices-in-db
Feb 25, 2025
Merged

[#964] feat: 14 decimal places for prices in db#966
Klakurka merged 3 commits intomasterfrom
feat/14-decimal-places-for-prices-in-db

Conversation

@chedieck
Copy link
Copy Markdown
Collaborator

Related to #964

Description

Updates DB to have 14 decimal digits for price values.

Test plan

  1. After checking out this branch, enter the paybutton-dev container (yarn docker ns) and run yarn prisma migrate dev
  2. Verify Price entries in the database now have 14 decimal digits. These digits so far should be the same as before, but padded with 6 extra zeroes.
  3. Again inside the payubutton-dev container, run yarn updateAllPrices. Confirm you want to update the prices.
  4. Check the Price db 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;

@Klakurka Klakurka self-requested a review February 25, 2025 18:03
@Klakurka Klakurka merged commit e4f2839 into master Feb 25, 2025
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.

2 participants