-
Notifications
You must be signed in to change notification settings - Fork 9
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-363 another user purchased credits modal #2500
base: dev
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for regen-website ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Relevant files: |
@blushi I'm not sure how @erikalogie @clevinson can test this, can you help please? |
They need to go through the buy flow with an initial user but then before clicking "purchase", they need to purchase the same credits (with crypto, since fiat microservice PR is not merged yet) with another account in another incognito window or another browser (or with CLI for @clevinson), testing the 2 cases:
|
Is there any 'testing' user I can use to do this myself too? |
6e7c705
to
cc6f2a3
Compare
Can I test this with credit card now? |
yes, but both users should purchase with credit card so the same sell orders get selected |
I am trying to purchase with credit card but the next button is greyed out, not sure what I am doing wrong: Screen.Recording.2024-10-17.at.7.23.49.AM.mov |
are you logged in? with which type of account? |
I am logged in with a web 3.0 account that has no email associated. So in this case, the email field should not be optional, as it shows here. Should this be a separate bug @blushi? |
yes please file a separate bug |
|
@blushi @r41ph I'm really having a lot of trouble testing this and getting it to work, there seem to be some bugs: https://www.loom.com/share/41b9dfb86ea14b1f8f4d4aac0198f35b |
could you try clearing your browser cache to see if that helps? |
The reason for having tradable credits selected might be that you tested the crypto flow with tradable credits but didn't go through the end so it kept this last step in your local storage. Then you got logged out and you come back to this saved step. We keep |
Yes that would be great. Could you open a separate issue if you think it should be separate and put in this sprint? |
Ok here is what is happening for me now: https://www.loom.com/share/ad7c0db6177e4f5fb2ba3db0e46c2798 |
The email login issue is unrelated to this, not sure what's happening, it looks like it doesn't work anymore on prod too. I'll check the server logs. |
Related to this, I've noticed that if I go back in the flow after selecting the crypto option, choose "credit card" and enter some number, then navigate away and click the "buy" button again on the same project page, I would expect to end up at the last screen I was on, which is actually first screen of the flow with credit card selected, not the last screen. Probably not the most important to address right away as most users won't be toggling between the two flows because very few people will use the keplr option. |
Nevermind, got the email on prod, I guess the server took a bit more time to process it or my email client was laggy. |
I see, right now, we only save the step as soon as the user hits the "next" button so I guess we should upgrade that to change as soon as we visit a given step. Could you create an issue for that? |
Yeah this isn't related to this work so should be in a separate issue: https://regennetwork.atlassian.net/browse/APP-409 |
|
0f9ae2c
to
0ecdb23
Compare
@erikalogie I have added the missing translations. |
LGTM |
1 similar comment
LGTM |
This use case in 1. doesn't seem to be handled properly. |
): BuyWarningModalContent | undefined => { | ||
if ( | ||
currency?.askDenom === USD_DENOM && | ||
(isWeb2UserWithoutWallet || isVisitingUser) && |
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.
I believe this is because of this check, I don't think we should limit this to visiting or web2 users without wallet
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.
Do you think we should remove line 79 altogether?
I've removed the type of user check
Testing this with a web3 user, trying to buy credits for a project with all credits that got sold in the mean time, I get https://www.figma.com/design/BTuUv6QXY4GbliZcXCe8RJ/Fiat-payments?node-id=179-109428&node-type=instance&m=dev instead of https://www.figma.com/design/BTuUv6QXY4GbliZcXCe8RJ/Fiat-payments?node-id=360-62730&node-type=instance&m=dev |
6a4e40c
to
f13e282
Compare
@blushi this is ready for another look |
Description
https://regennetwork.atlassian.net/browse/APP-363
This PR also addresses https://regennetwork.atlassian.net/browse/APP-409
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...
How to test
https://deploy-preview-2500--regen-marketplace.netlify.app/projects/1
If a web2 user or a visiting user is trying to buy credits with USD and the selected credits are not available anymore and there is other sell orders with credits, the modal with copy "Sorry, another user has purchased all of the USD credits you selected!" should open -> https://www.figma.com/design/BTuUv6QXY4GbliZcXCe8RJ/Fiat-payments?node-id=5596-91315&node-type=instance&m=dev
When trying to buy credits, if there are no credits available in all the sell orders, the modal with copy "Sorry, another user has purchased all of the available credits from this project" should open. -> https://www.figma.com/design/BTuUv6QXY4GbliZcXCe8RJ/Fiat-payments?node-id=360-62730&node-type=instance&m=dev
If another user has bought some or all of the credits available to purchase, then the modal with copy "Sorry, another user has purchased some or all of the credits you selected!" should open. -> https://www.figma.com/design/BTuUv6QXY4GbliZcXCe8RJ/Fiat-payments?node-id=179-109428&node-type=instance&m=dev
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...