fix create

This commit is contained in:
Matias Alejo Garcia 2014-04-16 19:18:19 -03:00
parent f8b4f8e4c9
commit e676f4e69d
2 changed files with 3 additions and 4 deletions

View File

@ -14,7 +14,7 @@ angular.module('copay.signin').controller('SigninController',
};
var _setupUxHandlers = function(w) {
w.on('open', function(){
w.on('created', function(){
$location.path('peer');
$rootScope.wallet = w;
$rootScope.$digest();

View File

@ -115,16 +115,15 @@ Wallet.prototype._handleNetworkChange = function(newPeer) {
this.sendTxProposals(newPeer);
};
Wallet.prototype.netStart = function(cb) {
Wallet.prototype.netStart = function() {
var self = this;
var net = this.network;
net.on('networkChange', function() { self._handleNetworkChange() } );
net.on('networkChange', function() { self._handleNetworkChange(); } );
net.on('data', function() { self._handleData();});
net.on('open', function() {}); // TODO
net.on('close', function() {}); // TODO
net.start(function(peerId) {
self.emit('created');
return cb();
});
};