Adds setting for bitcoin cash support
This commit is contained in:
parent
2a45533797
commit
7d64827616
12 changed files with 34 additions and 51 deletions
|
|
@ -1,6 +1,6 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copayApp.controllers').controller('advancedSettingsController', function($scope, $log, configService, platformInfo) {
|
||||
angular.module('copayApp.controllers').controller('advancedSettingsController', function($scope, $log, configService, platformInfo, externalLinkService) {
|
||||
|
||||
var updateConfig = function() {
|
||||
var config = configService.getSync();
|
||||
|
|
@ -15,9 +15,9 @@ angular.module('copayApp.controllers').controller('advancedSettingsController',
|
|||
value: config.hideNextSteps.enabled
|
||||
};
|
||||
$scope.cashSupport = {
|
||||
value: config.cashSupport.enabled
|
||||
value: config.cashSupport.enabled
|
||||
};
|
||||
|
||||
|
||||
};
|
||||
|
||||
$scope.spendUnconfirmedChange = function() {
|
||||
|
|
@ -66,6 +66,10 @@ angular.module('copayApp.controllers').controller('advancedSettingsController',
|
|||
});
|
||||
};
|
||||
|
||||
$scope.openExternalLink = function(url) {
|
||||
externalLinkService.open(url);
|
||||
};
|
||||
|
||||
$scope.$on("$ionicView.beforeEnter", function(event, data) {
|
||||
$scope.isWindowsPhoneApp = platformInfo.isCordova && platformInfo.isWP;
|
||||
updateConfig();
|
||||
|
|
|
|||
|
|
@ -22,12 +22,16 @@ angular.module('copayApp.controllers').controller('createController',
|
|||
$scope.$on("$ionicView.beforeEnter", function(event, data) {
|
||||
$scope.formData = {};
|
||||
var defaults = configService.getDefaults();
|
||||
var config = configService.getSync();
|
||||
var tc = $state.current.name == 'tabs.add.create-personal' ? 1 : defaults.wallet.totalCopayers;
|
||||
$scope.formData.account = 1;
|
||||
$scope.formData.bwsurl = defaults.bws.url;
|
||||
$scope.TCValues = lodash.range(2, defaults.limits.totalCopayers + 1);
|
||||
$scope.formData.derivationPath = derivationPathHelper.default;
|
||||
$scope.formData.coin = 'btc';
|
||||
|
||||
if (config.cashSupport.enabled) $scope.enableCash = true;
|
||||
|
||||
$scope.setTotalCopayers(tc);
|
||||
updateRCSelect(tc);
|
||||
resetPasswordFields();
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ angular.module('copayApp.controllers').controller('importController',
|
|||
|
||||
var reader = new FileReader();
|
||||
var defaults = configService.getDefaults();
|
||||
var config = configService.getSync();
|
||||
var errors = bwcService.getErrors();
|
||||
|
||||
$scope.init = function() {
|
||||
|
|
@ -20,6 +21,8 @@ angular.module('copayApp.controllers').controller('importController',
|
|||
$scope.isCopay = appConfigService.name == 'copay';
|
||||
$scope.fromHardwareWallet = { value: false };
|
||||
|
||||
if (config.cashSupport.enabled) $scope.enableCash = true;
|
||||
|
||||
if ($stateParams.code)
|
||||
$scope.processWalletInfo($stateParams.code);
|
||||
|
||||
|
|
|
|||
|
|
@ -5,12 +5,14 @@ angular.module('copayApp.controllers').controller('joinController',
|
|||
|
||||
$scope.$on("$ionicView.beforeEnter", function(event, data) {
|
||||
var defaults = configService.getDefaults();
|
||||
var config = configService.getSync();
|
||||
$scope.formData = {};
|
||||
$scope.formData.bwsurl = defaults.bws.url;
|
||||
$scope.formData.derivationPath = derivationPathHelper.default;
|
||||
$scope.formData.account = 1;
|
||||
$scope.formData.secret = null;
|
||||
$scope.formData.coin = 'btc';
|
||||
if (config.cashSupport.enabled) $scope.enableCash = true;
|
||||
resetPasswordFields();
|
||||
updateSeedSourceSelect();
|
||||
});
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ angular.module('copayApp.services').factory('configService', function(storageSer
|
|||
},
|
||||
|
||||
cashSupport: {
|
||||
enabled: true,
|
||||
enabled: false,
|
||||
},
|
||||
|
||||
recentTransactions: {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue