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

feat: APP-396 two decimal digits for usd amount #2544

Open
wants to merge 4 commits into
base: dev
Choose a base branch
from

Conversation

r41ph
Copy link
Contributor

@r41ph r41ph commented Nov 13, 2024

Description

https://regennetwork.atlassian.net/browse/APP-396

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...

  • provided a link to the relevant issue or specification
  • provided instructions on how to test
  • reviewed "Files changed" and left comments if necessary
  • confirmed all CI checks have passed

How to test

  1. https://deploy-preview-2544--regen-marketplace.netlify.app/project/mai-ndombe-4/buy
  2. Verify that the currency input when set to USD only accepts two decimals.
  3. Verify that an error is shown when the amount of USD is less than 0.50

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...

  • confirmed all author checklist items have been addressed
  • reviewed code correctness and readability
  • verified React components follow DRY principles
  • reviewed documentation is accurate
  • reviewed tests
  • manually tested (if applicable)

Copy link

netlify bot commented Nov 13, 2024

Deploy Preview for regen-website ready!

Name Link
🔨 Latest commit c1c129a
🔍 Latest deploy log https://app.netlify.com/sites/regen-website/deploys/6734a9b09082980008e92753
😎 Deploy Preview https://deploy-preview-2544--regen-website.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Contributor

mergify bot commented Nov 13, 2024

⚠️ The sha of the head commit of this PR conflicts with #2538. Mergify cannot evaluate rules on this PR. ⚠️

Copy link

netlify bot commented Nov 13, 2024

Deploy Preview for terrasos ready!

Name Link
🔨 Latest commit c1c129a
🔍 Latest deploy log https://app.netlify.com/sites/terrasos/deploys/6734a9b03d6d860008534333
😎 Deploy Preview https://deploy-preview-2544--terrasos.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@r41ph r41ph requested a review from blushi November 13, 2024 13:37
@r41ph
Copy link
Contributor Author

r41ph commented Nov 13, 2024

@erikalogie one thing to consider is if we want to round up the currency amount when in USD because when we cut the decimals o two we may end up charging less than the actual credits price - let me know what you think

@blushi
Copy link
Member

blushi commented Nov 18, 2024

@erikalogie one thing to consider is if we want to round up the currency amount when in USD because when we cut the decimals o two we may end up charging less than the actual credits price - let me know what you think

@erikalogie @S4mmyb any thoughts on this?
Imagine the exact amount is $10.897, should we charge 10.89 or 10.90?

@S4mmyb
Copy link
Member

S4mmyb commented Nov 18, 2024

@erikalogie one thing to consider is if we want to round up the currency amount when in USD because when we cut the decimals o two we may end up charging less than the actual credits price - let me know what you think

@erikalogie @S4mmyb any thoughts on this? Imagine the exact amount is $10.897, should we charge 10.89 or 10.90?

I think we should round.

@erikalogie
Copy link
Collaborator

@erikalogie one thing to consider is if we want to round up the currency amount when in USD because when we cut the decimals o two we may end up charging less than the actual credits price - let me know what you think

@erikalogie @S4mmyb any thoughts on this? Imagine the exact amount is $10.897, should we charge 10.89 or 10.90?

I think we should round up to $10.90 in this case

@blushi
Copy link
Member

blushi commented Nov 20, 2024

@erikalogie one thing to consider is if we want to round up the currency amount when in USD because when we cut the decimals o two we may end up charging less than the actual credits price - let me know what you think

@erikalogie @S4mmyb any thoughts on this? Imagine the exact amount is $10.897, should we charge 10.89 or 10.90?

I think we should round.

I think we should round up to $10.90 in this case

Ok so if it were $10.894, we would charge 10.89.

@S4mmyb
Copy link
Member

S4mmyb commented Nov 20, 2024

@erikalogie one thing to consider is if we want to round up the currency amount when in USD because when we cut the decimals o two we may end up charging less than the actual credits price - let me know what you think

@erikalogie @S4mmyb any thoughts on this? Imagine the exact amount is $10.897, should we charge 10.89 or 10.90?

I think we should round.

I think we should round up to $10.90 in this case

Ok so if it were $10.894, we would charge 10.89.

Yep! <5 we round down, >=5 round up for that third decimal place.

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.

4 participants