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

Add On-Ramp Aggregator Analytics #4362

Merged
merged 7 commits into from
May 23, 2022

Conversation

wachunei
Copy link
Member

No description provided.

@wachunei wachunei requested a review from a team as a code owner May 18, 2022 00:10
@wachunei
Copy link
Member Author

ah, forgot to run snapshots updates

Comment on lines +377 to +380
const amountIsBelowMinimum = useMemo(
() => amountNumber !== 0 && limits && amountNumber < limits.minAmount,
[amountNumber, limits],
);
Copy link
Member

Choose a reason for hiding this comment

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

I think using useMemo for basic methods can harm the performance. I'll leave this article here as reference

https://kentcdodds.com/blog/usememo-and-usecallback

Copy link
Member Author

Choose a reason for hiding this comment

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

I agree

amount: number;
location: ScreenLocation;
};
ONRAMP_CANCELED: {
Copy link
Member

Choose a reason for hiding this comment

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

I just noticed we have this inconsistency between "Canceled" and "Cancelled"

Suggested change
ONRAMP_CANCELED: {
ONRAMP_CANCELLED: {

Copy link
Member Author

Choose a reason for hiding this comment

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

Great catch. I will update.

Copy link
Member Author

Choose a reason for hiding this comment

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

I just checked, this is not a mistake.

Copy link
Member

@gantunesr gantunesr May 18, 2022

Choose a reason for hiding this comment

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

I see, regardless we should agree on using only one word (nitpick). In this same PR you can see that CANCELLED and CANCELED are being used, this occurs in other parts of the app too.

Choose a reason for hiding this comment

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

Good catch. Let's go with Canceled—this is what John Brennan recommends in the new MetaMetrics Improvement Proposal.

app/util/analyticsV2.js Show resolved Hide resolved
app/util/analyticsV2.js Show resolved Hide resolved
Copy link
Member

@gantunesr gantunesr left a comment

Choose a reason for hiding this comment

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

LGTM

There are two minor comments to be resolved. I don't think it's reason enough to block this PR, I'll leave it to @wachunei to solve them now or in another development.

@wachunei wachunei merged commit 8727fc0 into release/5.2.0 May 23, 2022
@wachunei wachunei deleted the feature/onramp-analytics-5.2.0 branch May 23, 2022 22:57
@github-actions github-actions bot locked and limited conversation to collaborators May 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants