diff --git a/src/js/controllers/amount.js b/src/js/controllers/amount.js index b2b5e54ae..47faec030 100644 --- a/src/js/controllers/amount.js +++ b/src/js/controllers/amount.js @@ -21,10 +21,6 @@ angular.module('copayApp.controllers').controller('amountController', function($ $scope.toEmail = data.stateParams.toEmail; $scope.showAlternativeAmount = !!$scope.cardId || !!$scope.isGiftCard; $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; diff --git a/src/js/controllers/confirm.js b/src/js/controllers/confirm.js index d87fc1336..3010cbfe4 100644 --- a/src/js/controllers/confirm.js +++ b/src/js/controllers/confirm.js @@ -147,11 +147,6 @@ angular.module('copayApp.controllers').controller('confirmController', function( 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", { fee: txFormatService.formatAmount(resp.fee) + ' ' + unitName }); @@ -160,13 +155,14 @@ angular.module('copayApp.controllers').controller('confirmController', function( if (!lodash.isEmpty(warningMsg)) msg += '. \n' + warningMsg; - popupService.showConfirm(null, msg, 'Ok', gettextCatalog.getString('Cancel'), function(result) { - if (!result) return; - - var amount = txFormatService.formatAmount(resp.amount, true); - $scope.displayAmount = amount; + popupService.showAlert(null, msg, function() { + $scope.displayAmount = txFormatService.formatAmount(resp.amount, true); $scope.displayUnit = 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) { if (err) return; @@ -374,6 +370,7 @@ angular.module('copayApp.controllers').controller('confirmController', function( }; $scope.approve = function(onSendStatusChange) { + if (!toAmount) return; if ($scope.paypro && $scope.paymentExpired.value) { popupService.showAlert(null, gettextCatalog.getString('This bitcoin payment request has expired.')); diff --git a/src/js/services/feeService.js b/src/js/services/feeService.js index 1d673129f..e2ee38bc1 100644 --- a/src/js/services/feeService.js +++ b/src/js/services/feeService.js @@ -1,6 +1,6 @@ '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 = {}; // Constant fee options to translate diff --git a/src/sass/views/amount.scss b/src/sass/views/amount.scss index 9751f747d..7c4c1681e 100644 --- a/src/sass/views/amount.scss +++ b/src/sass/views/amount.scss @@ -54,10 +54,6 @@ color: $dark-gray; font-weight: bold; } - .send-max { - float: right; - padding-top: 10px; - } } .amount { display: flex;