From f9f852211970d6d39786eb968d476b219ede09a2 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Dominguez Date: Wed, 6 Jun 2018 17:56:50 +0900 Subject: [PATCH 01/29] Increment version --- app-template/bitcoincom/appConfig.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app-template/bitcoincom/appConfig.json b/app-template/bitcoincom/appConfig.json index 41c2789c8..2c9f4308e 100644 --- a/app-template/bitcoincom/appConfig.json +++ b/app-template/bitcoincom/appConfig.json @@ -24,9 +24,9 @@ "windowsAppId": "804636ee-b017-4cad-8719-e58ac97ffa5c", "pushSenderId": "1036948132229", "description": "A Secure Bitcoin Wallet", - "version": "4.11.0", - "fullVersion": "4.11-rc1", - "androidVersion": "411000", + "version": "4.11.1", + "fullVersion": "4.11-hotfix1", + "androidVersion": "411100", "_extraCSS": "", "_enabledExtensions": { "coinbase": false, From e21592dec8c05a5ef3f86bbe854af4584be8db79 Mon Sep 17 00:00:00 2001 From: Brendon Duncan Date: Thu, 2 Aug 2018 20:43:18 +1200 Subject: [PATCH 02/29] UI for crypto fee. --- src/js/controllers/review.controller.js | 39 +++++++++++++++++++++++-- www/views/review.html | 7 ++--- 2 files changed, 38 insertions(+), 8 deletions(-) diff --git a/src/js/controllers/review.controller.js b/src/js/controllers/review.controller.js index b81645488..f42d25350 100644 --- a/src/js/controllers/review.controller.js +++ b/src/js/controllers/review.controller.js @@ -4,7 +4,7 @@ angular .module('copayApp.controllers') .controller('reviewController', reviewController); -function reviewController(addressbookService, configService, profileService, $log, $scope, txFormatService) { +function reviewController(addressbookService, configService, $ionicConfig, $log, profileService, $scope, txFormatService) { var vm = this; vm.destination = { @@ -18,7 +18,14 @@ function reviewController(addressbookService, configService, profileService, $lo kind: '', // 'address', 'contact', 'wallet' name: '' }; - vm.feeCrypto = ''; + vm.fee = { + cryptoAmount: '', + cryptoCurrencyCode: '', + cryptoDescription: '', + fiatAmount: '', + fiatCurrency: '' + }; + vm.fee vm.feeFiat = ''; vm.origin = { balanceAmount: '', @@ -34,6 +41,7 @@ function reviewController(addressbookService, configService, profileService, $lo vm.secondaryCurrency = ''; var config = null; + var configFeeLevel = ''; var coin = ''; var originWalletId = ''; var priceDisplayIsFiat = true; @@ -43,11 +51,25 @@ function reviewController(addressbookService, configService, profileService, $lo $scope.$on("$ionicView.beforeEnter", onBeforeEnter); + $scope.$on("$ionicView.beforeLeave", onBeforeLeave); + $scope.$on("$ionicView.enter", onEnter); + function onBeforeEnter(event, data) { + // Dummy values for testing + vm.fee = { + cryptoAmount: '0.00195823', + cryptoCurrencyCode: 'BCH', + cryptoDescription: 'Less than 1 cent', + fiatAmount: '', + fiatCurrency: '' + }; + originWalletId = data.stateParams.fromWalletId; + // For testing only + //originWalletId = data.stateParams.fromWalletId || 'bf00af8f-0788-4b57-b30a-0390747407e9'; satoshis = parseInt(data.stateParams.amount, 10); toAddress = data.stateParams.toAddr; @@ -65,12 +87,23 @@ function reviewController(addressbookService, configService, profileService, $lo priceDisplayIsFiat = config.wallet.settings.priceDisplay === 'fiat'; vm.origin.currencyColor = originWallet.coin === 'btc' ? config.bitcoinWalletColor : config.bitcoinCashWalletColor; } + + configFeeLevel = config.wallet.settings.feeLevel ? config.wallet.settings.feeLevel : 'normal'; + updateSendAmounts(); getOriginWalletBalance(originWallet); handleDestinationAsAddress(toAddress, coin); handleDestinationAsWallet(data.stateParams.toWalletId); }); - } + } + + function onBeforeLeave(event, data) { + $ionicConfig.views.swipeBackEnabled(true); + } + + function onEnter(event, data) { + $ionicConfig.views.swipeBackEnabled(false); + }; function getOriginWalletBalance(originWallet) { var balanceText = getWalletBalanceDisplayText(originWallet); diff --git a/www/views/review.html b/www/views/review.html index 36bb67410..f8b44c19a 100644 --- a/www/views/review.html +++ b/www/views/review.html @@ -73,11 +73,8 @@
Fee: Less than 1 cent
-
- +
+ {{vm.fee.cryptoAmount}} {{vm.fee.cryptoCurrencyCode}}
From 85a74bbd0e2f292035f471c591fc5cd3c5f1494c Mon Sep 17 00:00:00 2001 From: Brendon Duncan Date: Thu, 2 Aug 2018 21:11:28 +1200 Subject: [PATCH 03/29] UI for crypto fee warning. --- src/js/controllers/review.controller.js | 10 ++++++---- www/views/review.html | 4 +++- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/js/controllers/review.controller.js b/src/js/controllers/review.controller.js index f42d25350..5bf032fbd 100644 --- a/src/js/controllers/review.controller.js +++ b/src/js/controllers/review.controller.js @@ -21,9 +21,10 @@ function reviewController(addressbookService, configService, $ionicConfig, $log, vm.fee = { cryptoAmount: '', cryptoCurrencyCode: '', - cryptoDescription: '', + description: '', fiatAmount: '', - fiatCurrency: '' + fiatCurrency: '', + high: false }; vm.fee vm.feeFiat = ''; @@ -62,9 +63,10 @@ function reviewController(addressbookService, configService, $ionicConfig, $log, vm.fee = { cryptoAmount: '0.00195823', cryptoCurrencyCode: 'BCH', - cryptoDescription: 'Less than 1 cent', + description: 'Less than 1 cent', fiatAmount: '', - fiatCurrency: '' + fiatCurrency: '', + high: false }; originWalletId = data.stateParams.fromWalletId; diff --git a/www/views/review.html b/www/views/review.html index f8b44c19a..20cb2bd2d 100644 --- a/www/views/review.html +++ b/www/views/review.html @@ -72,7 +72,9 @@
-
Fee: Less than 1 cent
+
+ Fee: {{vm.fee.description}}{{vm.fee.fiatAmount}} {{vm.fee.fiatCurrency}} +
{{vm.fee.cryptoAmount}} {{vm.fee.cryptoCurrencyCode}}
From 9c999d0cd6754e81bf06fda79e492dd1e7606815 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Dominguez Date: Mon, 13 Aug 2018 15:35:26 +0900 Subject: [PATCH 04/29] Update appConfig.json --- app-template/bitcoincom/appConfig.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app-template/bitcoincom/appConfig.json b/app-template/bitcoincom/appConfig.json index 084a586ce..4b3281f6e 100644 --- a/app-template/bitcoincom/appConfig.json +++ b/app-template/bitcoincom/appConfig.json @@ -24,9 +24,9 @@ "windowsAppId": "804636ee-b017-4cad-8719-e58ac97ffa5c", "pushSenderId": "1036948132229", "description": "A Secure Bitcoin Wallet", - "version": "4.13.2", - "fullVersion": "4.13-rc3", - "androidVersion": "413200", + "version": "5.0.0", + "fullVersion": "5.0-rc1", + "androidVersion": "500000", "_extraCSS": "", "_enabledExtensions": { "coinbase": false, From 5123ba90070fb8e66c75a8c89cc0e1a8534c16b8 Mon Sep 17 00:00:00 2001 From: Sebastiaan Pasma Date: Mon, 13 Aug 2018 15:33:48 +0200 Subject: [PATCH 05/29] template.pot fix --- i18n/po/template.pot | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/i18n/po/template.pot b/i18n/po/template.pot index 277be03bb..40d9ba501 100644 --- a/i18n/po/template.pot +++ b/i18n/po/template.pot @@ -3808,7 +3808,7 @@ msgid "Your Bitcoin Wallets are ready!" msgstr "" #: src/js/controllers/amount.js:49 -msgid "Address doesn\'t contain currency information, please make sure you are sending the correct currency." +msgid "Address doesn't contain currency information, please make sure you are sending the correct currency." msgstr "" #: www/views/review.html:4 From 587971724e3ed12a48c0d7b38381c50e0bc31520 Mon Sep 17 00:00:00 2001 From: Sebastiaan Pasma Date: Mon, 13 Aug 2018 16:52:00 +0200 Subject: [PATCH 06/29] template.pot change --- i18n/po/template.pot | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/i18n/po/template.pot b/i18n/po/template.pot index 40d9ba501..060a35ff7 100644 --- a/i18n/po/template.pot +++ b/i18n/po/template.pot @@ -3808,7 +3808,7 @@ msgid "Your Bitcoin Wallets are ready!" msgstr "" #: src/js/controllers/amount.js:49 -msgid "Address doesn't contain currency information, please make sure you are sending the correct currency." +msgid "Address does not contain currency information, please make sure you are sending the correct currency." msgstr "" #: www/views/review.html:4 From 947c2d324f4103c34a0f7a03e2f3f642b1c746ac Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Dominguez Date: Tue, 14 Aug 2018 11:38:24 +0900 Subject: [PATCH 07/29] Upgrade text --- i18n/po/template.pot | 2 +- src/js/controllers/walletSelectorController.js | 4 ++-- www/views/tab-send.html | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/i18n/po/template.pot b/i18n/po/template.pot index d8281988f..725aa3de7 100644 --- a/i18n/po/template.pot +++ b/i18n/po/template.pot @@ -2631,7 +2631,7 @@ msgid "Paste Address" msgstr "" #: www/views/tab-send.html:27 -msgid "Wallet to Wallet Transfer" +msgid "Transfer between wallets" msgstr "" #: www/views/tab-send.html:35 diff --git a/src/js/controllers/walletSelectorController.js b/src/js/controllers/walletSelectorController.js index a4ff3ab3e..42506dace 100644 --- a/src/js/controllers/walletSelectorController.js +++ b/src/js/controllers/walletSelectorController.js @@ -15,11 +15,11 @@ angular.module('copayApp.controllers').controller('walletSelectorController', fu switch($state.current.name) { case 'tabs.send.wallet-to-wallet': - $scope.sendFlowTitle = gettextCatalog.getString('Wallet to Wallet Transfer'); + $scope.sendFlowTitle = gettextCatalog.getString('Transfer between wallets'); break; case 'tabs.send.destination': if (data.stateParams.fromWalletId) { - $scope.sendFlowTitle = gettextCatalog.getString('Wallet to Wallet Transfer'); + $scope.sendFlowTitle = gettextCatalog.getString('Transfer between wallets'); } break; default: diff --git a/www/views/tab-send.html b/www/views/tab-send.html index 20198c7f0..8f1fc1a93 100644 --- a/www/views/tab-send.html +++ b/www/views/tab-send.html @@ -24,7 +24,7 @@
From cf6658c83afa08e8028656e937640b66e79b50b7 Mon Sep 17 00:00:00 2001 From: Brendon Duncan Date: Tue, 14 Aug 2018 14:48:07 +1200 Subject: [PATCH 08/29] Removed $apply() inside $watch. --- src/js/directives/formattedAmount.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/js/directives/formattedAmount.js b/src/js/directives/formattedAmount.js index f81615593..5ee9be050 100644 --- a/src/js/directives/formattedAmount.js +++ b/src/js/directives/formattedAmount.js @@ -165,7 +165,6 @@ break; } $scope.canShow = true; - $scope.$apply(); }; function getDecimalPlaces(currency) { From 05e204dec897f87c222c5e977f793fb0779c3c64 Mon Sep 17 00:00:00 2001 From: Brendon Duncan Date: Tue, 14 Aug 2018 16:58:13 +1200 Subject: [PATCH 09/29] Changed the review controller to allow the transaction to be shared, once successful. --- src/js/controllers/review.controller.js | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/src/js/controllers/review.controller.js b/src/js/controllers/review.controller.js index c1f120241..788368e9e 100644 --- a/src/js/controllers/review.controller.js +++ b/src/js/controllers/review.controller.js @@ -4,7 +4,7 @@ angular .module('copayApp.controllers') .controller('reviewController', reviewController); -function reviewController(addressbookService, bitcoinCashJsService, bitcore, bitcoreCash, bwcError, configService, feeService, gettextCatalog, $interval, $ionicHistory, $ionicModal, lodash, $log, ongoingProcess, platformInfo, popupService, profileService, $scope, sendFlowService, shapeshiftService, soundService, $state, $timeout, txConfirmNotification, txFormatService, walletService) { +function reviewController(addressbookService, bitcoinCashJsService, bitcore, bitcoreCash, bwcError, clipboardService, configService, feeService, gettextCatalog, $interval, $ionicHistory, $ionicModal, ionicToast, lodash, $log, ongoingProcess, platformInfo, popupService, profileService, $scope, sendFlowService, shapeshiftService, soundService, $state, $timeout, txConfirmNotification, txFormatService, walletService) { var vm = this; vm.buttonText = ''; @@ -52,6 +52,7 @@ function reviewController(addressbookService, bitcoinCashJsService, bitcore, bit // Functions vm.goBack = goBack; vm.onSuccessConfirm = onSuccessConfirm; + vm.onShareTransaction = onShareTransaction; var sendFlowData; var config = null; @@ -62,6 +63,7 @@ function reviewController(addressbookService, bitcoinCashJsService, bitcore, bit var usingCustomFee = false; var usingMerchantFee = false; var destinationWalletId = ''; + var lastTxId = ''; var originWalletId = ''; var priceDisplayIsFiat = true; var satoshis = null; @@ -156,6 +158,7 @@ function reviewController(addressbookService, bitcoinCashJsService, bitcore, bit txConfirmNotification.subscribe(vm.originWallet, { txid: txp.txid }); + lastTxId = txp.txid; } }, statusChangeHandler); }; @@ -522,6 +525,21 @@ function reviewController(addressbookService, bitcoinCashJsService, bitcore, bit } } + function onShareTransaction() { + var explorerTxUrl = 'https://explorer.bitcoin.com/' + tx.coin + '/tx/' + lastTxId; + if (platformInfo.isCordova) { + var text = gettextCatalog.getString('Take a look at this Bitcoin Cash transaction here: ') + explorerTxUrl; + if (coin === 'btc') { + text = gettextCatalog.getString('Take a look at this Bitcoin transaction here: ') + explorerTxUrl; + } + window.plugins.socialsharing.share(text, null, null, null); + } else { + ionicToast.show(gettextCatalog.getString('Copied to clipboard'), 'bottom', false, 3000); + clipboardService.copyToClipboard(explorerTxUrl); + } + + } + function startExpirationTimer(expirationTime) { vm.paymentExpired = false; setExpirationTime(); From 197ee9eeeb49e216192b4dab37261a7929bf796b Mon Sep 17 00:00:00 2001 From: Brendon Duncan Date: Tue, 14 Aug 2018 17:24:17 +1200 Subject: [PATCH 10/29] Fix for the Custom Amount screen now following the price display setting. --- www/views/customAmount.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/www/views/customAmount.html b/www/views/customAmount.html index a7130a729..079a5543d 100644 --- a/www/views/customAmount.html +++ b/www/views/customAmount.html @@ -31,13 +31,13 @@

-
+
-
+
From f18546b8d639f383d81c59df6a91e67388c06056 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Dominguez Date: Tue, 14 Aug 2018 16:48:55 +0900 Subject: [PATCH 11/29] Update appConfig.json --- app-template/bitcoincom/appConfig.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app-template/bitcoincom/appConfig.json b/app-template/bitcoincom/appConfig.json index 084a586ce..4b3281f6e 100644 --- a/app-template/bitcoincom/appConfig.json +++ b/app-template/bitcoincom/appConfig.json @@ -24,9 +24,9 @@ "windowsAppId": "804636ee-b017-4cad-8719-e58ac97ffa5c", "pushSenderId": "1036948132229", "description": "A Secure Bitcoin Wallet", - "version": "4.13.2", - "fullVersion": "4.13-rc3", - "androidVersion": "413200", + "version": "5.0.0", + "fullVersion": "5.0-rc1", + "androidVersion": "500000", "_extraCSS": "", "_enabledExtensions": { "coinbase": false, From 5a5d31d45dabd4f05b1280e89df43bd06fefd456 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Dominguez Date: Tue, 14 Aug 2018 17:13:44 +0900 Subject: [PATCH 12/29] Fix for building android release --- app-template/package-template.json | 2 +- src/android/build-extras.gradle | 42 ++++++++++++++++-------------- 2 files changed, 24 insertions(+), 20 deletions(-) diff --git a/app-template/package-template.json b/app-template/package-template.json index 232ac7e1f..0aa5da5dc 100644 --- a/app-template/package-template.json +++ b/app-template/package-template.json @@ -119,7 +119,7 @@ "run:android": "cordova run android --device", "run:android-release": "cordova run android --device --release", "log:android": "adb logcat | grep chromium", - "sign:android": "rm -f platforms/android/build/outputs/apk/android-release-signed-aligned.apk; jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore ../bitcoin-com-release-key.jks -signedjar platforms/android/build/outputs/apk/android-release-signed.apk platforms/android/build/outputs/apk/android-release-unsigned.apk bitcoin-com && $ANDROID_HOME/build-tools/27.0.1/zipalign -v 4 platforms/android/build/outputs/apk/android-release-signed.apk platforms/android/build/outputs/apk/android-release-signed-aligned.apk", + "sign:android": "rm -f platforms/android/build/outputs/apk/android-release-signed-aligned.apk; jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore ../bitcoin-com-release-key.jks -signedjar platforms/android/build/outputs/apk/android-release-signed.apk platforms/android/build/outputs/apk/android-release-unsigned.apk bitcoin-com && zipalign -v 4 platforms/android/build/outputs/apk/android-release-signed.apk platforms/android/build/outputs/apk/android-release-signed-aligned.apk", "apply:copay": "npm i fs-extra && cd app-template && node apply.js copay && npm i && cordova prepare", "apply:bitpay": "npm i fs-extra && cd app-template && node apply.js bitpay && npm i && cordova prepare", "apply:bitcoincom": "npm i fs-extra && cd app-template && node apply.js bitcoincom && npm i && cordova prepare", diff --git a/src/android/build-extras.gradle b/src/android/build-extras.gradle index dcc6df0ad..e7dd50572 100644 --- a/src/android/build-extras.gradle +++ b/src/android/build-extras.gradle @@ -1,21 +1,25 @@ +ext { + ANDROID_SUPPORT_V4_VERSION = '26.1.0' +} + configurations.all { - 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" - 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' - } + 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" + 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 abe71a80772753219df9ef4bbe4151d1122fc5f8 Mon Sep 17 00:00:00 2001 From: Sebastiaan Pasma Date: Tue, 14 Aug 2018 10:27:27 +0200 Subject: [PATCH 13/29] typo in template.pot --- i18n/po/template.pot | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/i18n/po/template.pot b/i18n/po/template.pot index 7caae0168..9c0e3bdc6 100644 --- a/i18n/po/template.pot +++ b/i18n/po/template.pot @@ -3160,7 +3160,7 @@ msgid "To start the process you need to add funds to your wallet." msgstr "" #: www/views/shapeshift.html:30 -msgid "he process is fast and you will receive the exchanged amount in your wallet." +msgid "The process is fast and you will receive the exchanged amount in your wallet." msgstr "" #: www/views/shapeshift.html:34 From 448679d1a619ddf5c07bc9a0c4d5a7cd5507efc4 Mon Sep 17 00:00:00 2001 From: Sebastiaan Pasma Date: Tue, 14 Aug 2018 14:05:22 +0200 Subject: [PATCH 14/29] receive tab not showing fiat amount on receiving amount ("payment received" screen) --- src/js/controllers/tab-receive.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/js/controllers/tab-receive.js b/src/js/controllers/tab-receive.js index 0e80f4382..66d1799f8 100644 --- a/src/js/controllers/tab-receive.js +++ b/src/js/controllers/tab-receive.js @@ -138,7 +138,9 @@ angular.module('copayApp.controllers').controller('tabReceiveController', functi $scope.paymentReceivedAlternativeAmount = ''; // For when a subsequent payment is received. txFormatService.formatAlternativeStr($scope.wallet.coin, data.x.out[i].value, function(alternativeStr){ if (alternativeStr) { - $scope.paymentReceivedAlternativeAmount = alternativeStr; + $scope.$apply(function () { + $scope.paymentReceivedAlternativeAmount = alternativeStr; + }); } }); } From 99d8de02da698a0aa14434c1b4aa938dd2acb404 Mon Sep 17 00:00:00 2001 From: Sebastiaan Pasma Date: Tue, 14 Aug 2018 15:53:18 +0200 Subject: [PATCH 15/29] Show pasted address instead of always cashaddr format on bch --- src/js/controllers/amount.js | 1 + src/js/controllers/review.controller.js | 9 +++++---- src/js/services/incomingData.js | 5 +++-- src/js/services/sendFlowService.js | 2 ++ src/sass/components/address-frame.scss | 4 ++-- www/views/review.html | 7 ++++++- 6 files changed, 19 insertions(+), 9 deletions(-) diff --git a/src/js/controllers/amount.js b/src/js/controllers/amount.js index c2dcc6cd4..f796f9559 100644 --- a/src/js/controllers/amount.js +++ b/src/js/controllers/amount.js @@ -456,6 +456,7 @@ function amountController(configService, $filter, gettextCatalog, $ionicHistory, var confirmData = { amount: useSendMax ? undefined : satoshis, + displayAddress: passthroughParams.displayAddress, fromWalletId: passthroughParams.fromWalletId, sendMax: useSendMax, toAddress: passthroughParams.toAddress, diff --git a/src/js/controllers/review.controller.js b/src/js/controllers/review.controller.js index 788368e9e..b377bef58 100644 --- a/src/js/controllers/review.controller.js +++ b/src/js/controllers/review.controller.js @@ -19,6 +19,7 @@ function reviewController(addressbookService, bitcoinCashJsService, bitcore, bit kind: '', // 'address', 'contact', 'wallet' name: '' }; + vm.displayAddress = ''; vm.feeCrypto = ''; vm.feeFiat = ''; vm.fiatCurrency = ''; @@ -56,10 +57,9 @@ function reviewController(addressbookService, bitcoinCashJsService, bitcore, bit var sendFlowData; var config = null; - var countDown = null; - var defaults = {}; var coin = ''; var countDown = null; + var defaults = {}; var usingCustomFee = false; var usingMerchantFee = false; var destinationWalletId = ''; @@ -85,7 +85,8 @@ function reviewController(addressbookService, bitcoinCashJsService, bitcore, bit satoshis = parseInt(sendFlowData.amount, 10); toAddress = sendFlowData.toAddress; destinationWalletId = sendFlowData.toWalletId; - + + vm.displayAddress = sendFlowData.displayAddress; vm.originWallet = profileService.getWallet(originWalletId); vm.origin.currency = vm.originWallet.coin.toUpperCase(); coin = vm.originWallet.coin; @@ -104,7 +105,7 @@ function reviewController(addressbookService, bitcoinCashJsService, bitcore, bit priceDisplayIsFiat = config.wallet.settings.priceDisplay === 'fiat'; vm.origin.currencyColor = (vm.originWallet.coin === 'btc' ? defaults.bitcoinWalletColor : defaults.bitcoinCashWalletColor); console.log("coin", vm.originWallet.coin, vm.origin.currencyColor, config.bitcoinWalletColor, vm.originWallet.coin === 'btc'); - unitFromSat = 1 / config.wallet.settings.unitToSatoshi; + unitFromSat = 1 / config.wallet.settings.unitToSatoshi; } updateSendAmounts(); getOriginWalletBalance(vm.originWallet); diff --git a/src/js/services/incomingData.js b/src/js/services/incomingData.js index 9fad8b0f5..0bf708d8a 100644 --- a/src/js/services/incomingData.js +++ b/src/js/services/incomingData.js @@ -11,7 +11,7 @@ angular.module('copayApp.services').factory('incomingData', function($log, $stat root.redir = function(data, serviceId, serviceData) { var originalAddress = null; var noPrefixInAddress = 0; - + if (data.toLowerCase().indexOf('bitcoin') < 0) { noPrefixInAddress = 1; } @@ -83,7 +83,7 @@ angular.module('copayApp.services').factory('incomingData', function($log, $stat // Timeout is required to enable the "Back" button $timeout(function() { var params = sendFlowService.getStateClone(); - + if (amount) { params.amount = amount; } @@ -390,6 +390,7 @@ angular.module('copayApp.services').factory('incomingData', function($log, $stat $timeout(function() { var stateParams = { toAddress: toAddress, + displayAddress: toAddress, coin: coin, noPrefix: 1 }; diff --git a/src/js/services/sendFlowService.js b/src/js/services/sendFlowService.js index fcb061c26..62989b3c5 100644 --- a/src/js/services/sendFlowService.js +++ b/src/js/services/sendFlowService.js @@ -13,6 +13,7 @@ angular // even other properties added that this service does not know about. (such as "coin") state: { amount: '', + displayAddress: null, fromWalletId: '', sendMax: false, thirdParty: null, @@ -42,6 +43,7 @@ angular console.log("sendFlow clearCurrent()"); service.state = { amount: '', + displayAddress: null, fromWalletId: '', sendMax: false, thirdParty: null, diff --git a/src/sass/components/address-frame.scss b/src/sass/components/address-frame.scss index b06ce8bea..8aecce6d6 100644 --- a/src/sass/components/address-frame.scss +++ b/src/sass/components/address-frame.scss @@ -9,8 +9,8 @@ text-overflow: ellipsis; &.expanded { - white-space: pre-wrap; - word-break: break-all; + white-space: normal; + text-overflow: clip; } .prefix { diff --git a/www/views/review.html b/www/views/review.html index 50fcfbcac..a61490a11 100644 --- a/www/views/review.html +++ b/www/views/review.html @@ -57,7 +57,12 @@
- {{vm.destination.address.substring(0,5)}}{{vm.destination.address.substring(5,vm.destination.address.length-4)}}{{vm.destination.address.substring(vm.destination.address.length-4)}} + + {{vm.destination.address.substring(0,5)}}{{vm.destination.address.substring(5,vm.destination.address.length-4)}}{{vm.destination.address.substring(vm.destination.address.length-4)}} + + + {{vm.displayAddress.substring(0,5)}}{{vm.displayAddress.substring(5,vm.displayAddress.length-4)}}{{vm.displayAddress.substring(vm.displayAddress.length-4)}} +
From 8dd573624d6b00adad02822b99451584b4ddc56d Mon Sep 17 00:00:00 2001 From: Brendon Duncan Date: Wed, 15 Aug 2018 12:31:03 +1200 Subject: [PATCH 16/29] View change for previous fix. --- www/views/review.html | 1 + 1 file changed, 1 insertion(+) diff --git a/www/views/review.html b/www/views/review.html index 50fcfbcac..9e2a07d21 100644 --- a/www/views/review.html +++ b/www/views/review.html @@ -111,6 +111,7 @@ Payment Sent Proposal Created From acee3024a9ce0c0bf8bf0f7f1da2431b755ec103 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Dominguez Date: Thu, 16 Aug 2018 17:51:08 +0900 Subject: [PATCH 17/29] Quick fix for asn1 --- app-template/package-template.json | 2 +- fix-asn1.sh | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100755 fix-asn1.sh diff --git a/app-template/package-template.json b/app-template/package-template.json index 0aa5da5dc..dd714d43f 100644 --- a/app-template/package-template.json +++ b/app-template/package-template.json @@ -122,7 +122,7 @@ "sign:android": "rm -f platforms/android/build/outputs/apk/android-release-signed-aligned.apk; jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore ../bitcoin-com-release-key.jks -signedjar platforms/android/build/outputs/apk/android-release-signed.apk platforms/android/build/outputs/apk/android-release-unsigned.apk bitcoin-com && zipalign -v 4 platforms/android/build/outputs/apk/android-release-signed.apk platforms/android/build/outputs/apk/android-release-signed-aligned.apk", "apply:copay": "npm i fs-extra && cd app-template && node apply.js copay && npm i && cordova prepare", "apply:bitpay": "npm i fs-extra && cd app-template && node apply.js bitpay && npm i && cordova prepare", - "apply:bitcoincom": "npm i fs-extra && cd app-template && node apply.js bitcoincom && npm i && cordova prepare", + "apply:bitcoincom": "npm i fs-extra && cd app-template && node apply.js bitcoincom && npm i && cordova prepare && cd ../ && ./fix-asn1.sh", "test": "karma start test/karma.conf.js --single-run", "clean": "trash platforms && trash plugins && cordova prepare", "unstage-package": "git reset package.json", diff --git a/fix-asn1.sh b/fix-asn1.sh new file mode 100755 index 000000000..40c847b3f --- /dev/null +++ b/fix-asn1.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +firstLine=`awk 'NR < 2 {print}' node_modules/asn1.js-rfc5280/index.js` + +if [ "$firstLine" = "try {" ]; then + echo "var asn1 = require('asn1.js');" > node_modules/asn1.js-rfc5280/index.new.js + awk 'NR > 6 {print}' node_modules/asn1.js-rfc5280/index.js >> node_modules/asn1.js-rfc5280/index.new.js + rm node_modules/asn1.js-rfc5280/index.js + mv node_modules/asn1.js-rfc5280/index.new.js node_modules/asn1.js-rfc5280/index.js + echo "[log] node_modules/asn1.js-rfc5280/index.js fixed" +fi \ No newline at end of file From 56be096207f49ee0f94d7a071bdf01bc8081da5d Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Dominguez Date: Thu, 16 Aug 2018 17:51:20 +0900 Subject: [PATCH 18/29] quick fix for asn1 From e6ae1c052054f0c86e0022d969f23cbba41bbe59 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Dominguez Date: Thu, 16 Aug 2018 17:51:59 +0900 Subject: [PATCH 19/29] Add the command in package.json From e8f7126c89f1c1611a34f057e679a0fb5050d8e1 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Dominguez Date: Thu, 16 Aug 2018 17:52:23 +0900 Subject: [PATCH 20/29] package.json From eee1a69d84a7f415552b60405295ecfb9d051504 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Dominguez Date: Thu, 16 Aug 2018 17:54:51 +0900 Subject: [PATCH 21/29] Update package.json --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c1f37b2e6..e1a181308 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ "postinstall": "npm run apply:copay && echo && echo \"Repo configured for standard Copay distribution. To switch to the BitPay distribution, run 'npm run apply:bitpay'.\" && echo", "start": "echo && echo \"Choose a distribution by running 'npm run apply:copay' or 'npm run apply:bitpay'.\" && echo", "apply:copay": "npm i fs-extra@0.30 && cd app-template && node apply.js copay && cd .. && npm i", - "apply:bitcoincom": "npm i fs-extra && cd app-template && node apply.js bitcoincom && npm i && cordova prepare", + "apply:bitcoincom": "npm i fs-extra && cd app-template && node apply.js bitcoincom && npm i && cordova prepare && cd .. && ./fix-asn1.sh", "apply:bitpay": "npm i fs-extra@0.30 && cd app-template && node apply.js bitpay && cd .. && npm i", "unstage-package": "git reset package.json", "clean-all": "git clean -dfx" From aa75ba18d6ad3b8440ffd3f1c6014cd260b8020e Mon Sep 17 00:00:00 2001 From: Brendon Duncan Date: Fri, 17 Aug 2018 11:45:43 +1200 Subject: [PATCH 22/29] Removed old content. --- www/views/shapeshift.html | 97 --------------------------------------- 1 file changed, 97 deletions(-) diff --git a/www/views/shapeshift.html b/www/views/shapeshift.html index 61ad0952e..94a679f7b 100644 --- a/www/views/shapeshift.html +++ b/www/views/shapeshift.html @@ -29,101 +29,4 @@
This service is provided by the third-party ShapeShift, who will charge a small fee for the service. The fee will be shown before you start the transaction.
- - - - - - -
- - - - - -
- - - - - - - - - - - - - - - - - - - From b3e34483b672b0cee628b1a97c56efd59c137021 Mon Sep 17 00:00:00 2001 From: Brendon Duncan Date: Fri, 17 Aug 2018 11:59:27 +1200 Subject: [PATCH 23/29] Show my address button. --- src/js/controllers/shapeshift.js | 17 +++++++++-------- www/views/shapeshift.html | 1 + 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/src/js/controllers/shapeshift.js b/src/js/controllers/shapeshift.js index 3538ebe1a..43e0790d1 100644 --- a/src/js/controllers/shapeshift.js +++ b/src/js/controllers/shapeshift.js @@ -4,6 +4,8 @@ angular.module('copayApp.controllers').controller('shapeshiftController', functi var walletsBtc = []; var walletsBch = []; + $scope.showMyAddress = showMyAddress; + function generateAddress(wallet, cb) { if (!wallet) return; walletService.getAddress(wallet, false, function(err, addr) { @@ -41,14 +43,6 @@ angular.module('copayApp.controllers').controller('shapeshiftController', functi $ionicNavBarDelegate.showBar(true); }); - $scope.showFromWalletSelector = function() { - $scope.showFromWallets = true; - }; - - $scope.showToWalletSelector = function() { - $scope.showToWallets = true; - }; - // This could probably be enhanced refactoring the routes abstract states $scope.createWallet = function() { $state.go('tabs.home').then(function() { @@ -81,4 +75,11 @@ angular.module('copayApp.controllers').controller('shapeshiftController', functi }); }); } + + function showMyAddress() { + $state.go('tabs.home').then(function() { + $state.go('tabs.receive'); + }); + } + }); diff --git a/www/views/shapeshift.html b/www/views/shapeshift.html index 94a679f7b..5d6dd3780 100644 --- a/www/views/shapeshift.html +++ b/www/views/shapeshift.html @@ -23,6 +23,7 @@
To get started, you'll need to create a bitcoin wallet and get some bitcoin.
+
From 26891f6e47f6b15150a6589d9bfdf9326670f1f0 Mon Sep 17 00:00:00 2001 From: Brendon Duncan Date: Fri, 17 Aug 2018 16:54:04 +1200 Subject: [PATCH 24/29] Cleaned up log message. --- fix-asn1.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fix-asn1.sh b/fix-asn1.sh index 40c847b3f..1dbca6a67 100755 --- a/fix-asn1.sh +++ b/fix-asn1.sh @@ -7,5 +7,5 @@ if [ "$firstLine" = "try {" ]; then awk 'NR > 6 {print}' node_modules/asn1.js-rfc5280/index.js >> node_modules/asn1.js-rfc5280/index.new.js rm node_modules/asn1.js-rfc5280/index.js mv node_modules/asn1.js-rfc5280/index.new.js node_modules/asn1.js-rfc5280/index.js - echo "[log] node_modules/asn1.js-rfc5280/index.js fixed" + echo "node_modules/asn1.js-rfc5280/index.js fixed" fi \ No newline at end of file From a67f9acbc6566bd4ebd4428fd4ab02b83b28967a Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Dominguez Date: Sat, 18 Aug 2018 00:51:08 +0900 Subject: [PATCH 25/29] Resolution package --- app-template/package-template.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app-template/package-template.json b/app-template/package-template.json index 232ac7e1f..616658b92 100644 --- a/app-template/package-template.json +++ b/app-template/package-template.json @@ -140,5 +140,9 @@ "lodash": "^4.17.4", "pre-commit": "^1.1.3" }, + "resolutions": { + "angular": "1.5.3", + "ionic": "1b7414faba" + }, "pre-commit": "unstage-package" } \ No newline at end of file From 6dcc221ee12727584d2652c49ce91048f66acaa3 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Dominguez Date: Sat, 18 Aug 2018 01:17:04 +0900 Subject: [PATCH 26/29] ionic resolution --- app-template/package-template.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app-template/package-template.json b/app-template/package-template.json index 8c2bd05d0..660dc81bb 100644 --- a/app-template/package-template.json +++ b/app-template/package-template.json @@ -142,7 +142,7 @@ }, "resolutions": { "angular": "1.5.3", - "ionic": "1b7414faba" + "ionic": "eefba1331b" }, "pre-commit": "unstage-package" } \ No newline at end of file From 154e495846c9387968d66afb2dc942bd6fee25c4 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Dominguez Date: Sat, 18 Aug 2018 01:29:04 +0900 Subject: [PATCH 27/29] Update package.json --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c1f37b2e6..e54e3d14d 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ "postinstall": "npm run apply:copay && echo && echo \"Repo configured for standard Copay distribution. To switch to the BitPay distribution, run 'npm run apply:bitpay'.\" && echo", "start": "echo && echo \"Choose a distribution by running 'npm run apply:copay' or 'npm run apply:bitpay'.\" && echo", "apply:copay": "npm i fs-extra@0.30 && cd app-template && node apply.js copay && cd .. && npm i", - "apply:bitcoincom": "npm i fs-extra && cd app-template && node apply.js bitcoincom && npm i && cordova prepare", + "apply:bitcoincom": "npm i fs-extra && cd app-template && node apply.js bitcoincom && npm i && cordova prepare && cd ../ && ./fix-asn1.sh", "apply:bitpay": "npm i fs-extra@0.30 && cd app-template && node apply.js bitpay && cd .. && npm i", "unstage-package": "git reset package.json", "clean-all": "git clean -dfx" From f4346fd921f0756c0d675addf679d58550f652c8 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Dominguez Date: Sat, 18 Aug 2018 02:02:50 +0900 Subject: [PATCH 28/29] Update bower.json --- bower.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bower.json b/bower.json index 08a82d9b8..d94800d24 100644 --- a/bower.json +++ b/bower.json @@ -24,6 +24,6 @@ }, "resolutions": { "angular": "1.5.3", - "ionic": "1b7414faba" + "ionic": "eefba1331b" } } From d06e9f7088eee701f01caa1279a3c92333807f5b Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Dominguez Date: Sat, 18 Aug 2018 02:03:23 +0900 Subject: [PATCH 29/29] Update package-template.json --- app-template/package-template.json | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/app-template/package-template.json b/app-template/package-template.json index 660dc81bb..c42ef81b4 100644 --- a/app-template/package-template.json +++ b/app-template/package-template.json @@ -140,9 +140,5 @@ "lodash": "^4.17.4", "pre-commit": "^1.1.3" }, - "resolutions": { - "angular": "1.5.3", - "ionic": "eefba1331b" - }, "pre-commit": "unstage-package" -} \ No newline at end of file +}