-
Notifications
You must be signed in to change notification settings - Fork 975
Limit 24 hour payment notification to once per reconcile period #5296
Conversation
@@ -445,6 +445,7 @@ WindowStore | |||
ledgerInfo: { | |||
creating: boolean, // wallet is being created | |||
created: boolean, // wallet is created | |||
reconcilePeriod: number, // duration of each reconciliation period in days |
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.
Totally a nitpick- would it be better to say frequency? like the reconcileFrequency would be every 30 days. When I see period or duration, it's not immediately clear
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 like it
Fix #4481 Auditors: @bsclifton Test Plan: 1. Trigger the "Payment in 24 hours, please review" notification. - Update reconcileStamp to <24 hours from now - Have sufficient funds; OR disable the sufficient funds conditional by adding false to ledger.js L1485 (showEnabledNotifications()) - Change startup notification delay in ledger.js L484 from 15m to 5s 2. Open Brave and observe 24h review notification 3. Close Brave and reopen. Notification should not reappear. (Next 24h notification timestamp is set in Application Support/brave-development/session-store-1)
c4d20f6
to
addfd70
Compare
@@ -445,6 +445,7 @@ WindowStore | |||
ledgerInfo: { | |||
creating: boolean, // wallet is being created | |||
created: boolean, // wallet is created | |||
reconcileFrequency: number, // duration between each reconciliation in days |
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.
❤️ ++
@@ -119,6 +119,9 @@ module.exports = { | |||
'bookmarks.toolbar.showOnlyFavicon': false, | |||
'payments.enabled': false, | |||
'payments.notifications': false, | |||
// "Out of money, pls add" / "In 24h we'll pay publishers [Review]" | |||
// After shown, set timestamp to next reconcile time - 1 day. | |||
'payments.notification-reconcile-soon-timestamp': null, | |||
'payments.notificationTryPaymentsDismissed': false, // True if you dismiss the message or enable 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.
This might be more of a @bradleyrichter question... but I wonder if this should this be covering both cases?
Let's say you're within 24 hours of reconciling and you only have the ~5 dollars in your account. You'd dismiss the nag window but then you're out of budget after reconciliation happens. This is a case where you might want to get nagged again sometime before the next reconciliation period (especially since getting funds in might take > 24 hours)
(if action needed, can be done in a follow up 😄)
can i get @ayumi or @bsclifton to merge this... |
Will merge in a sec... just manually testing it now... |
Looks great! 👍 |
Because you should always be able to dismiss a notification. Auditors: @bsclifton Test Plan: (Similar to plan for #5296) 1. Trigger the "Payment in 24 hours, please review" notification. a. Update reconcileStamp to <24 hours from now b. Have sufficient funds; OR disable the sufficient funds conditional by adding false to ledger.js L1485 (showEnabledNotifications()) c. Change startup notification delay in ledger.js L484 from 15m to 5s 2. Open Brave and observe 24h review notification 3. Close Brave and reopen. Notification should not reappear. (Next 24h notification timestamp is set in Application Support/brave-development/session-store-1)
Because you should always be able to dismiss a notification. Auditors: @bsclifton Test Plan: (Similar to plan for #5296) 1. Trigger the "Payment in 24 hours, please review" notification. a. Update reconcileStamp to <24 hours from now b. Have sufficient funds; OR disable the sufficient funds conditional by adding false to ledger.js L1485 (showEnabledNotifications()) c. Change startup notification delay in ledger.js L484 from 15m to 5s 2. Open Brave and observe 24h review notification 3. Close Brave and reopen. Notification should not reappear. (Next 24h notification timestamp is set in Application Support/brave-development/session-store-1)
Fix #4481
Auditors: @bsclifton
Test Plan:
(Next 24h notification timestamp is set in Application Support/brave-development/session-store-1)