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

Commit

Permalink
Add 10% tolerance threshold to add funds notification bar
Browse files Browse the repository at this point in the history
According to https://www.brave.com/Payments_FAQ.html, the notification
show only show if the balance is less than 90% of the contribution amount.

Auditors: @mrose17
  • Loading branch information
diracdeltas committed Sep 8, 2016
1 parent 90d4f79 commit 8d0dd96
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/ledger.js
Original file line number Diff line number Diff line change
Expand Up @@ -1145,7 +1145,7 @@ const notifyAddFunds = () => {

if (ledgerInfo.btc && reconcileStamp &&
reconcileStamp - underscore.now() < msecs.day &&
balance + unconfirmed < Number(ledgerInfo.btc)) {
balance + unconfirmed < 0.9 * Number(ledgerInfo.btc)) {
addFundsMessage = addFundsMessage || locale.translation('addFundsNotification')
appActions.showMessageBox({
message: addFundsMessage,
Expand Down

1 comment on commit 8d0dd96

@mrose17
Copy link
Member

@mrose17 mrose17 commented on 8d0dd96 Sep 8, 2016

Choose a reason for hiding this comment

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

looks right to me (even if i would prefer a non-zero number of parens (-;

Please sign in to comment.