update slide text button
This commit is contained in:
parent
dafd46c3a2
commit
96c1c1a293
5 changed files with 65 additions and 35 deletions
|
|
@ -53,8 +53,30 @@ angular.module('copayApp.controllers').controller('confirmController', function(
|
|||
else $scope.network = (new bitcore.Address($scope.toAddress)).network.name;
|
||||
resetValues();
|
||||
setwallets();
|
||||
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 setwallets() {
|
||||
$scope.wallets = profileService.getWallets({
|
||||
onlyComplete: true,
|
||||
|
|
@ -268,6 +290,8 @@ angular.module('copayApp.controllers').controller('confirmController', function(
|
|||
$scope.getSendMaxInfo();
|
||||
} else
|
||||
setWallet(wallet);
|
||||
|
||||
applyButtonText(wallet.credentials.n > 1);
|
||||
};
|
||||
|
||||
$scope.showDescriptionPopup = function() {
|
||||
|
|
|
|||
|
|
@ -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 = [];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue