-
Notifications
You must be signed in to change notification settings - Fork 884
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
Ads History should be displayed in reverse chronological order #4109
Conversation
6eb3b6c
to
16f13e7
Compare
bd95911
to
6366e87
Compare
7d9a5a3
to
9866b39
Compare
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.
iOS changes look good
396d7d8
to
1384c2e
Compare
cc167e3
to
d7aa2bc
Compare
@@ -253,14 +253,14 @@ declare namespace Rewards { | |||
args: Record<string, string> | |||
} | |||
|
|||
export interface AdsHistoryData { | |||
export interface AdsHistory { |
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.
nit: it's really hard to see a difference between AdsHistory
and AdHistory
, so maybe revert to AdHistoryDetail
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.
AdsHistory
is the plural version of AdHistory
due to needed serialization and deserialization. Prefer to leave the same as they are related
let groupedAdsHistory: Rewards.AdsHistory[] = [] | ||
|
||
for (let i = 0; i < adsHistory.length; i++) { | ||
const adHistory = adsHistory[i] |
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.
could this be null/undefined? I think it would be good to check it
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.
This cannot be null or undefined
const flooredDateString = flooredDate.toLocaleDateString() | ||
|
||
for (let j = 0; j < adHistory.adDetailRows.length; j++) { | ||
const adDetailRow = this.getAdDetailRow(adHistory.adDetailRows[j]) |
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.
could this be null/undefined? I think it would be good to check it
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.
This cannot be null or undefined
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.
left some nits. Please check why macOS failed, you can run just CI for macOS as it passed on all other platforms
macOS failed for unrelated reasons, discussed with @nejc and agreed to merge |
Fixes brave/brave-browser#6757
Submitter Checklist:
npm run lint
)git rebase master
(if needed).git rebase -i
to squash commits (if needed).Test Plan:
See brave/brave-browser#6757
Reviewer Checklist:
After-merge Checklist:
changes has landed on.