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(ramp): add sell fields to order details view #7742

Merged
merged 58 commits into from
Nov 16, 2023

Conversation

georgeweiler
Copy link
Contributor

Description

Adds support on the order details page for sell orders.

Related issues

N/A This is a new feature

Manual testing steps

Add a sell order to your app state and check the order details page

Screenshots/Recordings

Before

After

Screenshot 2023-11-09 at 10 49 01 AM

Pre-merge author checklist

  • I’ve followed MetaMask Coding Standards.
  • I've clearly explained what problem this PR is solving and how it is solved.
  • I've linked related issues
  • I've included manual testing steps
  • I've included screenshots/recordings if applicable
  • I’ve included tests if applicable
  • I’ve documented my code using JSDoc format if applicable
  • I’ve applied the right labels on the PR (see labeling guidelines). Not required for external contributors.
  • I’ve properly set the pull request status:
    • In case it's not yet "ready for review", I've set it to "draft".
    • In case it's "ready for review", I've changed it from "draft" to "non-draft".

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

wachunei and others added 30 commits October 17, 2023 15:24
Copy link
Member

@wachunei wachunei left a comment

Choose a reason for hiding this comment

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

LGTM

@wachunei wachunei removed the needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) label Nov 14, 2023
@georgeweiler georgeweiler marked this pull request as ready for review November 14, 2023 16:07
Copy link
Contributor

E2E test started on Bitrise: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/2a856aeb-942a-4879-b059-2b160cb1ac6a
You can also kick off another Bitrise E2E smoke test by removing and re-applying the (Run Smoke E2E) label

Copy link
Contributor

@Cal-L Cal-L left a comment

Choose a reason for hiding this comment

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

Left some comments

const handleMakeAnotherPurchase = useCallback(() => {
navigation.goBack();
navigation.navigate(Routes.RAMP.BUY);
}, [navigation]);
navigation.navigate(
Copy link
Contributor

Choose a reason for hiding this comment

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

Does the UI respond the same way if you remove navigation.goBack or do both pages live on the same stack?

Copy link
Member

Choose a reason for hiding this comment

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

They are not on the same stack, the back dismisses the current order details and then the navigate opens the Buy or Sell flow.

<ErrorView
description={error}
ctaOnPress={handleOnRefresh}
location="Order Details Screen"
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a constants file that we can put this in?

Copy link
Member

Choose a reason for hiding this comment

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

Yes this is already a type, if you input anything different than what's defined it will error (location type mismatch). https://github.com/MetaMask/metamask-mobile/blob/feat/ramp-sell-order-details/app/components/UI/Ramp/common/types/analytics.ts#L1-L12

@georgeweiler georgeweiler force-pushed the feat/ramp-sell-order-details branch 2 times, most recently from 63a00d0 to abba5fc Compare November 16, 2023 15:34
@wachunei
Copy link
Member

@Cal-L this is ready for your re-review. I have responded to your comments. Since your last review we have:

  • Removed wrongly placed Cancel buttons from the OrderDetails and SendTransaction view (e2331b9, abba5fc)
  • Fixed some of the displaying rows in the OrderDetails view (35e5e5c, c73ab01)
  • Added a localization for the previously mentioned point (b0d789f)
  • Added an automatic redirection to the SendTransaction view when adding an order (a251b1b)
  • Added test for the redirection and analytics (59868b1)

@wachunei wachunei force-pushed the feat/ramp-sell-order-details branch from 12a7983 to 59868b1 Compare November 16, 2023 19:41
@wachunei
Copy link
Member

@Cal-L any further comments/changes will be addressed in a new PR

Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 4 Code Smells

77.1% 77.1% Coverage
0.0% 0.0% Duplication

@bkirb
Copy link
Contributor

bkirb commented Nov 16, 2023

@georgeweiler LGTM I verified the order details view ✅

@wachunei wachunei merged commit dbc7519 into feat/off-ramp Nov 16, 2023
@wachunei wachunei deleted the feat/ramp-sell-order-details branch November 16, 2023 19:55
@github-actions github-actions bot locked and limited conversation to collaborators Nov 16, 2023
@Cal-L
Copy link
Contributor

Cal-L commented Nov 16, 2023

@Cal-L any further comments/changes will be addressed in a new PR

Sounds good!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
needs-ramp-qa Tickets that need feature QA on the ramps flows team-ramp issues related to Ramp features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants