Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

reset reconciliation time when publisher window is closed #4516

Merged
merged 2 commits into from
Oct 4, 2016

Conversation

mrose17
Copy link
Member

@mrose17 mrose17 commented Oct 4, 2016

test plan:

  1. start with a browser that has ledger payments enabled.
  2. quit the browser
  3. carefully edit ledger-state.json to change the line start starts as "reconcileStamp": 14... to change the 4 to a 3
    4, start the browser
  4. verify that the time to reconcile now occurs in the future!

auditor: @ayumi

fixes #4058

1. always make this check on startup, settings changes, etc.

2. rather than look for a time in the past (after all, the user could
just be a day late doing stuff), look to see if the reconciliation
stamp is at the end of the publisher window (the window consists of N
frames, each of duration M… N=30, M=1day)

fixes #4058

auditor: @ayumi
@mrose17 mrose17 added this to the 0.12.5dev milestone Oct 4, 2016
@mrose17 mrose17 self-assigned this Oct 4, 2016
@@ -458,17 +458,19 @@ var initialize = (paymentsEnabled, reason) => {
// Scenario: User enables Payments, disables it, waits 30+ days, then
// enables it again -> reconcileStamp is in the past.
// In this case reset reconcileStamp to the future.
if (reason === 'changeSettingPaymentsEnabled') {
Copy link
Contributor

Choose a reason for hiding this comment

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

as a result of this PR we can remove changeSettingPaymentsEnabled at ln 134 and the reason arg in this function initialize(paymentsEnabled,reason) (it was added to fix this)

Copy link
Member Author

Choose a reason for hiding this comment

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

true. it is used only in one place. remove it?

@ayumi
Copy link
Contributor

ayumi commented Oct 4, 2016

tried it out / lgtm 🎁

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Brave payments wrong contribution date
6 participants