Merge pull request #872 from cmgustavo/bug/01-config-storage
Fixes: save config in localStorage
This commit is contained in:
commit
27e27af7ab
3 changed files with 11 additions and 7 deletions
|
|
@ -7,6 +7,9 @@ if (localConfig) {
|
|||
var count = 0;
|
||||
for (name in localConfig) {
|
||||
if (localConfig.hasOwnProperty(name)) {
|
||||
if (name === 'networkName' && config['forceNetwork']) {
|
||||
continue;
|
||||
}
|
||||
config[name] = localConfig[name];
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -34,9 +34,9 @@ function Wallet(opts) {
|
|||
throw new Error('missing required option for Wallet: ' + k);
|
||||
self[k] = opts[k];
|
||||
});
|
||||
if (copayConfig.forceNetwork && opts.networkName !== copayConfig.networkName)
|
||||
if (copayConfig.forceNetwork && this.getNetworkName() !== copayConfig.networkName)
|
||||
throw new Error('Network forced to '+copayConfig.networkName+
|
||||
' and tried to create a Wallet with network '+opts.networkName);
|
||||
' and tried to create a Wallet with network '+ this.getNetworkName());
|
||||
|
||||
this.log('creating ' + opts.requiredCopayers + ' of ' + opts.totalCopayers + ' wallet');
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue