Merge pull request #1570 from ssotomayor/fixes1231
Inform when a non-default insight server is being used
This commit is contained in:
commit
43a18c25a4
3 changed files with 14 additions and 1 deletions
|
|
@ -4,6 +4,7 @@ var copay = require('copay');
|
|||
var _ = require('underscore');
|
||||
var config = defaultConfig;
|
||||
var localConfig = JSON.parse(localStorage.getItem('config'));
|
||||
var defaults = JSON.parse(JSON.stringify(defaultConfig));
|
||||
|
||||
if (localConfig) {
|
||||
var cmv = copay.version.split('.')[1];
|
||||
|
|
@ -38,6 +39,8 @@ if (Object.keys(config.plugins).length)
|
|||
|
||||
var copayApp = window.copayApp = angular.module('copayApp', modules);
|
||||
|
||||
copayApp.value('defaults', defaults);
|
||||
|
||||
copayApp.config(function($sceDelegateProvider) {
|
||||
$sceDelegateProvider.resourceUrlWhitelist([
|
||||
'self',
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copayApp.controllers').controller('CreateController',
|
||||
function($scope, $rootScope, $location, $timeout, walletFactory, controllerUtils, Passphrase, backupService, notification) {
|
||||
function($scope, $rootScope, $location, $timeout, walletFactory, controllerUtils, Passphrase, backupService, notification, defaults) {
|
||||
controllerUtils.redirIfLogged();
|
||||
|
||||
$rootScope.fromSetup = true;
|
||||
|
|
@ -10,6 +10,7 @@ angular.module('copayApp.controllers').controller('CreateController',
|
|||
$scope.isMobile = !!window.cordova;
|
||||
$scope.hideAdv = true;
|
||||
$scope.networkName = config.networkName;
|
||||
$scope.networkUrl = config.network[$scope.networkName].url;
|
||||
|
||||
// ng-repeat defined number of times instead of repeating over array?
|
||||
$scope.getNumber = function(num) {
|
||||
|
|
@ -31,6 +32,14 @@ angular.module('copayApp.controllers').controller('CreateController',
|
|||
updateRCSelect(tc);
|
||||
});
|
||||
|
||||
$scope.$watch('networkName', function(tc) {
|
||||
$scope.networkUrl = config.network[$scope.networkName].url;
|
||||
});
|
||||
|
||||
$scope.showNetwork = function(){
|
||||
return $scope.networkUrl != defaults.network.livenet.url && $scope.networkUrl != defaults.network.testnet.url;
|
||||
};
|
||||
|
||||
$scope.create = function(form) {
|
||||
if (form && form.$invalid) {
|
||||
notification.error('Error', 'Please enter the required fields');
|
||||
|
|
|
|||
|
|
@ -88,6 +88,7 @@
|
|||
</button>
|
||||
<a translate class="button secondary m0" ng-show="!isSetupWalletPage" ng-click="setupWallet()">Next</a>
|
||||
</div>
|
||||
<div ng-show="showNetwork()"><p translate class="size-12">Using network: {{networkName}} at <a href="{{networkUrl}}" target="_blank">{{networkUrl}}</a></p></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue