update slide text button

This commit is contained in:
JDonadio 2017-01-16 16:25:12 -03:00
commit 96c1c1a293
5 changed files with 65 additions and 35 deletions

View file

@ -19,15 +19,37 @@ angular.module('copayApp.controllers').controller('txpDetailsController', functi
$scope.displayUnit = getDisplayUnit($scope.tx.amountStr);
initActionList();
checkPaypro();
}
applyButtonText();
};
function applyButtonText(multisig) {
$scope.buttonText = $scope.isCordova ? gettextCatalog.getString('Slide') + ' ' : gettextCatalog.getString('Click') + ' ';
if ($scope.paypro) {
$scope.buttonText += gettextCatalog.getString('to pay');
return;
}
if ($scope.isGlidera || $scope.isGiftCard || $scope.cardId) {
$scope.buttonText += gettextCatalog.getString('to complete');
return;
}
if (multisig) {
$scope.buttonText += gettextCatalog.getString('to accept');
return;
}
$scope.buttonText += gettextCatalog.getString('to send');
};
function getDisplayAmount(amountStr) {
return amountStr.split(' ')[0];
}
};
function getDisplayUnit(amountStr) {
return amountStr.split(' ')[1];
}
};
function initActionList() {
$scope.actionList = [];