adds pending txs service
This commit is contained in:
parent
e52d45c5d8
commit
b73f711fff
5 changed files with 19 additions and 8 deletions
|
|
@ -55,8 +55,6 @@ angular.module('copayApp.controllers').controller('SendController',
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
$scope.txps = res.txs;
|
$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();
|
$scope.updateTxs();
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
$scope.loading = false;
|
$scope.loading = false;
|
||||||
|
|
|
||||||
|
|
@ -46,8 +46,9 @@ angular.module('copayApp.controllers').controller('SidebarController', function(
|
||||||
|
|
||||||
|
|
||||||
$scope.init = function() {
|
$scope.init = function() {
|
||||||
|
// This should be called only once.
|
||||||
// Change focused wallet
|
|
||||||
|
// focused wallet change
|
||||||
if ($rootScope.wallet) {
|
if ($rootScope.wallet) {
|
||||||
$rootScope.$watch('wallet', function() {
|
$rootScope.$watch('wallet', function() {
|
||||||
$scope.walletSelection = false;
|
$scope.walletSelection = false;
|
||||||
|
|
@ -55,7 +56,7 @@ angular.module('copayApp.controllers').controller('SidebarController', function(
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// Change wallet list
|
// wallet list chane
|
||||||
if ($rootScope.iden) {
|
if ($rootScope.iden) {
|
||||||
var iden = $rootScope.iden;
|
var iden = $rootScope.iden;
|
||||||
iden.on('newWallet', function() {
|
iden.on('newWallet', function() {
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,11 @@ angular.module('copayApp.services')
|
||||||
.factory('pendingTxsService', function($rootScope, $sce, $location, $filter, notification, $timeout, rateService) {
|
.factory('pendingTxsService', function($rootScope, $sce, $location, $filter, notification, $timeout, rateService) {
|
||||||
var root = {};
|
var root = {};
|
||||||
root.update = function(w) {
|
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;
|
return root;
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -49,6 +49,7 @@
|
||||||
<th>Type</th>
|
<th>Type</th>
|
||||||
<th class="hide-for-small-only">Status</th>
|
<th class="hide-for-small-only">Status</th>
|
||||||
<th>Balance</th>
|
<th>Balance</th>
|
||||||
|
<th>Approx Size</th>
|
||||||
<th class="text-right">Actions</th>
|
<th class="text-right">Actions</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
|
|
@ -69,6 +70,12 @@
|
||||||
{{item.balanceInfo.totalBalance || 0 |noFractionNumber}} {{item.settings.unitName}}
|
{{item.balanceInfo.totalBalance || 0 |noFractionNumber}} {{item.settings.unitName}}
|
||||||
</span>
|
</span>
|
||||||
</td>
|
</td>
|
||||||
|
<td>
|
||||||
|
<span>
|
||||||
|
{{item.sizes().total/1000}} kB
|
||||||
|
</span>
|
||||||
|
</td>
|
||||||
|
|
||||||
<td class="text-right">
|
<td class="text-right">
|
||||||
<div ng-show="loading != item.id">
|
<div ng-show="loading != item.id">
|
||||||
<a title="Download Backup" class="text-gray" ng-click="downloadWalletBackup(item)"
|
<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="row" ng-show="txps.length != 0">
|
||||||
<div class="large-12 columns">
|
<div class="large-12 columns">
|
||||||
<h2 translate>Pending Transactions Proposals</h2>
|
<h2 translate>Pending Transactions Proposals</h2>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue