Skip to content

Commit

Permalink
fix: use number instead of string comparison for incentive upsell MP-95
Browse files Browse the repository at this point in the history
  • Loading branch information
emuvente committed Apr 30, 2024
1 parent 5fa2961 commit fa5113d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/pages/Checkout/CheckoutPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
:enable-huge-amount="enableHugeLendAmount"
:is-logged-in="isLoggedIn"
:show-incentive-upsell="showIncentiveUpsell"
:incentive-goal="parseInt(depositIncentiveAmountToLend)"
:incentive-goal="depositIncentiveAmountToLend"
@validateprecheckout="validatePreCheckout"
@refreshtotals="refreshTotals($event)"
@updating-totals="setUpdatingTotals"
Expand Down Expand Up @@ -502,7 +502,7 @@ export default {
this.ftdValidDate = data?.general?.ftd_message_valid_date?.value ?? '';
// Deposit incentive experiment MP-72
this.depositIncentiveAmountToLend = data?.my?.depositIncentiveAmountToLend ?? 0;
this.depositIncentiveAmountToLend = numeral(data?.my?.depositIncentiveAmountToLend ?? 0).value();
}
},
beforeRouteEnter(to, from, next) {
Expand Down Expand Up @@ -649,7 +649,7 @@ export default {
showIncentiveUpsell() {
// only show the incentive upsell if the user has not reached the goal MP-72
return this.depositIncentiveExperimentEnabled
&& this.depositIncentiveAmountToLend > this.totals.loanReservationTotal;
&& this.depositIncentiveAmountToLend > parseFloat(this.totals.loanReservationTotal);
},
showUpsell() {
// hide regular upsell if the incentive upsell is shown MP-72
Expand Down

0 comments on commit fa5113d

Please sign in to comment.