From 3c7c24de493629d6a8f2623dd0e882fc7b0178ed Mon Sep 17 00:00:00 2001 From: Matias Alejo Garcia Date: Tue, 22 Apr 2014 23:07:20 -0300 Subject: [PATCH] fix ux issues. tx sending working --- index.html | 15 ++++++++++----- js/controllers/transactions.js | 8 ++++---- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/index.html b/index.html index 15af8e066..a88a9fb03 100644 --- a/index.html +++ b/index.html @@ -249,11 +249,13 @@
- - {{o.value}} - - {{o.address}} + + + + + +
{{out.value}} {{out.address}}
created at {{tx.createdTs | date:'medium'}}
@@ -266,7 +268,10 @@ - Proposal ID: {{tx.ntxid}} + + Fee: {{tx.fee}} + Proposal ID: {{tx.ntxid}} +
diff --git a/js/controllers/transactions.js b/js/controllers/transactions.js index 6f29bdd40..7cc47598e 100644 --- a/js/controllers/transactions.js +++ b/js/controllers/transactions.js @@ -5,8 +5,9 @@ angular.module('copay.transactions').controller('TransactionsController', function($scope, $rootScope, $location) { $scope.title = 'Transactions'; var _updateTxs = function() { -console.log('[transactions.js.10:_updateTxs:]'); //TODO var w =$rootScope.wallet; + if (!w) return; + var inT = w.getTxProposals(); var txs = []; @@ -25,11 +26,10 @@ console.log('[transactions.js.10:_updateTxs:]'); //TODO }); // extra fields i.outs = outs; - i.fee = i.feeSat/bitcore.util.COIN; + i.fee = i.builder.feeSat/bitcore.util.COIN; i.missingSignatures = tx.countInputMissingSignatures(0); txs.push(i); }); -console.log('[transactions.js.35:txs:]',txs); //TODO $scope.txs = txs; w.removeListener('txProposalsUpdated',_updateTxs) w.once('txProposalsUpdated',_updateTxs); @@ -38,7 +38,7 @@ console.log('[transactions.js.35:txs:]',txs); //TODO $scope.send = function (ntxid) { var w = $rootScope.wallet; w.sendTx(ntxid, function(txid) { -console.log('[transactions.js.68:txid:] SENTTX CALLBACK',txid); //TODO + console.log('[transactions.js.68:txid:] SENTTX CALLBACK',txid); //TODO $rootScope.flashMessage = txid ? {type:'success', message: 'Transactions SENT! txid:' + txid} : {type:'error', message: 'There was an error sending the Transaction'}