Fix for 1231, show insight-url when is not default.

This commit is contained in:
ssotomayor 2014-10-14 15:31:23 -03:00
parent 4741f12060
commit 8379f83c67
3 changed files with 11 additions and 0 deletions

View File

@ -38,6 +38,11 @@ if (Object.keys(config.plugins).length)
var copayApp = window.copayApp = angular.module('copayApp', modules);
copayApp.value('defaults', {
livenetUrl: 'https://insight.bitpay.com:443',
testnetUrl: 'https://test-insight.bitpay.com:443'
});
copayApp.config(function($sceDelegateProvider) {
$sceDelegateProvider.resourceUrlWhitelist([
'self',

View File

@ -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,10 @@ angular.module('copayApp.controllers').controller('CreateController',
updateRCSelect(tc);
});
$scope.$watch('networkName', function(tc) {
$scope.networkUrl = config.network[$scope.networkName].url;
});
$scope.create = function(form) {
if (form && form.$invalid) {
notification.error('Error', 'Please enter the required fields');

View File

@ -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>