add to low amount to incoming TXs
This commit is contained in:
parent
8624b1dbb0
commit
fdf73fa838
14 changed files with 110 additions and 37 deletions
|
|
@ -4,6 +4,7 @@ angular.module('copayApp.controllers').controller('confirmController', function(
|
|||
|
||||
var countDown = null;
|
||||
var CONFIRM_LIMIT_USD = 20;
|
||||
var FEE_TOO_HIGH_LIMIT_PER = 15;
|
||||
|
||||
var tx = {};
|
||||
|
||||
|
|
@ -286,7 +287,10 @@ angular.module('copayApp.controllers').controller('confirmController', function(
|
|||
txFormatService.formatAlternativeStr(txp.fee, function(v) {
|
||||
txp.alternativeFeeStr = v;
|
||||
});
|
||||
txp.feeRatePerStr = (txp.fee / (txp.amount + txp.fee) * 100).toFixed(2) + '%';
|
||||
|
||||
var per = (txp.fee / (txp.amount + txp.fee) * 100);
|
||||
txp.feeRatePerStr = per.toFixed(2) + '%';
|
||||
txp.feeToHigh = per > FEE_TOO_HIGH_LIMIT_PER;
|
||||
|
||||
|
||||
tx.txp[wallet.id] = txp;
|
||||
|
|
|
|||
|
|
@ -14,8 +14,6 @@ angular.module('copayApp.controllers').controller('txpDetailsController', functi
|
|||
$scope.canSign = $scope.wallet.canSign() || $scope.wallet.isPrivKeyExternal();
|
||||
$scope.color = $scope.wallet.color;
|
||||
$scope.data = {};
|
||||
$scope.displayAmount = getDisplayAmount($scope.tx.amountStr);
|
||||
$scope.displayUnit = getDisplayUnit($scope.tx.amountStr);
|
||||
displayFeeValues();
|
||||
initActionList();
|
||||
checkPaypro();
|
||||
|
|
@ -43,14 +41,6 @@ angular.module('copayApp.controllers').controller('txpDetailsController', functi
|
|||
$scope.buttonText += gettextCatalog.getString('to accept');
|
||||
};
|
||||
|
||||
function getDisplayAmount(amountStr) {
|
||||
return amountStr.split(' ')[0];
|
||||
};
|
||||
|
||||
function getDisplayUnit(amountStr) {
|
||||
return amountStr.split(' ')[1];
|
||||
};
|
||||
|
||||
function initActionList() {
|
||||
$scope.actionList = [];
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copayApp.controllers').controller('txDetailsController', function($rootScope, $log, $ionicHistory, $scope, $timeout, walletService, lodash, gettextCatalog, profileService, externalLinkService, popupService, ongoingProcess, txFormatService, txConfirmNotification) {
|
||||
angular.module('copayApp.controllers').controller('txDetailsController', function($rootScope, $log, $ionicHistory, $scope, $timeout, walletService, lodash, gettextCatalog, profileService, externalLinkService, popupService, ongoingProcess, txFormatService, txConfirmNotification, feeService) {
|
||||
|
||||
var txId;
|
||||
var listeners = [];
|
||||
|
|
@ -40,14 +40,6 @@ angular.module('copayApp.controllers').controller('txDetailsController', functio
|
|||
});
|
||||
});
|
||||
|
||||
function getDisplayAmount(amountStr) {
|
||||
return amountStr.split(' ')[0];
|
||||
}
|
||||
|
||||
function getDisplayUnit(amountStr) {
|
||||
return amountStr.split(' ')[1];
|
||||
}
|
||||
|
||||
function updateMemo() {
|
||||
walletService.getTxNote($scope.wallet, $scope.btx.txid, function(err, note) {
|
||||
if (err) {
|
||||
|
|
@ -122,12 +114,14 @@ angular.module('copayApp.controllers').controller('txDetailsController', functio
|
|||
if ($scope.btx.action == 'moved') $scope.title = gettextCatalog.getString('Moved Funds');
|
||||
}
|
||||
|
||||
$scope.displayAmount = getDisplayAmount($scope.btx.amountStr);
|
||||
$scope.displayUnit = getDisplayUnit($scope.btx.amountStr);
|
||||
|
||||
updateMemo();
|
||||
initActionList();
|
||||
getFiatRate();
|
||||
|
||||
feeService.getLowAmount($scope.wallet, function(err, amount) {
|
||||
$scope.btx.lowAmount = tx.amount< amount;
|
||||
});
|
||||
|
||||
$timeout(function() {
|
||||
$scope.$apply();
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copayApp.controllers').controller('walletDetailsController', function($scope, $rootScope, $interval, $timeout, $filter, $log, $ionicModal, $ionicPopover, $state, $stateParams, $ionicHistory, profileService, lodash, configService, platformInfo, walletService, txpModalService, externalLinkService, popupService, addressbookService, storageService, $ionicScrollDelegate, $window, bwcError, gettextCatalog, timeService) {
|
||||
angular.module('copayApp.controllers').controller('walletDetailsController', function($scope, $rootScope, $interval, $timeout, $filter, $log, $ionicModal, $ionicPopover, $state, $stateParams, $ionicHistory, profileService, lodash, configService, platformInfo, walletService, txpModalService, externalLinkService, popupService, addressbookService, storageService, $ionicScrollDelegate, $window, bwcError, gettextCatalog, timeService, feeService) {
|
||||
|
||||
var HISTORY_SHOW_LIMIT = 10;
|
||||
var currentTxHistoryPage = 0;
|
||||
|
|
@ -154,9 +154,10 @@ angular.module('copayApp.controllers').controller('walletDetailsController', fun
|
|||
});
|
||||
};
|
||||
|
||||
$timeout(function() {
|
||||
feeService.getLowAmount($scope.wallet, function(err, lowAmount){
|
||||
walletService.getTxHistory($scope.wallet, {
|
||||
progressFn: progressFn,
|
||||
lowAmount: lowAmount,
|
||||
}, function(err, txHistory) {
|
||||
$scope.updatingTxHistory = false;
|
||||
if (err) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue