-
Notifications
You must be signed in to change notification settings - Fork 975
Notify users when contribution date is pushed back #14006
Conversation
blocked on brave-intl/bat-client#66 |
869a3bf
to
e1934d9
Compare
e1934d9
to
837dd92
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.
EDIT
Something went haywire with npm and gave me an old version of bclient from a clean build.]
So I get the '30 minute' message but I get pushed out 6 days following that test plan.
@bradleyrichter for wording |
837dd92
to
3ed6420
Compare
Updated text based on @bradleyrichter feedback |
js/constants/appConstants.js
Outdated
@@ -192,6 +192,7 @@ const appConstants = { | |||
APP_ON_LEDGER_PIN_PUBLISHER: _, | |||
APP_ON_LEDGER_NOTIFICATION_INTERVAL: _, | |||
APP_ON_LEDGER_MEDIA_DATA: _, | |||
APP_ON_FUZZING: _, |
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 changed to something like APP_ON_LEDGER_FUZZING
?
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
js/actions/appActions.js
Outdated
@@ -1981,6 +1981,13 @@ const appActions = { | |||
}) | |||
}, | |||
|
|||
onFuzzing: function (newStamp) { |
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.
Following other comment, maybe this should be onLedgerFuzzing
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
3ed6420
to
548a096
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.
One other comment left, besides the issue that @jasonrsadler logged to what will be another PR, lgtm
@@ -503,6 +503,15 @@ const ledgerReducer = (state, action, immutableAction) => { | |||
state = ledgerApi.onFetchReferralHeaders(state, action.get('error'), action.get('response'), action.get('body')) | |||
break | |||
} | |||
case appConstants.APP_ON_LEDGER_FUZZING: | |||
{ | |||
state = ledgerState.setAboutProp(state, 'status', ledgerStatuses.FUZZING) |
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.
Should we set this prop after newStamp
has been validated on line 510
?
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 that as soon as fuzzing is triggered we should display notification, even if something was not send over correctly. wdyt?
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.
That sounds fine yeah, I just assumed that if the check failed the process to that point would be so quick it may not be worth it.
app/browser/api/ledger.js
Outdated
@@ -2386,6 +2386,10 @@ const onInitRead = (state, parsedData) => { | |||
return state | |||
} | |||
|
|||
const onFuzzing = () => { | |||
appActions.onLedgerFuzzing(client.state.reconcileStamp) |
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.
Check for client.state != null
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.
null check added
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 to check client.state or client.state.reconcileStamp == null?
Resolves brave#14000 Auditors: Test Plan:
548a096
to
da0cca6
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.
LGTM, thanks for the changes
Notify users when contribution date is pushed back
Notify users when contribution date is pushed back
Resolves #14000
new notification
Submitter Checklist:
git rebase -i
to squash commits (if needed).Test Plan:
Reviewer Checklist:
Tests