fix conflicts
This commit is contained in:
commit
009d7b75b8
13 changed files with 261 additions and 113 deletions
|
|
@ -1,6 +1,6 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copay.home').controller('HomeController',
|
||||
angular.module('copay.addresses').controller('AddressesController',
|
||||
function($scope, $rootScope, controllerUtils) {
|
||||
$scope.title = 'Home';
|
||||
$scope.oneAtATime = true;
|
||||
|
|
@ -3,13 +3,13 @@
|
|||
angular.module('copay.header').controller('HeaderController',
|
||||
function($scope, $rootScope, $location, walletFactory, controllerUtils) {
|
||||
$scope.menu = [{
|
||||
'title': 'Home',
|
||||
'icon': 'fi-home',
|
||||
'link': '#/home'
|
||||
}, {
|
||||
'title': 'Copayers',
|
||||
'icon': 'fi-torsos-all',
|
||||
'link': '#/peer'
|
||||
}, {
|
||||
'title': 'Addresses',
|
||||
'icon': 'fi-address-book',
|
||||
'link': '#/addresses'
|
||||
}, {
|
||||
'title': 'Transactions',
|
||||
'icon': 'fi-loop',
|
||||
|
|
@ -49,4 +49,5 @@ angular.module('copay.header').controller('HeaderController',
|
|||
$rootScope.flashMessage = {};
|
||||
};
|
||||
|
||||
$rootScope.isCollapsed = true;
|
||||
});
|
||||
|
|
|
|||
|
|
@ -28,13 +28,6 @@ angular.module('copay.send').controller('SendController',
|
|||
form.amount.$pristine = true;
|
||||
|
||||
// TODO: check if createTx has an error.
|
||||
$rootScope.flashMessage = { message: 'You send a proposal transaction succefully', type: 'success'};
|
||||
$rootScope.flashMessage = { message: 'Your transaction proposal has been sent successfully', type: 'success'};
|
||||
};
|
||||
|
||||
$scope.sendTest = function() {
|
||||
var w = $rootScope.wallet;
|
||||
w.createTx( 'mimoZNLcP2rrMRgdeX5PSnR7AjCqQveZZ4', '12345',function() {
|
||||
$rootScope.$digest();
|
||||
});
|
||||
};
|
||||
});
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ angular.module('copay.transactions').controller('TransactionsController',
|
|||
$scope.oneAtATime = true;
|
||||
|
||||
var _updateTxs = function() {
|
||||
console.log('[transactions.js.10:_updateTxs:]'); //TODO
|
||||
var w =$rootScope.wallet;
|
||||
var inT = w.getTxProposals();
|
||||
var txs = [];
|
||||
|
|
@ -35,11 +36,28 @@ angular.module('copay.transactions').controller('TransactionsController',
|
|||
one.missingSignatures = tx.countInputMissingSignatures(0);
|
||||
one.signedByUs = i.signedByUs;
|
||||
one.ntxid = i.ntxid;
|
||||
one.creator = i.txp.creator,
|
||||
one.creator = i.txp.creator;
|
||||
one.createdTs = i.txp.createdTs;
|
||||
one.sentTs = i.txp.sentTs;
|
||||
txs.push(one);
|
||||
});
|
||||
$scope.txs = txs;
|
||||
console.log('[transactions.js.55] SET HANDL+'); //TODO
|
||||
w.removeListener('txProposalsUpdated',_updateTxs)
|
||||
w.once('txProposalsUpdated',_updateTxs);
|
||||
};
|
||||
|
||||
$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) {
|
||||
|
|
@ -49,19 +67,16 @@ angular.module('copay.transactions').controller('TransactionsController',
|
|||
|
||||
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