Merge pull request #1530 from matiu/fix/join

fix networkname in special cases
This commit is contained in:
Matias Alejo Garcia 2014-10-04 19:59:46 -03:00
commit f0301aa12b

View file

@ -486,9 +486,10 @@ WalletFactory.prototype.joinCreateSession = function(opts, cb) {
joinNetwork.greet(decodedSecret.pubKey, joinOpts.secretNumber);
joinNetwork.on('data', function(sender, data) {
if (data.type === 'walletId' && data.opts) {
if (data.networkName !== decodedSecret.networkName) {
if (!data.networkName || data.networkName !== decodedSecret.networkName) {
return cb('badNetwork');
}
data.opts.networkName = data.networkName;
var walletOpts = _.clone(data.opts);
walletOpts.id = data.walletId;