diff --git a/src/js/controllers/advancedSettings.js b/src/js/controllers/advancedSettings.js index 9355dd730..42fa10855 100644 --- a/src/js/controllers/advancedSettings.js +++ b/src/js/controllers/advancedSettings.js @@ -13,10 +13,6 @@ angular.module('copayApp.controllers').controller('advancedSettingsController', $scope.hideNextSteps = { value: config.hideNextSteps.enabled }; - $scope.displayBitcoinCoreEnabled = { - value: config.displayBitcoinCore.enabled - }; - }; $scope.spendUnconfirmedChange = function() { @@ -52,17 +48,6 @@ angular.module('copayApp.controllers').controller('advancedSettingsController', }); }; - $scope.displayBitcoinCoreChange = function() { - var opts = { - displayBitcoinCore: { - enabled: $scope.displayBitcoinCoreEnabled.value - } - }; - configService.set(opts, function(err) { - if (err) $log.debug(err); - }); - }; - $scope.$on("$ionicView.beforeEnter", function(event, data) { $scope.isWindowsPhoneApp = platformInfo.isCordova && platformInfo.isWP; updateConfig(); diff --git a/src/js/controllers/communityController.js b/src/js/controllers/communityController.js index 537270b8f..d9f952666 100644 --- a/src/js/controllers/communityController.js +++ b/src/js/controllers/communityController.js @@ -29,7 +29,11 @@ angular.module('copayApp.controllers').controller('communityController', functio } $scope.open = function(url) { - window.open(url, '_system'); + if (platformInfo.isNW) { + require('nw.gui').Shell.openExternal( url ); + } else { + window.open(url, '_system'); + } } }); diff --git a/src/js/controllers/modals/search.js b/src/js/controllers/modals/search.js index 6612da6e8..55d51bfcc 100644 --- a/src/js/controllers/modals/search.js +++ b/src/js/controllers/modals/search.js @@ -1,6 +1,6 @@ 'use strict'; -angular.module('copayApp.controllers').controller('searchController', function($scope, $interval, $timeout, $filter, $log, $ionicModal, $ionicPopover, $state, $stateParams, $ionicScrollDelegate, bwcError, profileService, lodash, configService, gettext, gettextCatalog, platformInfo, walletService, externalLinkService) { +angular.module('copayApp.controllers').controller('searchController', function($scope, $interval, $timeout, $filter, $log, $ionicModal, $ionicPopover, $state, $stateParams, $ionicScrollDelegate, bwcError, profileService, lodash, configService, gettext, gettextCatalog, platformInfo, walletService, externalLinkService, bitcoinCashJsService) { var HISTORY_SHOW_LIMIT = 10; var currentTxHistoryPage = 0; @@ -31,6 +31,19 @@ angular.module('copayApp.controllers').controller('searchController', function($ var message = tx.message ? tx.message : ''; var comment = tx.note ? tx.note.body : ''; var addressTo = tx.addressTo ? tx.addressTo : ''; + + if ($scope.wallet.coin === 'bch') { + + /** + * For each address + * I translate the legacy address and add in the searchable string the 3 kind of addresses + */ + lodash.each(tx.outputs, function(output) { + var addr = bitcoinCashJsService.translateAddresses(output.address); + addressTo += addr.legacy + addr.bitpay + 'bitcoincash:' + addr.cashaddr + }); + } + var txid = tx.txid ? tx.txid : ''; return ((tx.amountStr + message + addressTo + addrbook + searchableDate + comment + txid).toString()).toLowerCase(); } diff --git a/src/js/controllers/nextStepsController.js b/src/js/controllers/nextStepsController.js index 48ce15a5f..ad2cbaf20 100644 --- a/src/js/controllers/nextStepsController.js +++ b/src/js/controllers/nextStepsController.js @@ -1,6 +1,6 @@ 'use strict'; -angular.module('copayApp.controllers').controller('nextStepsController', function($scope, nextStepsService, $ionicScrollDelegate, $timeout, configService) { +angular.module('copayApp.controllers').controller('nextStepsController', function($scope, nextStepsService, $ionicScrollDelegate, $timeout, platformInfo, configService) { $scope.hide = false; @@ -22,6 +22,10 @@ angular.module('copayApp.controllers').controller('nextStepsController', functio }; $scope.open = function(url) { - window.open(url, '_system'); + if (platformInfo.isNW) { + require('nw.gui').Shell.openExternal( url ); + } else { + window.open(url, '_system'); + } } }); diff --git a/src/js/controllers/tab-home.js b/src/js/controllers/tab-home.js index 28736972f..40e391708 100644 --- a/src/js/controllers/tab-home.js +++ b/src/js/controllers/tab-home.js @@ -83,9 +83,7 @@ angular.module('copayApp.controllers').controller('tabHomeController', $scope.$on("$ionicView.enter", function(event, data) { $ionicNavBarDelegate.showBar(true); - updateAllWallets(function() { - profileService.initBitcoinCoreDisplay(); - }); + updateAllWallets(); addressbookService.list(function(err, ab) { if (err) $log.error(err); @@ -126,8 +124,6 @@ angular.module('copayApp.controllers').controller('tabHomeController', $scope.nextStepsItems = nextStepsService.get(); } - $scope.displayBitcoinCore = config.displayBitcoinCore.enabled; - $scope.showServices = true; pushNotificationsService.init(); firebaseEventsService.init(); @@ -281,8 +277,6 @@ angular.module('copayApp.controllers').controller('tabHomeController', var txIdList = []; - var notificationsBeforeCheck = notifications.length; - for (var i=0; i 0) { - // Do not trust cachedBalance as it is added asynchronously. Using a new promise-based function. - root.getWalletsBalance(walletsBtc) - .then(function(totalBalance) { - var enableDisplayBitcoinCore = totalBalance > 0 ? true : false; - - var opts = { - displayBitcoinCore: { - enabled: enableDisplayBitcoinCore - } - }; - configService.set(opts, function(err) { - if (err) $log.debug(err); - }); - - storageService.activateDisplayBitcoinCoreFlag(flagValue); - }); - } - } - // Calculate wallets total balance (Promise). Attempts to fix asynchronous issue with cachedBalance not being available when it's needed root.getWalletsBalance = function(wallets) { return new Promise(function(resolve, reject) { diff --git a/src/js/services/storageService.js b/src/js/services/storageService.js index c2f8077be..3d1ecfeef 100644 --- a/src/js/services/storageService.js +++ b/src/js/services/storageService.js @@ -645,13 +645,6 @@ angular.module('copayApp.services') }); }); } - - root.activateDisplayBitcoinCoreFlag = function(value) { - var flag = { - initialized: value - }; - storage.set('displayBitcoinCoreFlag', flag, function() { }); - } - + return root; }); diff --git a/src/sass/views/amount.scss b/src/sass/views/amount.scss index 26169f206..3000ea696 100644 --- a/src/sass/views/amount.scss +++ b/src/sass/views/amount.scss @@ -252,6 +252,13 @@ position: relative; padding: 10px 30px; + .text-selectable { + -webkit-user-select: text; + -moz-user-select: text; + -ms-user-select: text; + user-select: text; + } + .primary-amount { input, .unit, .primary-amount-display { font-size: 1.8em; diff --git a/www/views/advancedSettings.html b/www/views/advancedSettings.html index 2b46e5375..253c35c8f 100644 --- a/www/views/advancedSettings.html +++ b/www/views/advancedSettings.html @@ -29,15 +29,6 @@ Hide Next Steps Card - -
- - - Bitcoin Core Wallet - -
- If enabled, Bitcoin Core (BTC) wallet(s) will be displayed on the Home screen. If disabled, BTC wallets will be not be deleted, only hidden. -
diff --git a/www/views/amount.html b/www/views/amount.html index 3d581f886..af4e9d55c 100644 --- a/www/views/amount.html +++ b/www/views/amount.html @@ -18,11 +18,11 @@
- {{ amountModel.amount || 0 }}{{unit}} + {{ amountModel.amount || 0 }}{{unit}}
{{globalResult}} {{unit}}
- {{alternativeAmount || '0.00'}} {{alternativeUnit}} + {{alternativeAmount || '0.00'}} {{alternativeUnit}}
diff --git a/www/views/includes/walletSelector.html b/www/views/includes/walletSelector.html index bcb7b3f90..a53d1c7f1 100644 --- a/www/views/includes/walletSelector.html +++ b/www/views/includes/walletSelector.html @@ -37,14 +37,13 @@ -
+
Bitcoin Core (BTC)
diff --git a/www/views/tab-home.html b/www/views/tab-home.html index c2a1c0635..d84be45fe 100644 --- a/www/views/tab-home.html +++ b/www/views/tab-home.html @@ -28,10 +28,7 @@
- Your Bitcoin Cash (BCH) Wallet is ready! -
-
- A Bitcoin Core (BTC) wallet can be displayed from Settings Advanced + Your Bitcoin Wallets are ready!
@@ -51,7 +48,6 @@ Recent Transactions - {{notificationsN}} @@ -73,8 +69,7 @@ -
+