Fix limit per day message

This commit is contained in:
Gustavo Maximiliano Cortez 2017-07-11 00:51:41 -03:00
parent 59d668f292
commit 549d395ec1
No known key found for this signature in database
GPG Key ID: 15EDAD8D9F2EB1AF
3 changed files with 11 additions and 4 deletions

View File

@ -278,8 +278,13 @@ angular.module('copayApp.controllers').controller('buyAmazonController', functio
amount = data.stateParams.amount;
currency = data.stateParams.currency;
if (amount > 1000) {
showErrorAndBack(null, gettextCatalog.getString('Purchase Amount is limited to USD 1000 per day'));
$scope.limitPerDayMessage = gettextCatalog.getString('Purchase Amount is limited to {{limitPerDay}} {{currency}} per day', {
limitPerDay: amazonService.limitPerDay,
currency: currency
});
if (amount > amazonService.limitPerDay) {
showErrorAndBack(null, $scope.limitPerDayMessage);
return;
}

View File

@ -3,6 +3,8 @@ angular.module('copayApp.services').factory('amazonService', function($http, $lo
var root = {};
var credentials = {};
root.limitPerDay = 1000;
/*
* Development: 'testnet'
* Production: 'livenet'

View File

@ -18,8 +18,8 @@
</div>
<div class="amount-label">
<div class="amount">{{amountUnitStr}}</div>
<div class="alternative" translate>
Purchase Amount is limited to USD 1000 per day
<div class="alternative">
{{limitPerDayMessage}}
</div>
</div>
</div>