modified in tx details
This commit is contained in:
parent
a9c7be1889
commit
5ee310ec50
3 changed files with 20 additions and 14 deletions
|
|
@ -1,6 +1,6 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copayApp.controllers').controller('txpDetailsController', function($scope, $rootScope, $timeout, $interval, $log, ongoingProcess, platformInfo, $ionicScrollDelegate, txFormatService, bwcError, gettextCatalog, lodash, walletService, popupService, $ionicHistory) {
|
||||
angular.module('copayApp.controllers').controller('txpDetailsController', function($scope, $rootScope, $timeout, $interval, $log, ongoingProcess, platformInfo, $ionicScrollDelegate, txFormatService, bwcError, gettextCatalog, lodash, walletService, popupService, $ionicHistory, feeService) {
|
||||
var isGlidera = $scope.isGlidera;
|
||||
var GLIDERA_LOCK_TIME = 6 * 60 * 60;
|
||||
var now = Math.floor(Date.now() / 1000);
|
||||
|
|
@ -27,8 +27,7 @@ angular.module('copayApp.controllers').controller('txpDetailsController', functi
|
|||
$scope.tx.feeFiatStr = v;
|
||||
});
|
||||
$scope.tx.feeRateStr = ($scope.tx.fee / ($scope.tx.amount + $scope.tx.fee) * 100).toFixed(2) + '%';
|
||||
if ($scope.tx.feeLevel == 'superEconomy') $scope.tx.feeLevelStr = gettextCatalog.getString('Super Economy');
|
||||
else $scope.tx.feeLevelStr = $scope.tx.feeLevelStr = $scope.tx.feeLevel.charAt(0).toUpperCase() + $scope.tx.feeLevel.slice(1);
|
||||
$scope.tx.feeLevelStr = feeService.feeOpts[$scope.tx.feeLevel];
|
||||
};
|
||||
|
||||
function applyButtonText() {
|
||||
|
|
|
|||
|
|
@ -11,10 +11,12 @@ angular.module('copayApp.controllers').controller('txDetailsController', functio
|
|||
$scope.wallet = profileService.getWallet(data.stateParams.walletId);
|
||||
$scope.color = $scope.wallet.color;
|
||||
$scope.copayerId = $scope.wallet.credentials.copayerId;
|
||||
$scope.isShared = $scope.wallet.credentials.n > 1;
|
||||
$scope.isShared = $scope.wallet.credentials.n > 1;
|
||||
|
||||
txConfirmNotification.checkIfEnabled(txId, function(res) {
|
||||
$scope.txNotification = { value: res };
|
||||
$scope.txNotification = {
|
||||
value: res
|
||||
};
|
||||
});
|
||||
});
|
||||
|
||||
|
|
@ -24,7 +26,9 @@ angular.module('copayApp.controllers').controller('txDetailsController', functio
|
|||
listeners = [
|
||||
$rootScope.$on('bwsEvent', function(e, walletId, type, n) {
|
||||
if (type == 'NewBlock' && n && n.data && n.data.network == 'livenet') {
|
||||
updateTxDebounced({hideLoading: true});
|
||||
updateTxDebounced({
|
||||
hideLoading: true
|
||||
});
|
||||
}
|
||||
})
|
||||
];
|
||||
|
|
@ -108,7 +112,8 @@ angular.module('copayApp.controllers').controller('txDetailsController', functio
|
|||
|
||||
$scope.btx = txFormatService.processTx(tx);
|
||||
txFormatService.formatAlternativeStr(tx.fees, function(v) {
|
||||
$scope.feeFiatStr = v;
|
||||
$scope.btx.feeFiatStr = v;
|
||||
$scope.btx.feeRateStr = ($scope.btx.fees / ($scope.btx.amount + $scope.btx.fees) * 100).toFixed(2) + '%';
|
||||
});
|
||||
|
||||
if ($scope.btx.action != 'invalid') {
|
||||
|
|
@ -130,7 +135,7 @@ angular.module('copayApp.controllers').controller('txDetailsController', functio
|
|||
};
|
||||
|
||||
var updateTxDebounced = lodash.debounce(updateTx, 5000);
|
||||
|
||||
|
||||
$scope.showCommentPopup = function() {
|
||||
var opts = {};
|
||||
if ($scope.btx.message) {
|
||||
|
|
@ -194,7 +199,9 @@ angular.module('copayApp.controllers').controller('txDetailsController', functio
|
|||
|
||||
$scope.txConfirmNotificationChange = function() {
|
||||
if ($scope.txNotification.value) {
|
||||
txConfirmNotification.subscribe($scope.wallet, { txid: txId });
|
||||
txConfirmNotification.subscribe($scope.wallet, {
|
||||
txid: txId
|
||||
});
|
||||
} else {
|
||||
txConfirmNotification.unsubscribe($scope.wallet, txId);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue