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">
|
<div class="small-12 medium-6 medium-centered large-6 large-centered columns">
|
||||||
<fieldset>
|
<fieldset>
|
||||||
<legend>Bitcoin Network</legend>
|
<legend>Bitcoin Network</legend>
|
||||||
<div ng-if="!forceNetwork">
|
|
||||||
<input id="network-name" type="checkbox" ng-model="networkName"
|
<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>
|
<label for="network-name">Livenet</label>
|
||||||
</div>
|
<div ng-show="forceNetwork">
|
||||||
<div ng-if="forceNetwork">
|
Network has been fixed to
|
||||||
Network has been fixed to <strong>{{networkName}}</strong> in this setup. See <a href="https://copay.io">copay.io</a>
|
<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.
|
for options to use Copay on both livenet and testnet.
|
||||||
</div>
|
</div>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
|
@ -7,6 +7,9 @@ if (localConfig) {
|
||||||
var count = 0;
|
var count = 0;
|
||||||
for (name in localConfig) {
|
for (name in localConfig) {
|
||||||
if (localConfig.hasOwnProperty(name)) {
|
if (localConfig.hasOwnProperty(name)) {
|
||||||
|
if (name === 'networkName' && config['forceNetwork']) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
config[name] = localConfig[name];
|
config[name] = localConfig[name];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,9 +34,9 @@ function Wallet(opts) {
|
||||||
throw new Error('missing required option for Wallet: ' + k);
|
throw new Error('missing required option for Wallet: ' + k);
|
||||||
self[k] = opts[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+
|
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');
|
this.log('creating ' + opts.requiredCopayers + ' of ' + opts.totalCopayers + ' wallet');
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue