-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DON-596 - fix logic when a tip is pending #1367
Conversation
NoelLH
commented
Oct 30, 2023
- set tip numbers to 0 explicitly as an existing tip's detected
- add an extra check to prevent creating another tip if form data somehow gets out of sync
* set tip numbers to 0 explicitly as an existing tip's detected * add an extra check to prevent creating another tip if form data somehow gets out of sync
@@ -23,8 +23,8 @@ <h3 class="b-rh-1 b-bold">Transfer Donation Funds</h3> | |||
Must be between {{ minimumCreditAmount | exactCurrency:currency }} and {{ maximumCreditAmount | exactCurrency:currency }} inclusive. | |||
</p> | |||
|
|||
<div *ngIf="(donor.pending_tip_balance?.gbp || 0) > 0"> | |||
<p>Thanks for tipping Big Give {{ ((donor.pending_tip_balance?.gbp || 0) / 100) | exactCurrency:"GBP" }} </p> | |||
<div *ngIf="pendingTipBalance > 0"> |
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 expression pendingTipBalance > 0
is used three times - probably worth making it into a function like donorHasPendingTip: () => boolean
or something?
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 in 5e0cb12
Co-authored-by: Barney Laurance <barney@thebiggive.org.uk>
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.
Not 100% sure where the bug was in the old code, but new version looks good so no harm in merging and re-testing.