fix networkname in special cases
This commit is contained in:
parent
ffe90f2ecc
commit
9940436ca9
1 changed files with 2 additions and 1 deletions
|
|
@ -486,9 +486,10 @@ WalletFactory.prototype.joinCreateSession = function(opts, cb) {
|
||||||
joinNetwork.greet(decodedSecret.pubKey, joinOpts.secretNumber);
|
joinNetwork.greet(decodedSecret.pubKey, joinOpts.secretNumber);
|
||||||
joinNetwork.on('data', function(sender, data) {
|
joinNetwork.on('data', function(sender, data) {
|
||||||
if (data.type === 'walletId' && data.opts) {
|
if (data.type === 'walletId' && data.opts) {
|
||||||
if (data.networkName !== decodedSecret.networkName) {
|
if (!data.networkName || data.networkName !== decodedSecret.networkName) {
|
||||||
return cb('badNetwork');
|
return cb('badNetwork');
|
||||||
}
|
}
|
||||||
|
data.opts.networkName = data.networkName;
|
||||||
|
|
||||||
var walletOpts = _.clone(data.opts);
|
var walletOpts = _.clone(data.opts);
|
||||||
walletOpts.id = data.walletId;
|
walletOpts.id = data.walletId;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue