mirror of https://github.com/BTCPrivate/copay.git
Fixes:
* Save config in localStorage * Show forced networkName in settings Page
This commit is contained in:
parent
937369d0c7
commit
4d160a4ee7
11
index.html
11
index.html
|
@ -849,13 +849,14 @@
|
|||
<div class="small-12 medium-6 medium-centered large-6 large-centered columns">
|
||||
<fieldset>
|
||||
<legend>Bitcoin Network</legend>
|
||||
<div ng-if="!forceNetwork">
|
||||
<input id="network-name" type="checkbox" ng-model="networkName"
|
||||
ng-true-value="livenet" ng-false-value="testnet" class="form-control" ng-click="changeNetwork()">
|
||||
ng-true-value="livenet" ng-false-value="testnet" class="form-control" ng-click="changeNetwork()"
|
||||
ng-disabled="forceNetwork"
|
||||
ng-checked="networkName == 'livenet' ? true : false">
|
||||
<label for="network-name">Livenet</label>
|
||||
</div>
|
||||
<div ng-if="forceNetwork">
|
||||
Network has been fixed to <strong>{{networkName}}</strong> in this setup. See <a href="https://copay.io">copay.io</a>
|
||||
<div ng-show="forceNetwork">
|
||||
Network has been fixed to
|
||||
<strong>{{networkName}}</strong> in this setup. See <a href="https://copay.io">copay.io</a>
|
||||
for options to use Copay on both livenet and testnet.
|
||||
</div>
|
||||
</fieldset>
|
||||
|
|
|
@ -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…
Reference in New Issue