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

fix: APP-571 disable credit card option when available fiat credits are below $0.5 #2592

Merged
merged 3 commits into from
Feb 10, 2025

Conversation

blushi
Copy link
Member

@blushi blushi commented Feb 6, 2025

Description

Closes: https://regennetwork.atlassian.net/browse/APP-571


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

This can be tested on https://deploy-preview-2592--regen-marketplace.netlify.app/project/C01-010
As you can on Sanity, this project has some fiat sell orders set up: https://regen.sanity.studio/staging/structure/shared;projects;english;c9ae90a7-d3d4-4ffa-b1da-baf573b783f6
with corresponding quantities: http://redwood.regen.network:1317/regen/ecocredit/marketplace/v1/sell-orders/413 has 1 and http://redwood.regen.network:1317/regen/ecocredit/marketplace/v1/sell-orders/414 has 2 credits
but if buying all fiat credits, it would result in 0.11 + 0.12 = 0.3 which is lower than $0.5 (min accepted by Stripe) so:

  • as a visiting user, you should see "Choose how to purchase credits" popup when clicking on buy
  • as a web3 user (not the seller), you should be able to click "buy" but only crypto buying option is available

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 Feb 6, 2025

Deploy Preview for regen-website ready!

Name Link
🔨 Latest commit df15a88
🔍 Latest deploy log https://app.netlify.com/sites/regen-website/deploys/67aa2b775ea1780008547948
😎 Deploy Preview https://deploy-preview-2592--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.

Comment on lines +55 to +59
value >= MIN_USD_CURRENCY_AMOUNT,
{
message: `${i18n._(MIN_USD_AMOUNT)} 0.5`,
message: `${i18n._(
MIN_USD_AMOUNT,
)} ${MIN_USD_CURRENCY_AMOUNT.toLocaleString()}`,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unrelated but just thought I would use our const instead of 0.5 directly

@blushi blushi requested a review from r41ph February 6, 2025 11:03
Copy link

netlify bot commented Feb 6, 2025

Deploy Preview for terrasos ready!

Name Link
🔨 Latest commit df15a88
🔍 Latest deploy log https://app.netlify.com/sites/terrasos/deploys/67aa2b7707947a000874a589
😎 Deploy Preview https://deploy-preview-2592--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.

@blushi
Copy link
Member Author

blushi commented Feb 6, 2025

@erikalogie @S4mmyb see testing instructions

@erikalogie
Copy link
Collaborator

This is working as expected

@blushi blushi merged commit 5d5d78d into dev Feb 10, 2025
18 checks passed
@blushi blushi deleted the fix-APP-571-disable-card-less-min-usd-price branch February 10, 2025 16:47
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.

3 participants