check last signer

This commit is contained in:
JDonadio 2017-01-16 17:12:55 -03:00
parent 96c1c1a293
commit 10315d13b8
2 changed files with 12 additions and 28 deletions

View File

@ -59,22 +59,14 @@ angular.module('copayApp.controllers').controller('confirmController', function(
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) {
} else if ($scope.paypro) {
$scope.buttonText += gettextCatalog.getString('to pay');
} else if (multisig) {
$scope.buttonText += gettextCatalog.getString('to accept');
return;
}
$scope.buttonText += gettextCatalog.getString('to send');
} else
$scope.buttonText += gettextCatalog.getString('to send');
};
function setwallets() {

View File

@ -22,25 +22,17 @@ angular.module('copayApp.controllers').controller('txpDetailsController', functi
applyButtonText();
};
function applyButtonText(multisig) {
function applyButtonText() {
$scope.buttonText = $scope.isCordova ? gettextCatalog.getString('Slide') + ' ' : gettextCatalog.getString('Click') + ' ';
if ($scope.paypro) {
$scope.buttonText += gettextCatalog.getString('to pay');
return;
}
var lastSigner = lodash.filter($scope.tx.actions, {
type: 'accept'
}).length == $scope.tx.requiredSignatures - 1;
if ($scope.isGlidera || $scope.isGiftCard || $scope.cardId) {
$scope.buttonText += gettextCatalog.getString('to complete');
return;
}
if (multisig) {
if (lastSigner)
$scope.buttonText += gettextCatalog.getString('to send');
else
$scope.buttonText += gettextCatalog.getString('to accept');
return;
}
$scope.buttonText += gettextCatalog.getString('to send');
};
function getDisplayAmount(amountStr) {