From 9940436ca9f865d1aa63497e6b2db7cbd70f47f3 Mon Sep 17 00:00:00 2001 From: Matias Alejo Garcia Date: Sat, 4 Oct 2014 19:52:43 -0300 Subject: [PATCH] fix networkname in special cases --- js/models/WalletFactory.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/js/models/WalletFactory.js b/js/models/WalletFactory.js index 4f887210b..7db1a0890 100644 --- a/js/models/WalletFactory.js +++ b/js/models/WalletFactory.js @@ -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;