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

Commit

Permalink
feat(Buy Summary): custom error page for bank transfers that exceed d…
Browse files Browse the repository at this point in the history
…aily amount
  • Loading branch information
Thore3 committed Sep 13, 2016
1 parent abcfe52 commit f9b74eb
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
16 changes: 11 additions & 5 deletions app/partials/buy-summary.jade
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
.flex-column.mbvl
span.type-h5.em-500.flex-start.pts(translate="CONFIRM_YOUR_ORDER")
span.type-h5.em-500.flex-start.pts(
ng-hide="isBankTransfer()"
translate="CONFIRM_YOUR_ORDER")
span.type-h5.em-500.flex-start.pts.state-danger-text(
ng-show="isBankTransfer()"
translate="ERROR_DAILY_LIMIT")
p.mvm
span(translate="ORDER_CONFIRMATION_COPY")
span(translate="ORDER_CONFIRMATION_COPY" ng-hide="isBankTransfer()")
span(translate="ERROR_DAILY_LIMIT_COPY" ng-show="isBankTransfer()" translate-values="{symbol: currencySymbol.symbol, max: limits.available}")
.flex-center.flex-between.flex-row-reverse.mtm
.mam
span.type-sm.blue.underline.pointer(ng-click="toggleEditAmount()" ng-hide="editAmount") Edit Order
span.type-sm.blue.underline.pointer(ng-click="cancel()" ng-show="editAmount") Cancel
.flex-center(ng-show="(tempFiatForm.fiat.$error.max || tempFiatForm.fiat.$error.min) && !needsKyc()")
.flex-center(ng-show="(tempFiatForm.fiat.$error.max || tempFiatForm.fiat.$error.min) && !isBankTransfer()")
i.ti-alert.state-danger-text.mrs.type-h4
span.state-danger-text.mrs(ng-show="tempFiatForm.fiat.$error.max" translate="MAX_LIMIT_EXCEEDED" translate-values="{code: tempCurrency.code, max: limits.available}")
span.state-danger-text.mrs(ng-show="tempFiatForm.fiat.$error.min && !tempFiatForm.fiat.$error.max" translate="BELOW_MIN_LIMIT" translate-values="{code: tempCurrency.code, min: limits.min}")
Expand Down Expand Up @@ -50,9 +56,9 @@
ng-click="changeTempCurrency(currency);"
ng-class="{active: isCurrencySelected(currency)}")
a(ng-click="$event.preventDefault()") {{ currency.code }}
.flex-row.flex-between.pam.border-bottom-light
.flex-row.flex-between.pam.border-bottom-light(ng-hide="isBankTransfer()")
span(translate="PAYMENT_FEE")
span {{ transaction.methodFee | format }} {{ transaction.currency.code }}
.flex-row.flex-between.pam
.flex-row.flex-between.pam(ng-hide="isBankTransfer()")
span.em-500 Total Cost:
span {{ currencySymbol.symbol }}{{ transaction.total }} {{ transaction.currency.code }}
1 change: 1 addition & 0 deletions assets/js/controllers/buySummary.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ function BuySummaryCtrl ($scope, $q, $timeout, Wallet, buySell, currency) {
$scope.limits = {};
$scope.exchange = buySell.getExchange();
$scope.toggleEditAmount = () => $scope.$parent.editAmount = !$scope.$parent.editAmount;
$scope.isBankTransfer = () => $scope.isMedium('bank');

$scope.getMaxMin = (curr) => {
const calculateMin = (rate) => {
Expand Down
2 changes: 2 additions & 0 deletions locales/en-human.json
Original file line number Diff line number Diff line change
Expand Up @@ -979,6 +979,8 @@
"BLACKLISTED_COUNTRY": "Buying bitcoin is not available in your country yet.<br>We'll be rolling out more countries soon.",
"CONFIRM_YOUR_ORDER": "Confirm your order:",
"ORDER_CONFIRMATION_COPY": "Please confirm your order details before we direct you to our secure payment provider.",
"ERROR_DAILY_LIMIT": "Error: Exceeds Daily Limit",
"ERROR_DAILY_LIMIT_COPY": "The amount selected exceeds your daily buy limit. For bank transfers, you can exchange up to {{symbol}}{{max}} per day. Please update your order to proceed.",
"ORDER_DETAILS": "Order details:",
"ACTION_REQUIRED": "Action Required",
"MAX_LIMIT_EXCEEDED": "Exceeds your daily buy amount of {{::max}} {{::code}}.",
Expand Down

0 comments on commit f9b74eb

Please sign in to comment.