-
Notifications
You must be signed in to change notification settings - Fork 972
Conversation
a780279
to
0a4c415
Compare
0a4c415
to
bb8c7af
Compare
@NejcZdovc please change "Usage data for Brave Payments" to: "Brave Payments attention data" in both instances. Change "Payment history" to: "Brave Payments statements" |
@bradleyrichter text updated, screenshots updated |
7be8e2e
to
2eae85d
Compare
a3a77d6
to
44bca51
Compare
1a0c652
to
38a27a5
Compare
@@ -3123,6 +3126,53 @@ const activityRoundTrip = (err, response, body) => { | |||
updater.checkForUpdate(false, true) | |||
} | |||
|
|||
const deleteWallet = (state) => { | |||
state = ledgerState.deleteSynopsis(state) | |||
state = state.setIn(['settings', settings.PAYMENTS_ENABLED], false) |
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 we should make sure the file is deleted successfully before disabling payments.
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 that this is needed, because we will delete all data related to the payments in the state, so when you run it again it should override this file if still exists
} | ||
|
||
onToggleSetting (setting, e) { | ||
appActions.onToggleBrowsingData(setting, e.target.value) | ||
} | ||
|
||
onClear () { | ||
onClear (check) { | ||
if ( |
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.
Can we move this conditional to a separate function so it's clearer what's happening?
Can you add steps to test plan to be able to trigger contribution without hitting the 30 minute wall? |
app/browser/api/ledger.js
Outdated
const clearPaymentHistory = (state) => { | ||
state = ledgerState.setInfoProp(state, 'transactions', Immutable.List()) | ||
state = ledgerState.setInfoProp(state, 'ballots', Immutable.List()) | ||
state = ledgerState.setInfoProp(state, 'batch', Immutable.List()) |
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.
batch
should be set to Immutable.Map()
here, it is of type object in bat-client
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.
fixed
app/browser/api/ledger.js
Outdated
if (data) { | ||
data.transactions = [] | ||
data.ballots = [] | ||
data.batch = [] |
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.
See above, should be data.batch = {}
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.
fixed
fs.accessSync(path, fs.constants.W_OK) | ||
let data = fs.readFileSync(path) | ||
data = JSON.parse(data) | ||
if (data) { |
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.
would it be helpful to set data.memos = []
in 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.
We would like to keep memos, because we use them for debugging if needed
@jasonrsadler this is what I normally use when debugging contributions |
3a0c827
to
e681429
Compare
Resolves brave#8537 Auditors: Test Plan:
e681429
to
45b7332
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.
Works well, thanks for the updates 👍
Adds clear/delete payments options
Adds clear/delete payments options
Adds clear/delete payments options
Resolves #8537
New options
Clear publishers option on shutdown
Manually clearing publishers and payment history
While contribution is in progress
Delete wallet
Delete wallet confirmation
Submitter Checklist:
git rebase -i
to squash commits (if needed).Test Plan:
Browsing history
is selected when reseting browserBrave Payments attention data
is selected when restarting browserBrave Payments attention data
Brave Payments statements
Reviewer Checklist:
Tests