add network to wallet file + check on open

This commit is contained in:
Matias Alejo Garcia 2014-06-09 17:09:06 -03:00
commit 85030f00ab
2 changed files with 21 additions and 4 deletions

View file

@ -20,7 +20,7 @@ function Wallet(opts) {
['storage', 'network', 'blockchain',
'requiredCopayers', 'totalCopayers', 'spendUnconfirmed',
'publicKeyRing', 'txProposals', 'privateKey', 'version',
'reconnectDelay'
'reconnectDelay', 'networkName'
].forEach(function(k) {
if (typeof opts[k] === 'undefined')
throw new Error('missing required option for Wallet: ' + k);
@ -181,6 +181,7 @@ Wallet.prototype._optsToObj = function() {
requiredCopayers: this.requiredCopayers,
totalCopayers: this.totalCopayers,
reconnectDelay: this.reconnectDelay,
networkName: this.networkName,
name: this.name,
netKey: this.netKey,
version: this.version,