Enable Coinbase to old and new users
This commit is contained in:
parent
5bbad38a99
commit
e4ac118896
5 changed files with 9 additions and 14 deletions
|
|
@ -19,7 +19,7 @@ angular.module('copayApp.controllers').controller('advancedSettingsController',
|
|||
value: config.glidera.enabled
|
||||
};
|
||||
$scope.coinbaseEnabled = {
|
||||
value: config.coinbase.enabled
|
||||
value: config.coinbaseV2
|
||||
};
|
||||
$scope.recentTransactionsEnabled = {
|
||||
value: config.recentTransactions.enabled
|
||||
|
|
@ -72,9 +72,7 @@ angular.module('copayApp.controllers').controller('advancedSettingsController',
|
|||
|
||||
$scope.coinbaseChange = function() {
|
||||
var opts = {
|
||||
coinbase: {
|
||||
enabled: $scope.coinbaseEnabled.value
|
||||
}
|
||||
coinbaseV2: $scope.coinbaseEnabled.value
|
||||
};
|
||||
configService.set(opts, function(err) {
|
||||
if (err) $log.debug(err);
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ angular.module('copayApp.controllers').controller('buyandsellController', functi
|
|||
|
||||
$scope.$on("$ionicView.beforeEnter", function(event, data) {
|
||||
configService.whenAvailable(function(config) {
|
||||
$scope.isCoinbaseEnabled = config.coinbase.enabled;
|
||||
$scope.isCoinbaseEnabled = config.coinbaseV2;
|
||||
$scope.isGlideraEnabled = config.glidera.enabled;
|
||||
|
||||
if (!$scope.isCoinbaseEnabled && !$scope.isGlideraEnabled)
|
||||
|
|
|
|||
|
|
@ -83,7 +83,7 @@ angular.module('copayApp.controllers').controller('tabHomeController',
|
|||
var wallet = profileService.getWallet(walletId);
|
||||
updateWallet(wallet);
|
||||
if ($scope.recentTransactionsEnabled) getNotifications();
|
||||
if (type == 'NewBlock' && n && n.data && n.data.network == 'livenet') {
|
||||
if ($scope.coinbaseEnabled && type == 'NewBlock' && n && n.data && n.data.network == 'livenet') {
|
||||
// Update Coinbase
|
||||
coinbaseService.updatePendingTransactions();
|
||||
}
|
||||
|
|
@ -102,7 +102,7 @@ angular.module('copayApp.controllers').controller('tabHomeController',
|
|||
var isWindowsPhoneApp = platformInfo.isWP && platformInfo.isCordova;
|
||||
|
||||
$scope.glideraEnabled = config.glidera.enabled && !isWindowsPhoneApp;
|
||||
$scope.coinbaseEnabled = config.coinbase.enabled && !isWindowsPhoneApp;
|
||||
$scope.coinbaseEnabled = config.coinbaseV2 && !isWindowsPhoneApp;
|
||||
$scope.amazonEnabled = config.amazon.enabled;
|
||||
$scope.bitpayCardEnabled = config.bitpayCard.enabled;
|
||||
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ angular.module('copayApp.controllers').controller('tabSettingsController', funct
|
|||
|
||||
$scope.bitpayCardEnabled = config.bitpayCard.enabled;
|
||||
$scope.glideraEnabled = config.glidera.enabled && !isWindowsPhoneApp;
|
||||
$scope.coinbaseEnabled = config.coinbase.enabled && !isWindowsPhoneApp;
|
||||
$scope.coinbaseEnabled = config.coinbaseV2 && !isWindowsPhoneApp;
|
||||
|
||||
if ($scope.bitpayCardEnabled) {
|
||||
bitpayCardService.getBitpayDebitCards(function(err, cards) {
|
||||
|
|
|
|||
|
|
@ -48,10 +48,7 @@ angular.module('copayApp.services').factory('configService', function(storageSer
|
|||
testnet: false
|
||||
},
|
||||
|
||||
coinbase: {
|
||||
enabled: true,
|
||||
testnet: false
|
||||
},
|
||||
coinbaseV2: true,
|
||||
|
||||
bitpayCard: {
|
||||
enabled: true
|
||||
|
|
@ -197,8 +194,8 @@ angular.module('copayApp.services').factory('configService', function(storageSer
|
|||
if (!configCache.glidera) {
|
||||
configCache.glidera = defaultConfig.glidera;
|
||||
}
|
||||
if (!configCache.coinbase) {
|
||||
configCache.coinbase = defaultConfig.coinbase;
|
||||
if (!configCache.coinbaseV2) {
|
||||
configCache.coinbaseV2 = defaultConfig.coinbaseV2;
|
||||
}
|
||||
if (!configCache.amazon) {
|
||||
configCache.amazon = defaultConfig.amazon;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue