From 8324b18b81da311b04faae4cbd2793715ad63388 Mon Sep 17 00:00:00 2001 From: Sebastiaan Pasma Date: Mon, 14 May 2018 13:12:41 +0200 Subject: [PATCH 01/20] Improvement - 205 - Desktop clients should open websites in a browser, not an app webview. (OSX/Win/Linux) --- src/js/controllers/communityController.js | 6 +++++- src/js/controllers/nextStepsController.js | 8 ++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) 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/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'); + } } }); From 814e818380ccb33ef8bfe15c2f893389941a3ba6 Mon Sep 17 00:00:00 2001 From: Sebastiaan Pasma Date: Mon, 14 May 2018 16:01:09 +0200 Subject: [PATCH 02/20] Improvement - 320 - Remove red notification bubble from "Recent Transactions" module --- src/js/controllers/tab-home.js | 10 ---------- www/views/tab-home.html | 1 - 2 files changed, 11 deletions(-) diff --git a/src/js/controllers/tab-home.js b/src/js/controllers/tab-home.js index 28736972f..84fc40b06 100644 --- a/src/js/controllers/tab-home.js +++ b/src/js/controllers/tab-home.js @@ -281,8 +281,6 @@ angular.module('copayApp.controllers').controller('tabHomeController', var txIdList = []; - var notificationsBeforeCheck = notifications.length; - for (var i=0; i Recent Transactions - {{notificationsN}} From b65da992c7c289ae3f4f02b2a9c1bcbaf4ea56eb Mon Sep 17 00:00:00 2001 From: Sebastiaan Pasma Date: Tue, 15 May 2018 09:58:05 +0200 Subject: [PATCH 03/20] Improvement - 321 - "Search transactions" doesn't work with BCH prefix --- src/js/controllers/modals/search.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/js/controllers/modals/search.js b/src/js/controllers/modals/search.js index 3d5ae366e..375e69aec 100644 --- a/src/js/controllers/modals/search.js +++ b/src/js/controllers/modals/search.js @@ -29,6 +29,7 @@ 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 (tx.amountUnitStr === 'BCH' && addressTo) addressTo = 'bitcoincash:'+addressTo; var txid = tx.txid ? tx.txid : ''; return ((tx.amountStr + message + addressTo + addrbook + searchableDate + comment + txid).toString()).toLowerCase(); } From 17ad7e8e745c76dce780fde8f71cc6d41858c6fe Mon Sep 17 00:00:00 2001 From: Sebastiaan Pasma Date: Tue, 15 May 2018 15:07:31 +0200 Subject: [PATCH 04/20] Improvement - 322 - "Search transactions" empty results case --- src/js/controllers/modals/search.js | 21 ++++++++++++++++++++- www/views/modals/search.html | 20 ++++++++++++++++++++ 2 files changed, 40 insertions(+), 1 deletion(-) diff --git a/src/js/controllers/modals/search.js b/src/js/controllers/modals/search.js index 3d5ae366e..12899deaf 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) { +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) { var HISTORY_SHOW_LIMIT = 10; var currentTxHistoryPage = 0; @@ -21,6 +21,8 @@ angular.module('copayApp.controllers').controller('searchController', function($ function filter(search) { $scope.filteredTxHistory = []; + $scope.searchTermIsAddress = false; + $scope.searchTermIsTxId = false; function computeSearchableString(tx) { var addrbook = ''; @@ -50,8 +52,15 @@ angular.module('copayApp.controllers').controller('searchController', function($ return lodash.includes(tx.searcheableString, search.toLowerCase()); }); + if (search && (search.indexOf('bitcoincash:') >= 0 || search[0] === 'C' || search[0] === 'H' || search[0] === 'p' || search[0] === 'q') && search.replace('bitcoincash:', '').length === 42) { + $scope.searchTermIsAddress = true; + } else if (search && search.lengh === 64) { + $scope.searchTermIsTxId = true; + } + if ($scope.filteredTxHistory.length > HISTORY_SHOW_LIMIT) $scope.txHistoryShowMore = true; else $scope.txHistoryShowMore = false; + return $scope.filteredTxHistory; }; @@ -77,4 +86,14 @@ angular.module('copayApp.controllers').controller('searchController', function($ $scope.txHistoryShowMore = $scope.filteredTxHistory.length > $scope.txHistorySearchResults.length; }; + $scope.searchOnBlockchain = function(searchTerm) { + var url = 'https://explorer.bitcoin.com/bch/search/' + searchTerm; + var optIn = true; + var title = null; + var message = gettextCatalog.getString('Search on Explorer.Bitcoin.com'); + var okText = gettextCatalog.getString('Open Explorer'); + var cancelText = gettextCatalog.getString('Go Back'); + externalLinkService.open(url, optIn, title, message, okText, cancelText); + }; + }); diff --git a/www/views/modals/search.html b/www/views/modals/search.html index ad82409de..efa3f84f7 100644 --- a/www/views/modals/search.html +++ b/www/views/modals/search.html @@ -18,6 +18,26 @@
+
+
+ {{'No results found'|translate}} +
+
+ +
+
+ +
+
+ +
+
From a915570df3d9b56223c436169533af4d81e95c00 Mon Sep 17 00:00:00 2001 From: Sebastiaan Pasma Date: Wed, 16 May 2018 12:11:41 +0200 Subject: [PATCH 05/20] Improvement - 322 - "Search transactions" empty results case --- src/js/controllers/modals/search.js | 14 +++++++++----- www/views/modals/search.html | 18 +++++------------- 2 files changed, 14 insertions(+), 18 deletions(-) diff --git a/src/js/controllers/modals/search.js b/src/js/controllers/modals/search.js index 12899deaf..082ef52cc 100644 --- a/src/js/controllers/modals/search.js +++ b/src/js/controllers/modals/search.js @@ -52,10 +52,14 @@ angular.module('copayApp.controllers').controller('searchController', function($ return lodash.includes(tx.searcheableString, search.toLowerCase()); }); - if (search && (search.indexOf('bitcoincash:') >= 0 || search[0] === 'C' || search[0] === 'H' || search[0] === 'p' || search[0] === 'q') && search.replace('bitcoincash:', '').length === 42) { - $scope.searchTermIsAddress = true; - } else if (search && search.lengh === 64) { - $scope.searchTermIsTxId = true; + if (search) { + if ((search.indexOf('bitcoincash:') >= 0 || search[0] === 'C' || search[0] === 'H' || search[0] === 'p' || search[0] === 'q') && search.replace('bitcoincash:', '').length === 42) { // CashAddr + $scope.searchTermIsAddress = true; + } else if ((search[0] === "1" || search[0] === "3" || search.substring(0, 3) === "bc1") && search.length >= 26 && search.length <= 35) { // Legacy Addresses + $scope.searchTermIsAddress = true; + } else if (search.lengh === 64) { + $scope.searchTermIsTxId = true; + } } if ($scope.filteredTxHistory.length > HISTORY_SHOW_LIMIT) $scope.txHistoryShowMore = true; @@ -87,7 +91,7 @@ angular.module('copayApp.controllers').controller('searchController', function($ }; $scope.searchOnBlockchain = function(searchTerm) { - var url = 'https://explorer.bitcoin.com/bch/search/' + searchTerm; + var url = 'https://explorer.bitcoin.com/'+$scope.wallet.coin+'/search/' + searchTerm; var optIn = true; var title = null; var message = gettextCatalog.getString('Search on Explorer.Bitcoin.com'); diff --git a/www/views/modals/search.html b/www/views/modals/search.html index efa3f84f7..877173e73 100644 --- a/www/views/modals/search.html +++ b/www/views/modals/search.html @@ -4,7 +4,7 @@ Close
- Search Transactions + Search Transactions ({{wallet.coin}})
@@ -23,18 +23,10 @@ {{'No results found'|translate}}
- -
-
- -
-
-
From 31f50ad0cb594c3239c78d2c12b6fb0ff174c073 Mon Sep 17 00:00:00 2001 From: Sebastiaan Pasma Date: Wed, 16 May 2018 13:50:25 +0200 Subject: [PATCH 06/20] Fixes for CashAddr, includes validation of address, adds cashaddr to search string next to legacy address --- src/js/controllers/modals/search.js | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/js/controllers/modals/search.js b/src/js/controllers/modals/search.js index 375e69aec..58ef3fa24 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) { +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, bitcoinCashJsService) { var HISTORY_SHOW_LIMIT = 10; var currentTxHistoryPage = 0; @@ -29,7 +29,16 @@ 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 (tx.amountUnitStr === 'BCH' && addressTo) addressTo = 'bitcoincash:'+addressTo; + + if ($scope.wallet.coin === 'bch' && addressTo) { + try { + var addr = bitcoinCashJsService.readAddress(addressTo); + if (addr !== null) addressTo = addressTo + ' bitcoincash:'+addr.cashaddr; + } catch (e) { + $log.debug(addressTo+' not a valid address.. continuing..'); + } + } + var txid = tx.txid ? tx.txid : ''; return ((tx.amountStr + message + addressTo + addrbook + searchableDate + comment + txid).toString()).toLowerCase(); } From 38d86f6524f4ba70954cf02ff8318748f4a6b9a6 Mon Sep 17 00:00:00 2001 From: Sebastiaan Pasma Date: Wed, 16 May 2018 14:07:01 +0200 Subject: [PATCH 07/20] Improvement - 337 - Small fix for Android Status Bar Color --- src/js/routes.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/js/routes.js b/src/js/routes.js index 337363fcc..c4431e660 100644 --- a/src/js/routes.js +++ b/src/js/routes.js @@ -1251,6 +1251,12 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr if (screen.width < 768 && platformInfo.isCordova) screen.lockOrientation('portrait'); + if (window.StatusBar) { + if (ionic.Platform.isAndroid()) { + StatusBar.backgroundColorByHexString('#000000'); + } + } + if (window.cordova && window.cordova.plugins && window.cordova.plugins.Keyboard && !platformInfo.isWP) { cordova.plugins.Keyboard.hideKeyboardAccessoryBar(false); cordova.plugins.Keyboard.disableScroll(true); From f03560312bcd6750dc65b6c18190ba8f41e382c4 Mon Sep 17 00:00:00 2001 From: Sebastiaan Pasma Date: Wed, 16 May 2018 14:09:35 +0200 Subject: [PATCH 08/20] A little more compact --- src/js/routes.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/js/routes.js b/src/js/routes.js index c4431e660..d4d60746c 100644 --- a/src/js/routes.js +++ b/src/js/routes.js @@ -1251,10 +1251,8 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr if (screen.width < 768 && platformInfo.isCordova) screen.lockOrientation('portrait'); - if (window.StatusBar) { - if (ionic.Platform.isAndroid()) { + if (window.StatusBar && ionic.Platform.isAndroid()) { StatusBar.backgroundColorByHexString('#000000'); - } } if (window.cordova && window.cordova.plugins && window.cordova.plugins.Keyboard && !platformInfo.isWP) { From cc94e1c630954970c9a37433282d61689387a2ec Mon Sep 17 00:00:00 2001 From: Sebastiaan Pasma Date: Wed, 16 May 2018 14:22:37 +0200 Subject: [PATCH 09/20] Change back color when moving back from wallet detail view to home screen. --- src/js/controllers/walletDetails.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/js/controllers/walletDetails.js b/src/js/controllers/walletDetails.js index acc0dce79..88ee871ff 100644 --- a/src/js/controllers/walletDetails.js +++ b/src/js/controllers/walletDetails.js @@ -410,8 +410,7 @@ angular.module('copayApp.controllers').controller('walletDetailsController', fun $scope.$on("$ionicView.afterLeave", function(event, data) { $interval.cancel(refreshInterval); if ($window.StatusBar) { - var statusBarColor = appConfigService.name == 'copay' ? '#192c3a' : '#1e3186'; - $window.StatusBar.backgroundColorByHexString(statusBarColor); + $window.StatusBar.backgroundColorByHexString('#000000'); } }); From aa8668b82e4cc79a0373d663d1c7ed77a98fc612 Mon Sep 17 00:00:00 2001 From: Sebastiaan Pasma Date: Wed, 16 May 2018 15:24:25 +0200 Subject: [PATCH 10/20] Improvement - 338 - Allow users to copy the amounts in the Send-screen --- src/sass/views/amount.scss | 7 +++++++ www/views/amount.html | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) 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/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}}
From cdb9b54b5884057e194636bf1150ccedb4e527f3 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Dominguez Date: Thu, 17 May 2018 19:30:06 +0900 Subject: [PATCH 11/20] Fix - 321 - Add the three addresses (legacy+bitpay+bch) in the searchable string --- src/js/controllers/modals/search.js | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/src/js/controllers/modals/search.js b/src/js/controllers/modals/search.js index 58ef3fa24..2187b4353 100644 --- a/src/js/controllers/modals/search.js +++ b/src/js/controllers/modals/search.js @@ -30,13 +30,25 @@ angular.module('copayApp.controllers').controller('searchController', function($ var comment = tx.note ? tx.note.body : ''; var addressTo = tx.addressTo ? tx.addressTo : ''; - if ($scope.wallet.coin === 'bch' && addressTo) { - try { - var addr = bitcoinCashJsService.readAddress(addressTo); - if (addr !== null) addressTo = addressTo + ' bitcoincash:'+addr.cashaddr; - } catch (e) { - $log.debug(addressTo+' not a valid address.. continuing..'); - } + if ($scope.wallet.coin === 'bch') { + + /** + * One tx in JSON + * {"txid":"97ed105ea5042a328b68da43439b4..","action":"received","amount":730216,"fees":392,"time":1525661853,"confirmations":1459,"feePerKb":1074,"outputs":[{"amount":730216,"address":"19zA4aP1sAavtHF2wJcMpi..","message":null}],"message":null,"creatorName":"","hasUnconfirmedInputs":false,"amountStr":"0.00730216 BCH","alternativeAmountStr":"7.95 EUR","feeStr":"0.00000392 BCH","amountValueStr":"0.00730216","amountUnitStr":"BCH","safeConfirmed":"6+","lowAmount":false} + * These two lines should be removed.. because tx.addressTo does not exist. + * The address is in tx.outputs[..].address, cf. the JSON + */ + var addr = bitcoinCashJsService.translateAddresses(addressTo); + addressTo = addr.legacy + addr.bitpay + 'bitcoincash:' + addr.cashaddr + + /** + * For each address (normally only one) + * 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 : ''; From f7e090cd20cedec77b76de020960fb08b206478e Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Dominguez Date: Thu, 17 May 2018 19:37:18 +0900 Subject: [PATCH 12/20] Fix - 321 - Forgot a condition to check the translation --- src/js/controllers/modals/search.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/js/controllers/modals/search.js b/src/js/controllers/modals/search.js index 2187b4353..b6b0c3163 100644 --- a/src/js/controllers/modals/search.js +++ b/src/js/controllers/modals/search.js @@ -38,8 +38,10 @@ angular.module('copayApp.controllers').controller('searchController', function($ * These two lines should be removed.. because tx.addressTo does not exist. * The address is in tx.outputs[..].address, cf. the JSON */ - var addr = bitcoinCashJsService.translateAddresses(addressTo); - addressTo = addr.legacy + addr.bitpay + 'bitcoincash:' + addr.cashaddr + if (addressTo) { + var addr = bitcoinCashJsService.translateAddresses(addressTo); + addressTo = addr.legacy + addr.bitpay + 'bitcoincash:' + addr.cashaddr + } /** * For each address (normally only one) From 01b1c6753fc17b2412bc110a8a29150ff2cc21a6 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Dominguez Date: Thu, 17 May 2018 20:16:41 +0900 Subject: [PATCH 13/20] Fix - 321 - Keep only the fetching in the outputs --- src/js/controllers/modals/search.js | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/src/js/controllers/modals/search.js b/src/js/controllers/modals/search.js index b6b0c3163..cd5399a02 100644 --- a/src/js/controllers/modals/search.js +++ b/src/js/controllers/modals/search.js @@ -33,18 +33,7 @@ angular.module('copayApp.controllers').controller('searchController', function($ if ($scope.wallet.coin === 'bch') { /** - * One tx in JSON - * {"txid":"97ed105ea5042a328b68da43439b4..","action":"received","amount":730216,"fees":392,"time":1525661853,"confirmations":1459,"feePerKb":1074,"outputs":[{"amount":730216,"address":"19zA4aP1sAavtHF2wJcMpi..","message":null}],"message":null,"creatorName":"","hasUnconfirmedInputs":false,"amountStr":"0.00730216 BCH","alternativeAmountStr":"7.95 EUR","feeStr":"0.00000392 BCH","amountValueStr":"0.00730216","amountUnitStr":"BCH","safeConfirmed":"6+","lowAmount":false} - * These two lines should be removed.. because tx.addressTo does not exist. - * The address is in tx.outputs[..].address, cf. the JSON - */ - if (addressTo) { - var addr = bitcoinCashJsService.translateAddresses(addressTo); - addressTo = addr.legacy + addr.bitpay + 'bitcoincash:' + addr.cashaddr - } - - /** - * For each address (normally only one) + * 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) { From cba937eebc8fba591d8fd014fe4d277a24b8e5d2 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Dominguez Date: Fri, 18 May 2018 11:50:58 +0900 Subject: [PATCH 14/20] Fix - 322 - *lengh* -> *length* --- src/js/controllers/modals/search.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/js/controllers/modals/search.js b/src/js/controllers/modals/search.js index 082ef52cc..17b759226 100644 --- a/src/js/controllers/modals/search.js +++ b/src/js/controllers/modals/search.js @@ -57,7 +57,7 @@ angular.module('copayApp.controllers').controller('searchController', function($ $scope.searchTermIsAddress = true; } else if ((search[0] === "1" || search[0] === "3" || search.substring(0, 3) === "bc1") && search.length >= 26 && search.length <= 35) { // Legacy Addresses $scope.searchTermIsAddress = true; - } else if (search.lengh === 64) { + } else if (search.length === 64) { $scope.searchTermIsTxId = true; } } From 09566af448ef075a52880fe2ace869a6b2baa2df Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Dominguez Date: Fri, 18 May 2018 14:21:38 +0900 Subject: [PATCH 15/20] Fix - 322 - Fix >= -> === --- src/js/controllers/modals/search.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/js/controllers/modals/search.js b/src/js/controllers/modals/search.js index 17b759226..6612da6e8 100644 --- a/src/js/controllers/modals/search.js +++ b/src/js/controllers/modals/search.js @@ -53,7 +53,7 @@ angular.module('copayApp.controllers').controller('searchController', function($ }); if (search) { - if ((search.indexOf('bitcoincash:') >= 0 || search[0] === 'C' || search[0] === 'H' || search[0] === 'p' || search[0] === 'q') && search.replace('bitcoincash:', '').length === 42) { // CashAddr + if ((search.indexOf('bitcoincash:') === 0 || search[0] === 'C' || search[0] === 'H' || search[0] === 'p' || search[0] === 'q') && search.replace('bitcoincash:', '').length === 42) { // CashAddr $scope.searchTermIsAddress = true; } else if ((search[0] === "1" || search[0] === "3" || search.substring(0, 3) === "bc1") && search.length >= 26 && search.length <= 35) { // Legacy Addresses $scope.searchTermIsAddress = true; @@ -91,12 +91,12 @@ angular.module('copayApp.controllers').controller('searchController', function($ }; $scope.searchOnBlockchain = function(searchTerm) { - var url = 'https://explorer.bitcoin.com/'+$scope.wallet.coin+'/search/' + searchTerm; - var optIn = true; - var title = null; - var message = gettextCatalog.getString('Search on Explorer.Bitcoin.com'); - var okText = gettextCatalog.getString('Open Explorer'); - var cancelText = gettextCatalog.getString('Go Back'); + const url = 'https://explorer.bitcoin.com/'+$scope.wallet.coin+'/search/' + searchTerm; + const optIn = true; + const title = null; + const message = gettextCatalog.getString('Search on Explorer.Bitcoin.com'); + const okText = gettextCatalog.getString('Open Explorer'); + const cancelText = gettextCatalog.getString('Go Back'); externalLinkService.open(url, optIn, title, message, okText, cancelText); }; From 90ef40d5238e7161598b86539015679728937054 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Dominguez Date: Mon, 21 May 2018 12:31:59 +0900 Subject: [PATCH 16/20] Fix - 344 - Add comma like first character --- src/js/controllers/amount.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/js/controllers/amount.js b/src/js/controllers/amount.js index 2d0a5aa28..ce09a4137 100644 --- a/src/js/controllers/amount.js +++ b/src/js/controllers/amount.js @@ -307,12 +307,18 @@ angular.module('copayApp.controllers').controller('amountController', function($ } if ($scope.amountModel.amount && $scope.amountModel.amount.length >= LENGTH_EXPRESSION_LIMIT) return; - if (($scope.amountModel.amount.indexOf('.') > -1 || $scope.amountModel.amount == '') && digit == '.') return; + if ($scope.amountModel.amount.indexOf('.') > -1 && digit == '.') return; if ($scope.amountModel.amount == '0' && digit == '0') return; if (availableUnits[unitIndex].isFiat && $scope.amountModel.amount.indexOf('.') > -1 && $scope.amountModel.amount[$scope.amountModel.amount.indexOf('.') + 2]) return; - if ($scope.amountModel.amount == '0' && digit != '.') { $scope.amountModel.amount = ''} - + if ($scope.amountModel.amount == '0' && digit != '.') { + $scope.amountModel.amount = ''; + } + + if ($scope.amountModel.amount == '' && digit == '.') { + $scope.amountModel.amount = '0'; + } + $scope.amountModel.amount = ($scope.amountModel.amount + digit).replace('..', '.'); checkFontSize(); $scope.processAmount(); From d8950ead7311049a1cd204890f3123d68cc1e7b0 Mon Sep 17 00:00:00 2001 From: Sam Cheng Hung Date: Mon, 21 May 2018 12:52:44 +0800 Subject: [PATCH 17/20] Update: Adds resolution strategy for android support library version number --- src/android/build-extras.gradle | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/src/android/build-extras.gradle b/src/android/build-extras.gradle index ff317a4df..f548f23f1 100644 --- a/src/android/build-extras.gradle +++ b/src/android/build-extras.gradle @@ -1,20 +1,21 @@ configurations.all { resolutionStrategy { - force "com.google.android.gms:play-services-auth:11.8.0" - force "com.google.android.gms:play-services-identity:11.8.0" - force "com.google.android.gms:play-services-ads:11.8.0" - force "com.google.android.gms:play-services-base:11.8.0" - force "com.google.android.gms:play-services-gcm:11.8.0" - force "com.google.android.gms:play-services-analytics:11.8.0" - force "com.google.android.gms:play-services-location:11.8.0" - force "com.google.android.gms:play-services-basement:11.8.0" - force "com.google.android.gms:play-services-tagmanager:11.8.0" - force 'com.google.firebase:firebase-core:11.8.0' - force 'com.google.firebase:firebase-crash:11.8.0' - force 'com.google.firebase:firebase-auth:11.8.0' - force 'com.google.firebase:firebase-common:11.8.0' - force 'com.google.firebase:firebase-config:11.8.0' - force 'com.google.firebase:firebase-perf:11.8.0' - force 'com.google.firebase:firebase-messaging:11.8.0' + force "com.android.support:support-v4:26.1.0" + force "com.google.android.gms:play-services-auth:11.8.0" + force "com.google.android.gms:play-services-identity:11.8.0" + force "com.google.android.gms:play-services-ads:11.8.0" + force "com.google.android.gms:play-services-base:11.8.0" + force "com.google.android.gms:play-services-gcm:11.8.0" + force "com.google.android.gms:play-services-analytics:11.8.0" + force "com.google.android.gms:play-services-location:11.8.0" + force "com.google.android.gms:play-services-basement:11.8.0" + force "com.google.android.gms:play-services-tagmanager:11.8.0" + force 'com.google.firebase:firebase-core:11.8.0' + force 'com.google.firebase:firebase-crash:11.8.0' + force 'com.google.firebase:firebase-auth:11.8.0' + force 'com.google.firebase:firebase-common:11.8.0' + force 'com.google.firebase:firebase-config:11.8.0' + force 'com.google.firebase:firebase-perf:11.8.0' + force 'com.google.firebase:firebase-messaging:11.8.0' } } \ No newline at end of file From 2e92a74acef92fbcda15b37d0b6f3b5320296d17 Mon Sep 17 00:00:00 2001 From: Sam Cheng Hung Date: Mon, 21 May 2018 12:56:33 +0800 Subject: [PATCH 18/20] Fix tabs --- src/android/build-extras.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/android/build-extras.gradle b/src/android/build-extras.gradle index f548f23f1..dcc6df0ad 100644 --- a/src/android/build-extras.gradle +++ b/src/android/build-extras.gradle @@ -1,5 +1,5 @@ configurations.all { - resolutionStrategy { + resolutionStrategy { force "com.android.support:support-v4:26.1.0" force "com.google.android.gms:play-services-auth:11.8.0" force "com.google.android.gms:play-services-identity:11.8.0" @@ -17,5 +17,5 @@ configurations.all { force 'com.google.firebase:firebase-config:11.8.0' force 'com.google.firebase:firebase-perf:11.8.0' force 'com.google.firebase:firebase-messaging:11.8.0' - } + } } \ No newline at end of file From 630dadda4812f4618303063a52f7348ece98a310 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Dominguez Date: Mon, 21 May 2018 16:24:25 +0900 Subject: [PATCH 19/20] Fix - 337 - Consistent StatusBar --- src/js/routes.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/js/routes.js b/src/js/routes.js index d4d60746c..b78beffc6 100644 --- a/src/js/routes.js +++ b/src/js/routes.js @@ -1251,8 +1251,8 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr if (screen.width < 768 && platformInfo.isCordova) screen.lockOrientation('portrait'); - if (window.StatusBar && ionic.Platform.isAndroid()) { - StatusBar.backgroundColorByHexString('#000000'); + if (StatusBar && ionic.Platform.isAndroid()) { + StatusBar.backgroundColorByHexString('#000000'); } if (window.cordova && window.cordova.plugins && window.cordova.plugins.Keyboard && !platformInfo.isWP) { From a2e1bd3a1ebf604b5221267f9e0f71cf2b00faf0 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Dominguez Date: Mon, 21 May 2018 23:01:29 +0900 Subject: [PATCH 20/20] Fix - 337 - Fix error for browser version --- src/js/routes.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/js/routes.js b/src/js/routes.js index b78beffc6..395a356bd 100644 --- a/src/js/routes.js +++ b/src/js/routes.js @@ -1251,7 +1251,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr if (screen.width < 768 && platformInfo.isCordova) screen.lockOrientation('portrait'); - if (StatusBar && ionic.Platform.isAndroid()) { + if (ionic.Platform.isAndroid() && StatusBar) { StatusBar.backgroundColorByHexString('#000000'); }