fixes in ux
This commit is contained in:
parent
17431e29c5
commit
616429a355
4 changed files with 33 additions and 19 deletions
|
|
@ -43,6 +43,7 @@ console.log('[transactions.js.10:_updateTxs:]'); //TODO
|
|||
});
|
||||
$scope.txs = txs;
|
||||
console.log('[transactions.js.55] SET HANDL+'); //TODO
|
||||
w.removeListener('txProposalsUpdated',_updateTxs)
|
||||
w.once('txProposalsUpdated',_updateTxs);
|
||||
};
|
||||
|
||||
|
|
@ -58,6 +59,20 @@ console.log('[transactions.js.55] SET HANDL+'); //TODO
|
|||
socket.on('connect', controllerUtils.handleTransactionByAddress($scope));
|
||||
}
|
||||
|
||||
|
||||
$scope.send = function (ntxid) {
|
||||
var w = $rootScope.wallet;
|
||||
w.sendTx(ntxid, function(txid) {
|
||||
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'}
|
||||
;
|
||||
_updateTxs();
|
||||
$rootScope.$digest();
|
||||
});
|
||||
};
|
||||
|
||||
$scope.sign = function (ntxid) {
|
||||
var w = $rootScope.wallet;
|
||||
var ret = w.sign(ntxid);
|
||||
|
|
@ -65,19 +80,16 @@ console.log('[transactions.js.55] SET HANDL+'); //TODO
|
|||
|
||||
var p = w.getTxProposal(ntxid);
|
||||
if (p.txp.builder.isFullySigned()) {
|
||||
w.sendTx(ntxid, function(txid) {
|
||||
$rootScope.flashMessage = txid
|
||||
? {type:'success', message: 'Transactions SENT! txid:' + txid}
|
||||
: {type:'error', message: 'There was an error sending the Transaction'}
|
||||
;
|
||||
});
|
||||
$scope.send(ntxid);
|
||||
}
|
||||
else {
|
||||
$rootScope.flashMessage = ret
|
||||
? {type:'success', message: 'Transactions signed'}
|
||||
: {type:'error', message: 'There was an error signing the Transaction'}
|
||||
;
|
||||
_updateTxs();
|
||||
$rootScope.$digest();
|
||||
}
|
||||
_updateTxs();
|
||||
};
|
||||
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue