mirror of https://github.com/BTCPrivate/copay.git
adds pending txs service
This commit is contained in:
parent
e52d45c5d8
commit
b73f711fff
|
@ -55,8 +55,6 @@ angular.module('copayApp.controllers').controller('SendController',
|
|||
}
|
||||
});
|
||||
$scope.txps = res.txs;
|
||||
// TODO
|
||||
// $rootScope.pendingTxCount = res.pendingForUs;
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -100,7 +98,8 @@ angular.module('copayApp.controllers').controller('SendController',
|
|||
});
|
||||
|
||||
|
||||
$scope.loadTxs = function() {
|
||||
$scope.init = function() {
|
||||
$rootScope.pendingTxCount = 0;
|
||||
$scope.updateTxs();
|
||||
setTimeout(function() {
|
||||
$scope.loading = false;
|
||||
|
|
|
@ -46,8 +46,9 @@ angular.module('copayApp.controllers').controller('SidebarController', function(
|
|||
|
||||
|
||||
$scope.init = function() {
|
||||
// This should be called only once.
|
||||
|
||||
// Change focused wallet
|
||||
// focused wallet change
|
||||
if ($rootScope.wallet) {
|
||||
$rootScope.$watch('wallet', function() {
|
||||
$scope.walletSelection = false;
|
||||
|
@ -55,7 +56,7 @@ angular.module('copayApp.controllers').controller('SidebarController', function(
|
|||
});
|
||||
}
|
||||
|
||||
// Change wallet list
|
||||
// wallet list chane
|
||||
if ($rootScope.iden) {
|
||||
var iden = $rootScope.iden;
|
||||
iden.on('newWallet', function() {
|
||||
|
|
|
@ -5,7 +5,11 @@ angular.module('copayApp.services')
|
|||
.factory('pendingTxsService', function($rootScope, $sce, $location, $filter, notification, $timeout, rateService) {
|
||||
var root = {};
|
||||
root.update = function(w) {
|
||||
console.log('[pendingTxsService.js.8] TODO updade pending Txs'); //TODO
|
||||
var w = $rootScope.wallet;
|
||||
if (!w) return;
|
||||
|
||||
var res = w.getPendingTxProposals();
|
||||
$rootScope.pendingTxCount = res.pendingForUs;
|
||||
};
|
||||
return root;
|
||||
});
|
||||
|
|
|
@ -49,6 +49,7 @@
|
|||
<th>Type</th>
|
||||
<th class="hide-for-small-only">Status</th>
|
||||
<th>Balance</th>
|
||||
<th>Approx Size</th>
|
||||
<th class="text-right">Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
@ -69,6 +70,12 @@
|
|||
{{item.balanceInfo.totalBalance || 0 |noFractionNumber}} {{item.settings.unitName}}
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<span>
|
||||
{{item.sizes().total/1000}} kB
|
||||
</span>
|
||||
</td>
|
||||
|
||||
<td class="text-right">
|
||||
<div ng-show="loading != item.id">
|
||||
<a title="Download Backup" class="text-gray" ng-click="downloadWalletBackup(item)"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<div class="send" ng-controller="SendController" ng-init="loadTxs()">
|
||||
<div class="send" ng-controller="SendController" ng-init="init()">
|
||||
<div class="row" ng-show="txps.length != 0">
|
||||
<div class="large-12 columns">
|
||||
<h2 translate>Pending Transactions Proposals</h2>
|
||||
|
|
Loading…
Reference in New Issue