Merge pull request #1856 from isocolsky/ref/update_txs
Various small fixes
This commit is contained in:
commit
6e099a7aa2
3 changed files with 24 additions and 27 deletions
|
|
@ -1363,8 +1363,7 @@ Wallet.prototype.getPendingTxProposals = function() {
|
|||
var txps = this.getTxProposals();
|
||||
var satToUnit = 1 / this.settings.unitToSatoshi;
|
||||
|
||||
_.find(txps, function(txp) {
|
||||
if (txp.isPending) {
|
||||
_.each(_.where(txps, 'isPending'), function(txp) {
|
||||
pendingForUs++;
|
||||
var addresses = {};
|
||||
var outs = JSON.parse(txp.builder.vanilla.outs);
|
||||
|
|
@ -1386,7 +1385,6 @@ Wallet.prototype.getPendingTxProposals = function() {
|
|||
txp.missingSignatures = txp.builder.build().countInputMissingSignatures(0);
|
||||
txp.actionList = self._getActionList(txp.peerActions);
|
||||
ret.txs.push(txp);
|
||||
}
|
||||
});
|
||||
|
||||
ret.pendingForUs = pendingForUs;
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ angular.module('copayApp.services')
|
|||
|
||||
|
||||
root.updateTxsAndBalance = function(w) {
|
||||
root.updateTxs();
|
||||
root.updateTxs(w);
|
||||
root.updateBalance(w, function() {
|
||||
$rootScope.$digest();
|
||||
});
|
||||
|
|
@ -356,8 +356,8 @@ angular.module('copayApp.services')
|
|||
});
|
||||
};
|
||||
|
||||
root.updateTxs = function() {
|
||||
var w = $rootScope.wallet;
|
||||
root.updateTxs = function(w) {
|
||||
w = w || $rootScope.wallet;
|
||||
if (!w) return root.onErrorDigest();
|
||||
var res = w.getPendingTxProposals();
|
||||
_.each(res.txs, function(tx) {
|
||||
|
|
|
|||
|
|
@ -120,5 +120,4 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue