-
Notifications
You must be signed in to change notification settings - Fork 877
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 rewards parity with browser laptop #241
Conversation
@@ -0,0 +1,336 @@ | |||
/* This Source Code Form is subject to the terms of the Mozilla Public |
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.
how is this file used? I don't see it added to a gn file anywhere
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 think this is probably supposed to go in resources/BUILD.gn
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 is called from components/brave_rewards_ui/components/app.js
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.
then it needs to be added to resources/BUILD.gn or changes will not trigger webpack to rebuild
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.
every input file should always be added to resources/BUILD.gn
even if it is included by another file because the build system doesn't understand js
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.
ok sounds good will add 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.
I think it's not needed, because every brave_*_ui folder provides only one file via webpack. Let me know if it's still needed
@@ -81,6 +81,11 @@ void CustomizeWebUIHTMLSource(const std::string &name, content::WebUIDataSource* | |||
} | |||
}, { | |||
std::string("rewards"), { | |||
{ "823882f2419bf6c16b8291e056ea4b52.svg", IDR_BRAVE_REWARDS_IMG_WALLET_ICON }, |
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.
it looks like these images are being included by webpack so I don't think we need this
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 guess I'm not clear on what is happening with the images in webpack so maybe we need them. Did you already try without?
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.
yeah we need to add it otherwise they are not found
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.
it would be nice if webpack could bundle these somehow
@@ -1,6 +1,6 @@ | |||
{ |
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 don't think this change is supposed to be here. @bbondy suggested that you might have an older version of npm. I get the same thing when I run init so I'm checking mine as well
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.
it needs to be here, because I updated brave-ui package
f70a592
to
d797b58
Compare
8f50a22
to
e513fbe
Compare
9359e34
to
8c23d63
Compare
b1f1ab1
to
0284134
Compare
9a6dae4
to
3b98b36
Compare
browser/ui/webui/brave_rewards_ui.cc
Outdated
|
||
// PaymentServiceObserver implementation | ||
void OnWalletCreated(payments::PaymentsService* payment_service, | ||
void OnWalletInitialized(brave_rewards::RewardsService* payment_service, |
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 we need payment_service
to be rewards_service
?
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.
done
browser/ui/webui/brave_rewards_ui.cc
Outdated
} | ||
|
||
void RewardsDOMHandler::OnWalletInitialized( | ||
brave_rewards::RewardsService* payment_service, |
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.
same here?
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.
done
@@ -21,9 +21,11 @@ | |||
|
|||
using content::ResourceType; | |||
|
|||
namespace payments { | |||
// DEFINE_WEB_CONTENTS_USER_DATA_KEY(brave_rewards::RewardsHelper); |
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.
Is this for future?
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.
cc @bridiver
@@ -2,8 +2,8 @@ | |||
* License, v. 2.0. If a copy of the MPL was not distributed with this file, | |||
* You can obtain one at http://mozilla.org/MPL/2.0/. */ | |||
|
|||
#ifndef BRAVE_BROWSER_PAYMENTS_PAYMENTS_HELPER_ | |||
#define BRAVE_BROWSER_PAYMENTS_PAYMENTS_HELPER_ | |||
#ifndef BRAVE_BROWSER_BRAVE_REWARDS_REWARDS_HELPER_ |
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.
Linter will complain here once set. Should be:
BRAVE_BROWSER_BRAVE_REWARDS_BROWSER_REWARDS_HELPER_
Added tests for rewards service
970420d
to
3162763
Compare
Updated tests to read endpoint data from test files
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 almost reviewed all of that during the implementation. I just checked commits that I missed. Looks good
Adds new 2 state tab component
Resolves brave/brave-browser#16
Resolves brave/brave-browser#288