checks network match when joining a wallet
This commit is contained in:
parent
c5a3049b9d
commit
4ae3748414
5 changed files with 26 additions and 5 deletions
|
|
@ -220,6 +220,12 @@ WalletFactory.prototype.joinCreateSession = function(secret, nickname, passphras
|
|||
});
|
||||
self.network.on('data', function(sender, data) {
|
||||
if (data.type ==='walletId') {
|
||||
|
||||
console.log('[WalletFactory.js.223]', data.networkName, self.networkName); //TODO
|
||||
if (data.networkName !== self.networkName ){
|
||||
return cb('badNetwork');
|
||||
}
|
||||
|
||||
data.opts.privateKey = privateKey;
|
||||
data.opts.nickname = nickname;
|
||||
data.opts.passphrase = passphrase;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue