diff --git a/i18n/po/template.pot b/i18n/po/template.pot index 060a35ff7..7caae0168 100644 --- a/i18n/po/template.pot +++ b/i18n/po/template.pot @@ -2648,7 +2648,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/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(); diff --git a/src/js/controllers/walletSelectorController.js b/src/js/controllers/walletSelectorController.js index 7a7c5a463..777871e44 100644 --- a/src/js/controllers/walletSelectorController.js +++ b/src/js/controllers/walletSelectorController.js @@ -25,11 +25,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 ($scope.params.fromWalletId && !$scope.params.thirdParty) { - $scope.sendFlowTitle = gettextCatalog.getString('Wallet to Wallet Transfer'); + $scope.sendFlowTitle = gettextCatalog.getString('Transfer between wallets'); } break; default: 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) { 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 @@