ref - use alert instead confirm
This commit is contained in:
parent
ac15e99b42
commit
b30a371a68
4 changed files with 8 additions and 19 deletions
|
|
@ -21,10 +21,6 @@ angular.module('copayApp.controllers').controller('amountController', function($
|
||||||
$scope.toEmail = data.stateParams.toEmail;
|
$scope.toEmail = data.stateParams.toEmail;
|
||||||
$scope.showAlternativeAmount = !!$scope.cardId || !!$scope.isGiftCard;
|
$scope.showAlternativeAmount = !!$scope.cardId || !!$scope.isGiftCard;
|
||||||
$scope.toColor = data.stateParams.toColor;
|
$scope.toColor = data.stateParams.toColor;
|
||||||
$scope.network = (new bitcore.Address($scope.toAddress)).network.name;
|
|
||||||
$scope.wallets = profileService.getWallets({
|
|
||||||
network: $scope.network
|
|
||||||
});
|
|
||||||
|
|
||||||
$scope.customAmount = data.stateParams.customAmount;
|
$scope.customAmount = data.stateParams.customAmount;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -147,11 +147,6 @@ angular.module('copayApp.controllers').controller('confirmController', function(
|
||||||
feePerKb: feePerKb,
|
feePerKb: feePerKb,
|
||||||
};
|
};
|
||||||
|
|
||||||
toAmount = parseFloat((resp.amount * satToUnit).toFixed(unitDecimals));
|
|
||||||
txFormatService.formatAlternativeStr(resp.amount, function(v) {
|
|
||||||
$scope.alternativeAmountStr = v;
|
|
||||||
});
|
|
||||||
|
|
||||||
var msg = gettextCatalog.getString("{{fee}} will be deducted for bitcoin networking fees", {
|
var msg = gettextCatalog.getString("{{fee}} will be deducted for bitcoin networking fees", {
|
||||||
fee: txFormatService.formatAmount(resp.fee) + ' ' + unitName
|
fee: txFormatService.formatAmount(resp.fee) + ' ' + unitName
|
||||||
});
|
});
|
||||||
|
|
@ -160,13 +155,14 @@ angular.module('copayApp.controllers').controller('confirmController', function(
|
||||||
if (!lodash.isEmpty(warningMsg))
|
if (!lodash.isEmpty(warningMsg))
|
||||||
msg += '. \n' + warningMsg;
|
msg += '. \n' + warningMsg;
|
||||||
|
|
||||||
popupService.showConfirm(null, msg, 'Ok', gettextCatalog.getString('Cancel'), function(result) {
|
popupService.showAlert(null, msg, function() {
|
||||||
if (!result) return;
|
$scope.displayAmount = txFormatService.formatAmount(resp.amount, true);
|
||||||
|
|
||||||
var amount = txFormatService.formatAmount(resp.amount, true);
|
|
||||||
$scope.displayAmount = amount;
|
|
||||||
$scope.displayUnit = unitName;
|
$scope.displayUnit = unitName;
|
||||||
$scope.fee = txFormatService.formatAmount($scope.sendMaxInfo.fee) + ' ' + unitName;
|
$scope.fee = txFormatService.formatAmount($scope.sendMaxInfo.fee) + ' ' + unitName;
|
||||||
|
toAmount = parseFloat((resp.amount * satToUnit).toFixed(unitDecimals));
|
||||||
|
txFormatService.formatAlternativeStr(resp.amount, function(v) {
|
||||||
|
$scope.alternativeAmountStr = v;
|
||||||
|
});
|
||||||
|
|
||||||
createTx($scope.wallet, true, function(err, txp) {
|
createTx($scope.wallet, true, function(err, txp) {
|
||||||
if (err) return;
|
if (err) return;
|
||||||
|
|
@ -374,6 +370,7 @@ angular.module('copayApp.controllers').controller('confirmController', function(
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.approve = function(onSendStatusChange) {
|
$scope.approve = function(onSendStatusChange) {
|
||||||
|
if (!toAmount) return;
|
||||||
|
|
||||||
if ($scope.paypro && $scope.paymentExpired.value) {
|
if ($scope.paypro && $scope.paymentExpired.value) {
|
||||||
popupService.showAlert(null, gettextCatalog.getString('This bitcoin payment request has expired.'));
|
popupService.showAlert(null, gettextCatalog.getString('This bitcoin payment request has expired.'));
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
angular.module('copayApp.services').factory('feeService', function($log, $stateParams, bwcService, walletService, configService, gettext, lodash, txFormatService, profileService, gettextCatalog) {
|
angular.module('copayApp.services').factory('feeService', function($log, $stateParams, bwcService, walletService, configService, gettext, lodash, txFormatService, gettextCatalog) {
|
||||||
var root = {};
|
var root = {};
|
||||||
|
|
||||||
// Constant fee options to translate
|
// Constant fee options to translate
|
||||||
|
|
|
||||||
|
|
@ -54,10 +54,6 @@
|
||||||
color: $dark-gray;
|
color: $dark-gray;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
.send-max {
|
|
||||||
float: right;
|
|
||||||
padding-top: 10px;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
.amount {
|
.amount {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue