fix ux issues. tx sending working

This commit is contained in:
Matias Alejo Garcia 2014-04-22 23:07:20 -03:00
parent 31b2d5abac
commit 3c7c24de49
2 changed files with 14 additions and 9 deletions

View File

@ -249,11 +249,13 @@
<div class="txheader">
<div class="row">
<div class="large-8 columns">
<tr ng-repeat="o in tx.outs">
<td class="text-right size-24">{{o.value}} <i class="fi-bitcoin"></i></td>
<td class="text-center size-48"> <i class="fi-arrow-right size-40"> </i>
<td class="text-left size-24">{{o.address}}</td>
<table style="width:100%">
<tr ng-repeat="out in tx.outs">
<td class="text-right size-24"> <i class="fi-bitcoin"></i> {{out.value}}</td>
<td class="text-center size-48"> <i class="fi-arrow-right size-24"> </i></td>
<td class="text-left size-24">{{out.address}}</td>
</tr>
</table>
</div>
<div class="large-4 columns text-right">
<h6> created at {{tx.createdTs | date:'medium'}} </h6>
@ -266,7 +268,10 @@
<table style="width:100%">
<tbody>
<tr>
<small class="right text-gray"> <strong> Proposal ID: </strong> {{tx.ntxid}} </small>
<small class="right text-gray">
Fee: <strong> <i class="fi-bitcoin"></i> {{tx.fee}} </strong>
<strong> Proposal ID: </strong> {{tx.ntxid}}
</small>
</tr>
<tr ng-repeat="(peer, actions) in tx.peerActions">
<td colspan="3">

View File

@ -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'}