diff --git a/index.html b/index.html index d027d41b0..65830843f 100644 --- a/index.html +++ b/index.html @@ -857,13 +857,14 @@
Bitcoin Network -
+ ng-true-value="livenet" ng-false-value="testnet" class="form-control" ng-click="changeNetwork()" + ng-disabled="forceNetwork" + ng-checked="networkName == 'livenet' ? true : false"> -
-
- Network has been fixed to {{networkName}} in this setup. See copay.io +
+ Network has been fixed to + {{networkName}} in this setup. See copay.io for options to use Copay on both livenet and testnet.
diff --git a/js/app.js b/js/app.js index 624c12f0d..01c36efb6 100644 --- a/js/app.js +++ b/js/app.js @@ -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]; } } diff --git a/js/models/core/Wallet.js b/js/models/core/Wallet.js index 87f20d61e..75ca23191 100644 --- a/js/models/core/Wallet.js +++ b/js/models/core/Wallet.js @@ -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');