From 236a93d69d9780b94ec04173d021f7c7806b630c Mon Sep 17 00:00:00 2001 From: Sebastiaan Pasma Date: Mon, 16 Jul 2018 17:21:15 +0200 Subject: [PATCH 01/30] share transaction after sending on mobile + share explorer url on desktop. --- i18n/po/template.pot | 1 + src/js/controllers/confirm.js | 14 ++++++- src/js/directives/slideToAcceptSuccess.js | 11 ++++-- .../views/includes/slideToAcceptSuccess.scss | 38 +++++++++++++------ www/img/icon-share-white.svg | 17 +++++++++ www/views/confirm.html | 1 + www/views/includes/slideToAcceptSuccess.html | 7 +++- 7 files changed, 71 insertions(+), 18 deletions(-) create mode 100644 www/img/icon-share-white.svg diff --git a/i18n/po/template.pot b/i18n/po/template.pot index 66a2e7ca8..2ee53ec78 100644 --- a/i18n/po/template.pot +++ b/i18n/po/template.pot @@ -648,6 +648,7 @@ msgstr "" #: src/js/controllers/copayers.js:79 #: src/js/controllers/export.js:193 +#: src/js/controllers/confirm.js:41 #: www/views/includes/copyToClipboard.html:4 msgid "Copied to clipboard" msgstr "" diff --git a/src/js/controllers/confirm.js b/src/js/controllers/confirm.js index 03af26fd1..c8c889263 100644 --- a/src/js/controllers/confirm.js +++ b/src/js/controllers/confirm.js @@ -1,11 +1,12 @@ 'use strict'; -angular.module('copayApp.controllers').controller('confirmController', function($rootScope, $scope, $interval, $filter, $timeout, $ionicScrollDelegate, gettextCatalog, walletService, platformInfo, lodash, configService, $stateParams, $window, $state, $log, profileService, bitcore, bitcoreCash, txFormatService, ongoingProcess, $ionicModal, popupService, $ionicHistory, $ionicConfig, payproService, feeService, bwcError, txConfirmNotification, externalLinkService, firebaseEventsService, soundService) { +angular.module('copayApp.controllers').controller('confirmController', function($rootScope, $scope, $interval, $filter, $timeout, $ionicScrollDelegate, ionicToast, gettextCatalog, walletService, platformInfo, lodash, configService, $stateParams, $window, $state, $log, profileService, bitcore, bitcoreCash, txFormatService, ongoingProcess, $ionicModal, popupService, $ionicHistory, $ionicConfig, payproService, feeService, bwcError, txConfirmNotification, externalLinkService, firebaseEventsService, soundService, clipboardService) { var countDown = null; var FEE_TOO_HIGH_LIMIT_PER = 15; var tx = {}; + var lastTxId = ""; // Config Related values var config = configService.getSync(); @@ -31,6 +32,16 @@ angular.module('copayApp.controllers').controller('confirmController', function( }, 10); } + $scope.shareTransaction = function() { + var explorerTxUrl = 'https://explorer.bitcoin.com/'+tx.coin+'/tx/'+lastTxId; + if (platformInfo.isCordova) { + var text = '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); + } + }; $scope.showWalletSelector = function() { $scope.walletSelector = true; @@ -612,6 +623,7 @@ angular.module('copayApp.controllers').controller('confirmController', function( txConfirmNotification.subscribe(wallet, { txid: txp.txid }); + lastTxId = txp.txid; } }, onSendStatusChange); }; diff --git a/src/js/directives/slideToAcceptSuccess.js b/src/js/directives/slideToAcceptSuccess.js index fbd588bfe..ec6321b95 100644 --- a/src/js/directives/slideToAcceptSuccess.js +++ b/src/js/directives/slideToAcceptSuccess.js @@ -9,12 +9,12 @@ angular.module('copayApp.directives') scope: { isShown: '=slideSuccessShow', onConfirm: '&slideSuccessOnConfirm', - hideOnConfirm: '=slideSuccessHideOnConfirm' + hideOnConfirm: '=slideSuccessHideOnConfirm', + onShare: '=slideSuccessOnShare', }, link: function(scope, element, attrs) { - - scope.isWindowsPhoneApp = platformInfo.isCordova && platformInfo.isWP; - + scope.isCordova = platformInfo.isCordova; + scope.hasShareFunction = typeof scope.onShare === 'function'; var elm = element[0]; elm.style.display = 'none'; scope.$watch('isShown', function() { @@ -32,6 +32,9 @@ angular.module('copayApp.directives') elm.style.display = 'none'; } }; + scope.onShareButtonClick = function() { + scope.onShare(); + } } }; }); diff --git a/src/sass/views/includes/slideToAcceptSuccess.scss b/src/sass/views/includes/slideToAcceptSuccess.scss index 68312c7a4..724363b0d 100644 --- a/src/sass/views/includes/slideToAcceptSuccess.scss +++ b/src/sass/views/includes/slideToAcceptSuccess.scss @@ -12,12 +12,6 @@ slide-to-accept-success { .slide-success { $duration: 400ms; - &__windows-background { - background: $v-success-bg-color; - height: 100%; - width: 100%; - position: fixed; - } &__background { $start-radius: 5; $scale-factor: 20; @@ -40,9 +34,11 @@ slide-to-accept-success { &__content { position: relative; z-index: 1; - margin-top: -20vh; + margin-top: -10vh; > img { + width: 45vw; + max-width: 166px; margin-bottom: 1.8rem; -webkit-transform: translateY(5rem); transform: translateY(5rem); @@ -59,7 +55,7 @@ slide-to-accept-success { &__header { color: #FFFFFF; - font-size: 26px; + font-size: 29px; -webkit-transform: translateY(5rem); transform: translateY(5rem); opacity: 0; @@ -72,6 +68,26 @@ slide-to-accept-success { opacity: 1; } } + &__share { + transition: transform $duration ease, opacity $duration ease; + transition-delay: 1000ms; + opacity: 0; + margin-top: 15vh; + span { + color: #FFF; + font-size: 22px; + height: 28px; + } + img { + height: 28px; + width: auto; + vertical-align: bottom; + margin-right: 4px; + } + &.reveal { + opacity: 0.79; + } + } } &__footer { @@ -98,11 +114,11 @@ slide-to-accept-success { &__btn { display: block; color: #FFFFFF; - font-size: 18px; + font-size: 22px; font-weight: 600; letter-spacing: 2.86px; - padding: 1rem 0 1.1rem; - border-top: 1px solid rgba(255, 255, 255, .45); + padding: 2rem 0 2.1rem; + border-top: 1px solid rgba(255, 255, 255, 0.25); cursor: pointer; } } diff --git a/www/img/icon-share-white.svg b/www/img/icon-share-white.svg new file mode 100644 index 000000000..eeb3e7b6b --- /dev/null +++ b/www/img/icon-share-white.svg @@ -0,0 +1,17 @@ + + + + + + + + + + diff --git a/www/views/confirm.html b/www/views/confirm.html index e54837f34..afc8f9e40 100644 --- a/www/views/confirm.html +++ b/www/views/confirm.html @@ -120,6 +120,7 @@ Payment Sent Proposal Created diff --git a/www/views/includes/slideToAcceptSuccess.html b/www/views/includes/slideToAcceptSuccess.html index 923eab25c..ed4ebfa77 100644 --- a/www/views/includes/slideToAcceptSuccess.html +++ b/www/views/includes/slideToAcceptSuccess.html @@ -1,13 +1,16 @@
+ ng-class="{'fill-screen': fillScreen}">
- +
Payment Sent
+
+
+
+
+ Receive +
+
+
+
+ Buy Bitcoin +
+
+ Send +
+
+
+
From 8725adb959f38d971cfecf05bbd067b6baf3186b Mon Sep 17 00:00:00 2001 From: Sebastiaan Pasma Date: Wed, 18 Jul 2018 09:02:52 +0200 Subject: [PATCH 07/30] sent-successful svg --- www/img/icon-sent-successful.svg | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 www/img/icon-sent-successful.svg diff --git a/www/img/icon-sent-successful.svg b/www/img/icon-sent-successful.svg new file mode 100644 index 000000000..070357ddf --- /dev/null +++ b/www/img/icon-sent-successful.svg @@ -0,0 +1,10 @@ + + + + + + From 450b80b03fd6ab9701a481b383cedeadd658cdd4 Mon Sep 17 00:00:00 2001 From: Sebastiaan Pasma Date: Wed, 18 Jul 2018 16:30:54 +0200 Subject: [PATCH 08/30] send/receive buttons on walletDetails + currencySymbolService --- src/js/controllers/walletDetails.js | 24 ++- src/js/services/currencySymbolService.js | 194 +++++++++++++++++++++++ src/sass/shame.scss | 4 + src/sass/views/walletDetails.scss | 24 ++- www/views/tab-home.html | 26 +-- www/views/walletDetails.html | 42 +++-- 6 files changed, 280 insertions(+), 34 deletions(-) create mode 100644 src/js/services/currencySymbolService.js diff --git a/src/js/controllers/walletDetails.js b/src/js/controllers/walletDetails.js index 24237f6c9..24e4a5a20 100644 --- a/src/js/controllers/walletDetails.js +++ b/src/js/controllers/walletDetails.js @@ -1,6 +1,6 @@ 'use strict'; -angular.module('copayApp.controllers').controller('walletDetailsController', function($scope, $rootScope, $interval, $timeout, $filter, $log, $ionicModal, $ionicPopover, $state, $stateParams, $ionicHistory, profileService, lodash, configService, platformInfo, walletService, txpModalService, externalLinkService, popupService, addressbookService, storageService, $ionicScrollDelegate, $window, bwcError, gettextCatalog, timeService, feeService, appConfigService, rateService) { +angular.module('copayApp.controllers').controller('walletDetailsController', function($scope, $rootScope, $interval, $timeout, $filter, $log, $ionicModal, $ionicPopover, $state, $stateParams, $ionicHistory, profileService, lodash, configService, currencySymbolService, platformInfo, walletService, txpModalService, externalLinkService, popupService, addressbookService, storageService, $ionicScrollDelegate, $window, bwcError, gettextCatalog, timeService, feeService, appConfigService, rateService) { var HISTORY_SHOW_LIMIT = 10; var currentTxHistoryPage = 0; @@ -12,6 +12,13 @@ angular.module('copayApp.controllers').controller('walletDetailsController', fun $scope.isAndroid = platformInfo.isAndroid; $scope.isIOS = platformInfo.isIOS; + $scope.currencySymbols = { + 'EUR': '€', + 'GBP': '£', + 'USD': '$', + 'YEN' : '' + }; + var channel = "firebase"; if (platformInfo.isNW) { channel = "ga"; @@ -256,6 +263,11 @@ angular.module('copayApp.controllers').controller('walletDetailsController', fun return !tx.confirmations || tx.confirmations === 0; }; + $scope.currencySymbol = function(code) { + var symbol = currencySymbolService.getCurrencySymbol(code); + return symbol?symbol:""; + }; + $scope.showMore = function() { $timeout(function() { currentTxHistoryPage++; @@ -315,16 +327,16 @@ angular.module('copayApp.controllers').controller('walletDetailsController', fun } scrollPos = scrollPos || 0; - var amountHeight = 210 - scrollPos; + var amountHeight = 230 - scrollPos; if (amountHeight < 80) { amountHeight = 80; } var contentMargin = amountHeight; - if (contentMargin > 210) { - contentMargin = 210; + if (contentMargin > 230) { + contentMargin = 230; } - var amountScale = (amountHeight / 210); + var amountScale = (amountHeight / 230); if (amountScale < 0.5) { amountScale = 0.5; } @@ -342,7 +354,7 @@ angular.module('copayApp.controllers').controller('walletDetailsController', fun top = TOP_BALANCE_BUTTON; } - var amountTop = ((amountScale - 0.7) / 0.7) * top; + var amountTop = ((amountScale - 0.85) / 0.85) * top; if (amountTop < -10) { amountTop = -10; } diff --git a/src/js/services/currencySymbolService.js b/src/js/services/currencySymbolService.js new file mode 100644 index 000000000..b4cf0c2ac --- /dev/null +++ b/src/js/services/currencySymbolService.js @@ -0,0 +1,194 @@ +'use strict'; + +angular.module('copayApp.services').factory('currencySymbolService', function($log) { + var root = {}; + root.currencySymbols = { + 'AED': 'د.إ', + 'AFN': '؋', + 'ALL': 'L', + 'AMD': '֏', + 'ANG': 'ƒ', + 'AOA': 'Kz', + 'ARS': '$', + 'AUD': '$', + 'AWG': 'ƒ', + 'AZN': '₼', + 'BAM': 'KM', + 'BBD': '$', + 'BDT': '৳', + 'BGN': 'лв', + 'BHD': '.د.ب', + 'BIF': 'FBu', + 'BMD': '$', + 'BND': '$', + 'BOB': '$b', + 'BRL': 'R$', + 'BSD': '$', + 'BTC': '฿', + 'BTN': 'Nu.', + 'BWP': 'P', + 'BYR': 'Br', + 'BYN': 'Br', + 'BZD': 'BZ$', + 'CAD': '$', + 'CDF': 'FC', + 'CHF': 'CHF', + 'CLP': '$', + 'CNY': '¥', + 'COP': '$', + 'CRC': '₡', + 'CUC': '$', + 'CUP': '₱', + 'CVE': '$', + 'CZK': 'Kč', + 'DJF': 'Fdj', + 'DKK': 'kr', + 'DOP': 'RD$', + 'DZD': 'دج', + 'EEK': 'kr', + 'EGP': '£', + 'ERN': 'Nfk', + 'ETB': 'Br', + 'ETH': 'Ξ', + 'EUR': '€', + 'FJD': '$', + 'FKP': '£', + 'GBP': '£', + 'GEL': '₾', + 'GGP': '£', + 'GHC': '₵', + 'GHS': 'GH₵', + 'GIP': '£', + 'GMD': 'D', + 'GNF': 'FG', + 'GTQ': 'Q', + 'GYD': '$', + 'HKD': '$', + 'HNL': 'L', + 'HRK': 'kn', + 'HTG': 'G', + 'HUF': 'Ft', + 'IDR': 'Rp', + 'ILS': '₪', + 'IMP': '£', + 'INR': '₹', + 'IQD': 'ع.د', + 'IRR': '﷼', + 'ISK': 'kr', + 'JEP': '£', + 'JMD': 'J$', + 'JOD': 'JD', + 'JPY': '¥', + 'KES': 'KSh', + 'KGS': 'лв', + 'KHR': '៛', + 'KMF': 'CF', + 'KPW': '₩', + 'KRW': '₩', + 'KWD': 'KD', + 'KYD': '$', + 'KZT': 'лв', + 'LAK': '₭', + 'LBP': '£', + 'LKR': '₨', + 'LRD': '$', + 'LSL': 'M', + 'LTC': 'Ł', + 'LTL': 'Lt', + 'LVL': 'Ls', + 'LYD': 'LD', + 'MAD': 'MAD', + 'MDL': 'lei', + 'MGA': 'Ar', + 'MKD': 'ден', + 'MMK': 'K', + 'MNT': '₮', + 'MOP': 'MOP$', + 'MRO': 'UM', + 'MRU': 'UM', + 'MUR': '₨', + 'MVR': 'Rf', + 'MWK': 'MK', + 'MXN': '$', + 'MYR': 'RM', + 'MZN': 'MT', + 'NAD': '$', + 'NGN': '₦', + 'NIO': 'C$', + 'NOK': 'kr', + 'NPR': '₨', + 'NZD': '$', + 'OMR': '﷼', + 'PAB': 'B/.', + 'PEN': 'S/.', + 'PGK': 'K', + 'PHP': '₱', + 'PKR': '₨', + 'PLN': 'zł', + 'PYG': 'Gs', + 'QAR': '﷼', + 'RMB': '¥', + 'RON': 'lei', + 'RSD': 'Дин.', + 'RUB': '₽', + 'RWF': 'R₣', + 'SAR': '﷼', + 'SBD': '$', + 'SCR': '₨', + 'SDG': 'ج.س.', + 'SEK': 'kr', + 'SGD': '$', + 'SHP': '£', + 'SLL': 'Le', + 'SOS': 'S', + 'SRD': '$', + 'SSP': '£', + 'STD': 'Db', + 'STN': 'Db', + 'SVC': '$', + 'SYP': '£', + 'SZL': 'E', + 'THB': '฿', + 'TJS': 'SM', + 'TMT': 'T', + 'TND': 'د.ت', + 'TOP': 'T$', + 'TRL': '₤', + 'TRY': '₺', + 'TTD': 'TT$', + 'TVD': '$', + 'TWD': 'NT$', + 'TZS': 'TSh', + 'UAH': '₴', + 'UGX': 'USh', + 'USD': '$', + 'UYU': '$U', + 'UZS': 'лв', + 'VEF': 'Bs', + 'VND': '₫', + 'VUV': 'VT', + 'WST': 'WS$', + 'XAF': 'FCFA', + 'XBT': 'Ƀ', + 'XCD': '$', + 'XOF': 'CFA', + 'XPF': '₣', + 'YER': '﷼', + 'ZAR': 'R', + 'ZWD': 'Z$' + }; + + root.getCurrencySymbol = function(code) { + code = code.toUpperCase(); + + if (root.currencySymbols[code]) { + $log.debug("Currency symbol for "+code+" found"); + return root.currencySymbols[code]; + } + $log.debug("Currency symbol for "+code+" not found"); + return false; + }; + + return root; + +}); \ No newline at end of file diff --git a/src/sass/shame.scss b/src/sass/shame.scss index 07ac2dedf..5a17c5f1f 100644 --- a/src/sass/shame.scss +++ b/src/sass/shame.scss @@ -233,6 +233,10 @@ input[type=number] { font-size: 24px; } +.size-25 { + font-size: 25px; +} + .size-28 { font-size: 28px; } diff --git a/src/sass/views/walletDetails.scss b/src/sass/views/walletDetails.scss index 9e651f871..2d1aa1343 100644 --- a/src/sass/views/walletDetails.scss +++ b/src/sass/views/walletDetails.scss @@ -153,7 +153,7 @@ ion-content { &.collapsible { - margin-top: 210px; + margin-top: 230px; } padding-top: 0; @@ -190,12 +190,32 @@ transform: translateY(100px); } } + + .buttons { + margin-bottom: 0; + margin-top: 6px; + >.col { + padding: 5px 10px; + margin-bottom: 0; + } + .button { + border: 2px solid; + border-radius: 47px; + padding: 0 15px 0 15px; + text-align: center; + width: 100%; + font-size: 19px; + font-weight: bolder; + min-height: 45px; + line-height: 45px; + } + } } .amount { width: 100%; text-align: center; color: #fff; - height: 210px; + height: 230px; padding-top: 40px; display: block; align-items: center; diff --git a/www/views/tab-home.html b/www/views/tab-home.html index 85b7692f7..618f2e128 100644 --- a/www/views/tab-home.html +++ b/www/views/tab-home.html @@ -23,20 +23,22 @@
-
-
- Receive -
-
-
-
- Buy Bitcoin -
-
- Send -
+
+
+ Receive
+
+
+ Buy Bitcoin +
+
+ Send +
+
+
diff --git a/www/views/walletDetails.html b/www/views/walletDetails.html index 0f9e4961c..820930a95 100644 --- a/www/views/walletDetails.html +++ b/www/views/walletDetails.html @@ -34,7 +34,7 @@ on-hold="hideToggle()" ng-style="{'transform': amountScale}" ng-class="{amount__balance: amountIsCollapsible}"> - {{status.totalBalanceAlternative}} {{status.alternativeIsoCode}} + {{currencySymbol(status.alternativeIsoCode)}} {{status.totalBalanceAlternative}} {{status.alternativeIsoCode}}
- {{status.totalBalanceStr}} + {{status.totalBalanceStr}}
- {{status.totalBalanceAlternative}} {{status.alternativeIsoCode}} + {{currencySymbol(status.alternativeIsoCode)}} {{status.totalBalanceAlternative}} {{status.alternativeIsoCode}}
@@ -86,11 +86,25 @@   - {{status.spendableBalanceAlternative}} {{status.alternativeIsoCode}} + {{currencySymbol(status.alternativeIsoCode)}} {{status.spendableBalanceAlternative}} {{status.alternativeIsoCode}}
- +
+
+
+ Receive +
+
+
+
+ Buy Bitcoin +
+
+ Send +
+
+
@@ -127,12 +141,12 @@ on-hold="hideToggle()" ng-style="{'transform': amountScale}" ng-class="{amount__balance: amountIsCollapsible}"> - {{status.totalBalanceStr}} + {{status.totalBalanceStr}}
- {{status.totalBalanceAlternative}} {{status.alternativeIsoCode}} + {{currencySymbol(status.alternativeIsoCode)}} {{status.totalBalanceAlternative}} {{status.alternativeIsoCode}}
@@ -142,9 +156,9 @@ on-hold="hideToggle()" ng-style="{'transform': amountScale}" ng-class="{amount__balance: amountIsCollapsible}"> - {{status.totalBalanceAlternative}} {{status.alternativeIsoCode}} + {{currencySymbol(status.alternativeIsoCode)}} {{status.totalBalanceAlternative}} {{status.alternativeIsoCode}}
{{status.totalBalanceStr}} @@ -156,7 +170,7 @@ ng-show="!updateStatusError && wallet.balanceHidden && !wallet.scanning" on-hold="hideToggle()"> [Balance Hidden] -
+
Tap and hold to show
@@ -166,7 +180,7 @@ class="amount__balance" ng-show="!updateStatusError && wallet.scanning"> [Scanning Funds] -
+
Please wait
@@ -180,7 +194,7 @@   - {{status.spendableBalanceAlternative}} {{status.alternativeIsoCode}} + {{currencySymbol(status.alternativeIsoCode)}} {{status.spendableBalanceAlternative}} {{status.alternativeIsoCode}}
@@ -189,7 +203,7 @@
From 4f4bee27f1c53eef16b541542bae2c8fac586fe5 Mon Sep 17 00:00:00 2001 From: Sebastiaan Pasma Date: Thu, 19 Jul 2018 09:59:56 +0200 Subject: [PATCH 09/30] Options also translatable --- i18n/po/template.pot | 10 ++++++++++ src/js/controllers/tab-settings.js | 2 +- www/views/preferencesPriceDisplay.html | 6 +++--- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/i18n/po/template.pot b/i18n/po/template.pot index df01cecec..aed2220fd 100644 --- a/i18n/po/template.pot +++ b/i18n/po/template.pot @@ -201,6 +201,16 @@ msgstr "" msgid "Price Display" msgstr "" +#: src/js/controllers/tab-settings.js:19 +#: www/views/preferencesPriceDisplay.html:12 +msgid "Fiat" +msgstr "" + +#: src/js/controllers/tab-settings.js:19 +#: www/views/preferencesPriceDisplay.html:15 +msgid "Cryptocurrency" +msgstr "" + #: src/js/controllers/buyAmazon.js:98 msgid "Amazon.com is not available at this moment. Please try back later." msgstr "" diff --git a/src/js/controllers/tab-settings.js b/src/js/controllers/tab-settings.js index 4d0636d53..494d63cc5 100644 --- a/src/js/controllers/tab-settings.js +++ b/src/js/controllers/tab-settings.js @@ -16,7 +16,7 @@ angular.module('copayApp.controllers').controller('tabSettingsController', funct isoCode: config.wallet.settings.alternativeIsoCode }; - $scope.selectedPriceDisplay = config.wallet.settings.priceDisplay; + $scope.selectedPriceDisplay = config.wallet.settings.priceDisplay === 'crypto' ? gettextCatalog.getString('Cryptocurrency') : gettextCatalog.getString('Fiat'); // TODO move this to a generic service bitpayAccountService.getAccounts(function(err, data) { diff --git a/www/views/preferencesPriceDisplay.html b/www/views/preferencesPriceDisplay.html index a4c12d273..31a9eb9b9 100644 --- a/www/views/preferencesPriceDisplay.html +++ b/www/views/preferencesPriceDisplay.html @@ -1,7 +1,7 @@ - {{'Price display'|translate}} + {{'Price Display'|translate}} @@ -9,10 +9,10 @@
- fiat + Fiat - cryptocurrency + Cryptocurrency
From 54478a4848619d538f694f04eabf862e8b19397f Mon Sep 17 00:00:00 2001 From: Sebastiaan Pasma Date: Thu, 19 Jul 2018 10:23:10 +0200 Subject: [PATCH 10/30] translation + faster transition --- i18n/po/template.pot | 4 ++++ src/sass/views/includes/slideToAcceptSuccess.scss | 2 +- www/views/includes/slideToAcceptSuccess.html | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/i18n/po/template.pot b/i18n/po/template.pot index 4bab9ff2e..33616a9c5 100644 --- a/i18n/po/template.pot +++ b/i18n/po/template.pot @@ -2159,6 +2159,10 @@ msgstr "" msgid "Payment Sent" msgstr "" +#: www/views/includes/slideToAcceptSuccess.html:12 +msgid "Share this transaction" +msgstr "" + #: www/views/modals/txp-details.html:32 msgid "Payment accepted, but not yet broadcasted" msgstr "" diff --git a/src/sass/views/includes/slideToAcceptSuccess.scss b/src/sass/views/includes/slideToAcceptSuccess.scss index 724363b0d..f64dd6154 100644 --- a/src/sass/views/includes/slideToAcceptSuccess.scss +++ b/src/sass/views/includes/slideToAcceptSuccess.scss @@ -70,7 +70,7 @@ slide-to-accept-success { } &__share { transition: transform $duration ease, opacity $duration ease; - transition-delay: 1000ms; + transition-delay: 600ms; opacity: 0; margin-top: 15vh; span { diff --git a/www/views/includes/slideToAcceptSuccess.html b/www/views/includes/slideToAcceptSuccess.html index ed4ebfa77..9995001ae 100644 --- a/www/views/includes/slideToAcceptSuccess.html +++ b/www/views/includes/slideToAcceptSuccess.html @@ -9,7 +9,7 @@ Payment Sent
From b1befb1e7335c200541dd74f352517db78be60d2 Mon Sep 17 00:00:00 2001 From: Sebastiaan Pasma Date: Thu, 19 Jul 2018 13:10:25 +0200 Subject: [PATCH 11/30] wallet Details buttons --- src/js/controllers/walletDetails.js | 2 ++ src/sass/views/walletDetails.scss | 16 ++++++++-------- www/views/walletDetails.html | 2 +- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/src/js/controllers/walletDetails.js b/src/js/controllers/walletDetails.js index 24e4a5a20..b3fea717e 100644 --- a/src/js/controllers/walletDetails.js +++ b/src/js/controllers/walletDetails.js @@ -365,6 +365,8 @@ angular.module('copayApp.controllers').controller('walletDetailsController', fun var t = amountTop; $scope.altAmountOpacity = (amountHeight - 100) / 80; + + $scope.buttonsOpacity = (amountHeight - 150)/80; $window.requestAnimationFrame(function() { $scope.amountHeight = amountHeight + 'px'; $scope.contentMargin = contentMargin + 'px'; diff --git a/src/sass/views/walletDetails.scss b/src/sass/views/walletDetails.scss index 2d1aa1343..6be9e6cf2 100644 --- a/src/sass/views/walletDetails.scss +++ b/src/sass/views/walletDetails.scss @@ -147,13 +147,13 @@ background-color: transparent; } } - .nav-bar-block, .bar { - background-color: inherit !important; - } + //.nav-bar-block, .bar { + //background-color: inherit !important; + //} ion-content { &.collapsible { - margin-top: 230px; + margin-top: 210px; } padding-top: 0; @@ -193,7 +193,7 @@ .buttons { margin-bottom: 0; - margin-top: 6px; + margin-top: 30px; >.col { padding: 5px 10px; margin-bottom: 0; @@ -206,8 +206,8 @@ width: 100%; font-size: 19px; font-weight: bolder; - min-height: 45px; - line-height: 45px; + min-height: 40px; + line-height: 40px; } } } @@ -215,7 +215,7 @@ width: 100%; text-align: center; color: #fff; - height: 230px; + height: 210px; padding-top: 40px; display: block; align-items: center; diff --git a/www/views/walletDetails.html b/www/views/walletDetails.html index 820930a95..e2c0f7342 100644 --- a/www/views/walletDetails.html +++ b/www/views/walletDetails.html @@ -90,7 +90,7 @@ -
+
Receive From 700d2c8a2398e4a38b476030e5b693756a7b23db Mon Sep 17 00:00:00 2001 From: Sebastiaan Pasma Date: Thu, 19 Jul 2018 13:19:56 +0200 Subject: [PATCH 12/30] currency symbol --- src/js/services/currencySymbolService.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/js/services/currencySymbolService.js b/src/js/services/currencySymbolService.js index b4cf0c2ac..14565a1a5 100644 --- a/src/js/services/currencySymbolService.js +++ b/src/js/services/currencySymbolService.js @@ -179,10 +179,11 @@ angular.module('copayApp.services').factory('currencySymbolService', function($l }; root.getCurrencySymbol = function(code) { + if (!code) + return false; code = code.toUpperCase(); if (root.currencySymbols[code]) { - $log.debug("Currency symbol for "+code+" found"); return root.currencySymbols[code]; } $log.debug("Currency symbol for "+code+" not found"); From 442f6ba4dffc247696975e884265964ad5e54448 Mon Sep 17 00:00:00 2001 From: Sebastiaan Pasma Date: Thu, 19 Jul 2018 13:20:38 +0200 Subject: [PATCH 13/30] currency symbol --- src/js/services/currencySymbolService.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/js/services/currencySymbolService.js b/src/js/services/currencySymbolService.js index 14565a1a5..029cd9eb2 100644 --- a/src/js/services/currencySymbolService.js +++ b/src/js/services/currencySymbolService.js @@ -179,8 +179,8 @@ angular.module('copayApp.services').factory('currencySymbolService', function($l }; root.getCurrencySymbol = function(code) { - if (!code) - return false; + if (!code) return false; + code = code.toUpperCase(); if (root.currencySymbols[code]) { From 8ddfffd56b4dca5458545e5421cb467cdeb45be4 Mon Sep 17 00:00:00 2001 From: Sebastiaan Pasma Date: Thu, 19 Jul 2018 15:21:27 +0200 Subject: [PATCH 14/30] amount on custom amount screen --- src/js/controllers/customAmount.js | 10 ++++++- src/sass/views/custom-amount.scss | 43 +++++++++++++++++++++++------- www/views/customAmount.html | 34 ++++++++++++++++++----- 3 files changed, 69 insertions(+), 18 deletions(-) diff --git a/src/js/controllers/customAmount.js b/src/js/controllers/customAmount.js index f6b96c22c..86bfa250f 100644 --- a/src/js/controllers/customAmount.js +++ b/src/js/controllers/customAmount.js @@ -64,6 +64,14 @@ angular.module('copayApp.controllers').controller('customAmountController', func var currency = parsedAmount.currency; $scope.amountUnitStr = parsedAmount.amountUnitStr; + configService.whenAvailable(function (config) { + $scope.selectedPriceDisplay = config.wallet.settings.priceDisplay; + + $timeout(function () { + $scope.$apply(); + }); + }); + if (currency != 'BTC' && currency != 'BCH') { // Convert to BTC or BCH var config = configService.getSync().wallet.settings; @@ -71,7 +79,7 @@ angular.module('copayApp.controllers').controller('customAmountController', func var btcParsedAmount = txFormatService.parseAmount($scope.wallet.coin, amountUnit, $scope.wallet.coin); $scope.amountBtc = btcParsedAmount.amount; - $scope.altAmountStr = btcParsedAmount.amountUnitStr; + $scope.altAmountStr = btcParsedAmount.amountUnitStr.toUpperCase(); } else { $scope.amountBtc = amount; // BTC or BCH $scope.altAmountStr = txFormatService.formatAlternativeStr($scope.wallet.coin, parsedAmount.amountSat); diff --git a/src/sass/views/custom-amount.scss b/src/sass/views/custom-amount.scss index b9bf65459..17973101d 100644 --- a/src/sass/views/custom-amount.scss +++ b/src/sass/views/custom-amount.scss @@ -26,16 +26,10 @@ height: 100%; .qr-code { text-align: center; - margin-top: 24vh; - margin-bottom: 7vh; - @media(max-height: 800px) { - margin-top: 18vh; - } - @media(max-height: 700px) { - margin-top: 14vh; - } - @media(max-height: 600px) { - margin-top: 8vh; + margin-top: 6px; + qrcode canvas { + height: 30vh; + max-height: 220px; } } .info { @@ -91,5 +85,34 @@ .address-types { text-align: center; } + + .amount { + margin-top: 20vh; + margin-bottom: 4vh; + @media(max-height: 800px) { + margin-top: 12vh; + margin-bottom: 6vh; + } + @media(max-height: 700px) { + margin-top: 10vh; + margin-bottom: 4vh; + } + @media(max-height: 600px) { + margin-top: 6vh; + margin-bottom: 2vh; + + } + width: 100%; + text-align: center; + //padding-top: 30px; + display: block; + align-items: center; + justify-content: center; + + &-alternative { + line-height: 36px; + } + } + } } diff --git a/www/views/customAmount.html b/www/views/customAmount.html index a4f2d57c9..73f107d82 100644 --- a/www/views/customAmount.html +++ b/www/views/customAmount.html @@ -11,7 +11,7 @@
-
-
-
+
Address {{address}} From 95faffa7698347a323cbaa53cdafa0c0dea25929 Mon Sep 17 00:00:00 2001 From: Sebastiaan Pasma Date: Thu, 19 Jul 2018 15:30:29 +0200 Subject: [PATCH 15/30] remove bold font style --- 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 73f107d82..cac2bbc7d 100644 --- a/www/views/customAmount.html +++ b/www/views/customAmount.html @@ -34,13 +34,13 @@
- {{amountUnitStr}} + {{amountUnitStr}}
{{altAmountStr}}
- {{altAmountStr}} + {{altAmountStr}}
{{amountUnitStr}}
From 00ca5cded6f082052f6edbb34a0fc54cf6e211e5 Mon Sep 17 00:00:00 2001 From: Sebastiaan Pasma Date: Thu, 19 Jul 2018 15:41:06 +0200 Subject: [PATCH 16/30] uppercase pipes --- src/js/controllers/customAmount.js | 2 +- www/views/customAmount.html | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/js/controllers/customAmount.js b/src/js/controllers/customAmount.js index 86bfa250f..a3916a2d4 100644 --- a/src/js/controllers/customAmount.js +++ b/src/js/controllers/customAmount.js @@ -79,7 +79,7 @@ angular.module('copayApp.controllers').controller('customAmountController', func var btcParsedAmount = txFormatService.parseAmount($scope.wallet.coin, amountUnit, $scope.wallet.coin); $scope.amountBtc = btcParsedAmount.amount; - $scope.altAmountStr = btcParsedAmount.amountUnitStr.toUpperCase(); + $scope.altAmountStr = btcParsedAmount.amountUnitStr; } else { $scope.amountBtc = amount; // BTC or BCH $scope.altAmountStr = txFormatService.formatAlternativeStr($scope.wallet.coin, parsedAmount.amountSat); diff --git a/www/views/customAmount.html b/www/views/customAmount.html index cac2bbc7d..849487735 100644 --- a/www/views/customAmount.html +++ b/www/views/customAmount.html @@ -36,11 +36,11 @@
{{amountUnitStr}}
- {{altAmountStr}} + {{altAmountStr | uppercase}}
- {{altAmountStr}} + {{altAmountStr | uppercase}}
{{amountUnitStr}}
@@ -80,7 +80,7 @@
Amount - {{amountUnitStr}} - {{altAmountStr}} + {{amountUnitStr}} - {{altAmountStr | uppercase}}
From a0b4f10ca9a91f91389752efcc7ef8bc9041ceab Mon Sep 17 00:00:00 2001 From: Sebastiaan Pasma Date: Thu, 19 Jul 2018 15:43:32 +0200 Subject: [PATCH 17/30] reverted IDE spacings --- www/views/customAmount.html | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/www/views/customAmount.html b/www/views/customAmount.html index 849487735..a71a60202 100644 --- a/www/views/customAmount.html +++ b/www/views/customAmount.html @@ -11,7 +11,7 @@
-
-
-
+
Address {{address}} From 3952df634324176ccdbdb7652ac1992a48264dea Mon Sep 17 00:00:00 2001 From: Sebastiaan Pasma Date: Thu, 19 Jul 2018 17:07:30 +0200 Subject: [PATCH 18/30] forked the cordova media plugin to remove unused permissions --- app-template/config-template.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app-template/config-template.xml b/app-template/config-template.xml index 1c7f5a30a..2f8e3db04 100644 --- a/app-template/config-template.xml +++ b/app-template/config-template.xml @@ -72,7 +72,7 @@ - + From 713bbf71ca4efd4f04e6e551f0c005c070b26003 Mon Sep 17 00:00:00 2001 From: Sebastiaan Pasma Date: Fri, 20 Jul 2018 10:06:59 +0200 Subject: [PATCH 19/30] currency format service + remove bottom amount in request amount screen --- src/js/services/txFormatService.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/js/services/txFormatService.js b/src/js/services/txFormatService.js index ebcb3886a..1932ebd2a 100644 --- a/src/js/services/txFormatService.js +++ b/src/js/services/txFormatService.js @@ -201,7 +201,7 @@ angular.module('copayApp.services').factory('txFormatService', function($filter, var alternativeIsoCode = config.alternativeIsoCode; // If fiat currency - if (currency != 'BCH' && currency != 'BTC' && currency != 'sat') { + if (currency && currency.toUpperCase() != 'BCH' && currency.toUpperCase() != 'BTC' && currency != 'sat') { amountUnitStr = $filter('formatFiatAmount')(amount) + ' ' + currency; amountSat = rateService.fromFiat(amount, currency, coin).toFixed(0); } else if (currency == 'sat') { From 1153830d05724322aa89444273c70a23e072ba77 Mon Sep 17 00:00:00 2001 From: Sebastiaan Pasma Date: Fri, 20 Jul 2018 10:41:09 +0200 Subject: [PATCH 20/30] custom amount screen --- www/views/customAmount.html | 6 ------ 1 file changed, 6 deletions(-) diff --git a/www/views/customAmount.html b/www/views/customAmount.html index a71a60202..d6a474d1a 100644 --- a/www/views/customAmount.html +++ b/www/views/customAmount.html @@ -71,12 +71,6 @@ {{address}}
-
- Amount - - {{amountUnitStr}} - {{altAmountStr | uppercase}} - -
From 84ef39510093f9b0a809333f5287bf9901d5a517 Mon Sep 17 00:00:00 2001 From: Sebastiaan Pasma Date: Tue, 24 Jul 2018 07:36:03 +0200 Subject: [PATCH 21/30] qr code added to request payment (and also working on smaller qrs, for iPhone 5/SE) --- src/sass/qr.scss | 4 ++-- www/views/customAmount.html | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/sass/qr.scss b/src/sass/qr.scss index 62fd12eb7..5df26e37b 100644 --- a/src/sass/qr.scss +++ b/src/sass/qr.scss @@ -5,8 +5,8 @@ qrcode { content: ""; background-size: 100% 100%; display: block; - left: 88px; - margin-top: 88px; + left: calc(50% - 22px); + margin-top: calc(50% - 22px); width: 44px; height: 44px; position:absolute; diff --git a/www/views/customAmount.html b/www/views/customAmount.html index d6a474d1a..b361a6da9 100644 --- a/www/views/customAmount.html +++ b/www/views/customAmount.html @@ -45,7 +45,7 @@
- +
From bba85794ac3599127b6627f11baaf6d435ee30a5 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Dominguez Date: Wed, 25 Jul 2018 16:17:42 +0900 Subject: [PATCH 22/30] BitAnalytics 0.2.1 with GA --- Gruntfile.js | 2 +- ...{bitanalytics-0.1.0.js => bitanalytics.js} | 260 +++++++++++++++--- src/js/controllers/addressbookAdd.js | 6 +- src/js/controllers/confirm.js | 6 +- .../controllers/preferencesNotifications.js | 6 +- src/js/controllers/tab-receive.js | 6 +- src/js/controllers/walletDetails.js | 6 +- src/js/routes.js | 6 +- src/js/services/profileService.js | 6 +- www/index.html | 7 +- 10 files changed, 245 insertions(+), 66 deletions(-) rename bitanalytics/{bitanalytics-0.1.0.js => bitanalytics.js} (97%) diff --git a/Gruntfile.js b/Gruntfile.js index 342cc85e7..eb4bb2eb0 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -163,7 +163,7 @@ module.exports = function(grunt) { }, bitanalytics: { src: [ - 'bitanalytics/bitanalytics-0.1.0.js' + 'bitanalytics/bitanalytics.js' ], dest: 'www/lib/bitanalytics.js' }, diff --git a/bitanalytics/bitanalytics-0.1.0.js b/bitanalytics/bitanalytics.js similarity index 97% rename from bitanalytics/bitanalytics-0.1.0.js rename to bitanalytics/bitanalytics.js index db149e481..c8c0d8870 100644 --- a/bitanalytics/bitanalytics-0.1.0.js +++ b/bitanalytics/bitanalytics.js @@ -6276,7 +6276,7 @@ var ClickAction = /** @class */ (function (_super) { }(action_1.default)); exports.default = ClickAction; -},{"../action":4,"../log-event":15,"../log-event-handlers":14}],6:[function(require,module,exports){ +},{"../action":4,"../log-event":16,"../log-event-handlers":15}],6:[function(require,module,exports){ "use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; @@ -6315,7 +6315,7 @@ var BitAnalytics = /** @class */ (function () { exports.default = BitAnalytics; BitAnalytics.main(); -},{"./action-factory":2,"./action-handlers":3,"./channels/adjust-channel":9,"./channels/mixpanel-channel":12,"./log-event":15,"./log-event-handlers":14}],7:[function(require,module,exports){ +},{"./action-factory":2,"./action-handlers":3,"./channels/adjust-channel":9,"./channels/mixpanel-channel":12,"./log-event":16,"./log-event-handlers":15}],7:[function(require,module,exports){ "use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; @@ -6560,11 +6560,10 @@ var FirebaseChannel = /** @class */ (function (_super) { var keys = Object.keys(params); var keysLength = keys.length; var sanitized = {}; - for (var i = 0; i < keysLength; i++) { - var key = keys[i]; + keys.map(function (key) { var cleanKey = key.replace('-', '_').replace(/[\W]+/g, ''); sanitized[cleanKey] = params[key]; - } + }); return sanitized; }; return FirebaseChannel; @@ -6588,13 +6587,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) { }; Object.defineProperty(exports, "__esModule", { value: true }); var channel_1 = __importDefault(require("../channel")); +var ga_1 = __importDefault(require("../external-libs/ga")); var GoogleAnalyticsChannel = /** @class */ (function (_super) { __extends(GoogleAnalyticsChannel, _super); function GoogleAnalyticsChannel(name, config) { var _this = _super.call(this, name) || this; - _this.dataLayer = null; _this.gaInstance = null; - _this.trackingId = ''; _this.eventLabels = ['id']; if (!config.trackingId) { throw new Error('[BitAnalytics] Google Analytics config is missing tracking ID.'); @@ -6602,8 +6600,12 @@ var GoogleAnalyticsChannel = /** @class */ (function (_super) { if (config.eventLabels) { _this.eventLabels = config.eventLabels; } - _this.trackingId = config.trackingId; - _this.setUpGa(); + _this.gaInstance = new ga_1.default({ + trackID: config.trackingId, + appVersion: config.appVersion, + appName: config.appName || 'App' + }); + _this.isReady = true; return _this; } /** @@ -6612,49 +6614,26 @@ var GoogleAnalyticsChannel = /** @class */ (function (_super) { * */ GoogleAnalyticsChannel.prototype.postEvent = function (name, params) { - // Default Google Analytics Events - // https://developers.google.com/analytics/devguides/collection/gtagjs/events - // Useful to convert to these, or start with these? if (this.isReady) { - params.event_category = name; + var category = name; + var action = name; + var label = name; + var value = params['value'] || ''; for (var _i = 0, _a = this.eventLabels; _i < _a.length; _i++) { var eventLabel = _a[_i]; if (params[eventLabel]) { - params.event_label = params[eventLabel]; + label = params[eventLabel]; break; } } - this.gtag('event', name, params); + this.gaInstance.event(category, action, label, value); } }; - /** - * - * Private methods - * - */ - /** - * Mimics function in the tracking snippet - */ - GoogleAnalyticsChannel.prototype.gtag = function () { - var args = []; - for (var _i = 0; _i < arguments.length; _i++) { - args[_i] = arguments[_i]; - } - console.log(arguments); - window.dataLayer.push(arguments); - }; - GoogleAnalyticsChannel.prototype.setUpGa = function () { - // From what GA recommends to insert into page - window.dataLayer = window.dataLayer || []; - this.gtag('js', new Date()); - this.gtag('config', this.trackingId); - this.isReady = true; - }; return GoogleAnalyticsChannel; }(channel_1.default)); exports.default = GoogleAnalyticsChannel; -},{"../channel":8}],12:[function(require,module,exports){ +},{"../channel":8,"../external-libs/ga":14}],12:[function(require,module,exports){ "use strict"; var __extends = (this && this.__extends) || (function () { var extendStatics = Object.setPrototypeOf || @@ -6746,6 +6725,207 @@ exports.default = MixpanelChannel; },{}],14:[function(require,module,exports){ "use strict"; +/* + * name: nwjs-analytics -Node-Webkit Google Analytics integration + * version: 1.0.2 + * github: https://github.com/Daaru00/nwjs-analytics + */ +function GA(opt) { + this.apiVersion = opt.apiVersion || '1'; + this.trackID = opt.trackID || 'UA-XXXXXXXX-X'; + this.clientID = opt.clientID || null; + this.userID = opt.userID || null; + this.appName = opt.appName || 'App'; + this.appVersion = opt.appVersion || '1.0.0'; + this.debug = opt.debug || false; + this.performanceTracking = opt.performanceTracking || true; + this.errorTracking = opt.errorTracking || true; + this.userLanguage = opt.userLanguage || "en"; + this.currency = opt.currency || "EUR"; + this.lastScreenName = opt.lastScreenName || ''; +} +GA.prototype.sendRequest = function (data, callback) { + var ga = this; + if (!this.clientID || this.clientID == null) + this.clientID = this.generateClientID(); + if (!this.userID || this.userID == null) + this.userID = this.generateClientID(); + var postData = "v=" + this.apiVersion + + "&an=" + this.appName + + "&av=" + this.appVersion + + "&tid=" + this.trackID + + "&cid=" + this.clientID + + "&sr=" + this.getScreenResolution() + + "&vp=" + this.getViewportSize(); + Object.keys(data).forEach(function (key) { + var val = data[key]; + if (typeof val != "undefined") + postData += "&" + key + "=" + val; + }); + var http = new XMLHttpRequest(); + var url = "https://www.google-analytics.com"; + if (!this.debug) + url += "/collect"; + else + url += "/debug/collect"; + http.open("GET", url + "?" + postData, true); + http.onreadystatechange = function () { + if (ga.debug) + console.log(http.response); + if (http.readyState == 4 && http.status == 200) { + if (callback) + callback(true); + } + else { + if (callback) + callback(false); + } + }; + http.send(); +}; +GA.prototype.generateClientID = function () { + var id = ""; + var possibilities = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"; + for (var i = 0; i < 5; i++) + id += possibilities.charAt(Math.floor(Math.random() * possibilities.length)); + return id; +}; +GA.prototype.getScreenResolution = function () { + return screen.width + "x" + screen.height; +}; +GA.prototype.getColorDept = function () { + return screen.colorDepth + "-bits"; +}; +GA.prototype.getUserAgent = function () { + return navigator.userAgent; +}; +GA.prototype.getViewportSize = function () { + return window.screen.availWidth + "x" + window.screen.availHeight; +}; +/* + * Measurement Protocol + * [https://developers.google.com/analytics/devguides/collection/protocol/v1/devguide] + */ +GA.prototype.screenView = function (screename) { + var data = { + 't': 'screenview', + 'cd': screename + }; + this.sendRequest(data); + this.lastScreenName = screename; +}; +GA.prototype.event = function (category, action, label, value) { + var data = { + 't': 'event', + 'ec': category, + 'ea': action, + }; + if (label) { + data['el'] = label; + } + if (value) { + data['ev'] = value; + } + if (this.lastScreenName) { + data['cd'] = this.lastScreenName; + } + this.sendRequest(data); +}; +GA.prototype.exception = function (msg, fatal) { + var data = { + 't': 'exception', + 'exd': msg, + 'exf': fatal || 0 + }; + this.sendRequest(data); +}; +GA.prototype.timing = function (category, variable, time, label) { + var data = { + 't': 'timing', + 'utc': category, + 'utv': variable, + 'utt': time, + 'utl': label, + }; + this.sendRequest(data); +}, + GA.prototype.ecommerce = { + transactionID: false, + generateTransactionID: function () { + var id = ""; + var possibilities = "0123456789"; + for (var i = 0; i < 5; i++) + id += possibilities.charAt(Math.floor(Math.random() * possibilities.length)); + return id; + }, + transaction: function (total, items) { + var t_id = ""; + if (!this.ecommerce.transactionID) + t_id = this.ecommerce.generateTransactionID(); + else + t_id = this.ecommerce.transactionID; + var data = { + 't': 'transaction', + 'ti': t_id, + 'tr': total, + 'cu': this.currency, + }; + this.sendRequest(data); + items.forEach(function (item) { + var data = { + 't': 'item', + 'ti': t_id, + 'in': item.name, + 'ip': item.price, + 'iq': item.qty, + 'ic': item.id, + 'cu': this.currency + }; + this.sendRequest(data); + }); + } + }, + GA.prototype.custom = function (data) { + this.sendRequest(data); + }; +module.exports = GA; +/* + * Performance Tracking + */ +/*window.addEventListener("load", function() { + + if(ga.performanceTracking) { + setTimeout(function() { + var timing = window.performance.timing; + var userTime = timing.loadEventEnd - timing.navigationStart; + ga.timing("performance", "pageload", userTime); + }, 0); + } + +}, false);*/ +/* + * Error Reporting + */ +/*window.onerror = function (msg, url, lineNo, columnNo, error) { + var message = [ + 'Message: ' + msg, + 'Line: ' + lineNo, + 'Column: ' + columnNo, + 'Error object: ' + JSON.stringify(error) + ].join(' - '); + + if(ga.errorTracking) + { + setTimeout(function() { + ga.exception(message.toString()); + }, 0); + } + + return false; +};*/ + +},{}],15:[function(require,module,exports){ +"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; @@ -6865,7 +7045,7 @@ var LogEventHandlers = /** @class */ (function () { }()); exports.default = LogEventHandlers; -},{"./channel-factory":7}],15:[function(require,module,exports){ +},{"./channel-factory":7}],16:[function(require,module,exports){ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var LogEvent = /** @class */ (function () { diff --git a/src/js/controllers/addressbookAdd.js b/src/js/controllers/addressbookAdd.js index 9529d943e..e33f85725 100644 --- a/src/js/controllers/addressbookAdd.js +++ b/src/js/controllers/addressbookAdd.js @@ -36,9 +36,9 @@ angular.module('copayApp.controllers').controller('addressbookAddController', fu addressbook.address = translated.legacy; } - var channel = "firebase"; - if (platformInfo.isNW) { - channel = "ga"; + var channel = "ga"; + if (platformInfo.isCordova) { + channel = "firebase"; } var log = new window.BitAnalytics.LogEvent("contact_created", [{ "coin": $scope.addressbookEntry.coin diff --git a/src/js/controllers/confirm.js b/src/js/controllers/confirm.js index 03af26fd1..3c0465891 100644 --- a/src/js/controllers/confirm.js +++ b/src/js/controllers/confirm.js @@ -643,9 +643,9 @@ angular.module('copayApp.controllers').controller('confirmController', function( soundService.play('misc/payment_sent.mp3'); } - var channel = "firebase"; - if (platformInfo.isNW) { - channel = "ga"; + var channel = "ga"; + if (platformInfo.isCordova) { + channel = "firebase"; } var log = new window.BitAnalytics.LogEvent("transfer_success", [{ "coin": $scope.wallet.coin, diff --git a/src/js/controllers/preferencesNotifications.js b/src/js/controllers/preferencesNotifications.js index edfb983b5..a9a833ff7 100644 --- a/src/js/controllers/preferencesNotifications.js +++ b/src/js/controllers/preferencesNotifications.js @@ -76,9 +76,9 @@ angular.module('copayApp.controllers').controller('preferencesNotificationsContr emailService.updateEmail(opts); - var channel = "firebase"; - if (platformInfo.isNW) { - channel = "ga"; + var channel = "ga"; + if (platformInfo.isCordova) { + channel = "firebase"; } var log = new window.BitAnalytics.LogEvent("settings_email_notification_toggle", [{ "toggle": $scope.emailNotifications.value diff --git a/src/js/controllers/tab-receive.js b/src/js/controllers/tab-receive.js index 8f25412ec..29acb10d8 100644 --- a/src/js/controllers/tab-receive.js +++ b/src/js/controllers/tab-receive.js @@ -145,9 +145,9 @@ angular.module('copayApp.controllers').controller('tabReceiveController', functi } $scope.paymentReceivedCoin = $scope.wallet.coin; - var channel = "firebase"; - if (platformInfo.isNW) { - channel = "ga"; + var channel = "ga"; + if (platformInfo.isCordova) { + channel = "firebase"; } var log = new window.BitAnalytics.LogEvent("transfer_success", [{ "coin": $scope.wallet.coin, diff --git a/src/js/controllers/walletDetails.js b/src/js/controllers/walletDetails.js index 24237f6c9..241bbce89 100644 --- a/src/js/controllers/walletDetails.js +++ b/src/js/controllers/walletDetails.js @@ -12,9 +12,9 @@ angular.module('copayApp.controllers').controller('walletDetailsController', fun $scope.isAndroid = platformInfo.isAndroid; $scope.isIOS = platformInfo.isIOS; - var channel = "firebase"; - if (platformInfo.isNW) { - channel = "ga"; + var channel = "ga"; + if (platformInfo.isCordova) { + channel = "firebase"; } var log = new window.BitAnalytics.LogEvent("wallet_details_open", [], [channel]); window.BitAnalytics.LogEventHandlers.postEvent(log); diff --git a/src/js/routes.js b/src/js/routes.js index 8277314e5..665294b9b 100644 --- a/src/js/routes.js +++ b/src/js/routes.js @@ -1184,9 +1184,9 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr } }); - var channel = "firebase"; - if (platformInfo.isNW) { - channel = "ga"; + var channel = "ga"; + if (platformInfo.isCordova) { + channel = "firebase"; } // Send a log to test diff --git a/src/js/services/profileService.js b/src/js/services/profileService.js index 4f8710c28..e79b809f6 100644 --- a/src/js/services/profileService.js +++ b/src/js/services/profileService.js @@ -427,9 +427,9 @@ angular.module('copayApp.services') }, function(err, secret) { if (err) return bwcError.cb(err, gettextCatalog.getString('Error creating wallet'), cb); - var channel = "firebase"; - if (platformInfo.isNW) { - channel = "ga"; + var channel = "ga"; + if (platformInfo.isCordova) { + channel = "firebase"; } var log = new window.BitAnalytics.LogEvent("wallet_created", [{ "coin": opts.coin diff --git a/www/index.html b/www/index.html index 4c73317e3..ecc2d923c 100644 --- a/www/index.html +++ b/www/index.html @@ -11,9 +11,8 @@ - Bitcoin.com Wallet - Bitcoin.com Wallet - - + Bitcoin.com Wallet + @@ -31,7 +30,7 @@ - + From 029ac7dd39379b565668e6b6e4db1fbf57810842 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Dominguez Date: Wed, 25 Jul 2018 16:26:06 +0900 Subject: [PATCH 23/30] Fix the QRCode scan. --- src/js/controllers/addressbookAdd.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/js/controllers/addressbookAdd.js b/src/js/controllers/addressbookAdd.js index 9529d943e..89d648b46 100644 --- a/src/js/controllers/addressbookAdd.js +++ b/src/js/controllers/addressbookAdd.js @@ -21,6 +21,9 @@ angular.module('copayApp.controllers').controller('addressbookAddController', fu $timeout(function() { var form = addressbookForm; if (data && form) { + if (data.result) { + data = data.result; + } data = data.replace(/^bitcoin(cash)?:/, ''); form.address.$setViewValue(data); form.address.$isValid = true; From d51ab2bf79f732a9b5d4eb0a4e6404840367f993 Mon Sep 17 00:00:00 2001 From: Sebastiaan Pasma Date: Wed, 25 Jul 2018 15:11:14 +0200 Subject: [PATCH 24/30] only change button color if it contains an address --- www/views/tab-send.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/www/views/tab-send.html b/www/views/tab-send.html index 8b39808db..999b940df 100644 --- a/www/views/tab-send.html +++ b/www/views/tab-send.html @@ -15,7 +15,7 @@
-
-
+
Receive
From b2ed16bf2198e48a6eb0ce9c85e4ba4d1b5b0858 Mon Sep 17 00:00:00 2001 From: Sebastiaan Pasma Date: Thu, 26 Jul 2018 19:38:29 +0200 Subject: [PATCH 27/30] mobile support for send/receive buttons and some refactors to fix the navigation flow. --- src/js/controllers/walletDetails.js | 17 ++++++++++++++++- src/sass/views/tab-home.scss | 6 +++--- src/sass/views/walletDetails.scss | 12 ++++-------- www/views/walletDetails.html | 24 +++++++++++++++++++++--- 4 files changed, 44 insertions(+), 15 deletions(-) diff --git a/src/js/controllers/walletDetails.js b/src/js/controllers/walletDetails.js index 2436da730..c824cbfda 100644 --- a/src/js/controllers/walletDetails.js +++ b/src/js/controllers/walletDetails.js @@ -483,7 +483,14 @@ angular.module('copayApp.controllers').controller('walletDetailsController', fun function rgbToHex(r, g, b) { return "#" + componentToHex(r) + componentToHex(g) + componentToHex(b); } - + $scope.goToSend = function() { + $state.go('tabs.home', { + walletId: $scope.wallet.id + }).then(function () { + $ionicHistory.clearHistory(); + $state.go('tabs.send'); + }); + }; $scope.goToReceive = function() { $state.go('tabs.home', { walletId: $scope.wallet.id @@ -494,4 +501,12 @@ angular.module('copayApp.controllers').controller('walletDetailsController', fun }); }); }; + $scope.goToBuy = function() { + $state.go('tabs.home', { + walletId: $scope.wallet.id + }).then(function () { + $ionicHistory.clearHistory(); + $state.go('tabs.buyandsell'); + }); + }; }); diff --git a/src/sass/views/tab-home.scss b/src/sass/views/tab-home.scss index 680738a3b..708ff4fad 100644 --- a/src/sass/views/tab-home.scss +++ b/src/sass/views/tab-home.scss @@ -70,7 +70,7 @@ } } .buttons { - margin: 6px auto 0px; + margin: 6px auto -12px; max-width: 600px; >.col { padding: 5px 10px; @@ -84,8 +84,8 @@ width: 100%; font-size: 19px; font-weight: bolder; - min-height: 45px; - line-height: 45px; + min-height: auto; + line-height: 36px; } } .wallet-coin-logo { diff --git a/src/sass/views/walletDetails.scss b/src/sass/views/walletDetails.scss index d03530cbb..0536a5735 100644 --- a/src/sass/views/walletDetails.scss +++ b/src/sass/views/walletDetails.scss @@ -132,10 +132,6 @@ position: relative; height: 100%; height: calc(100% - env(safe-area-inset-bottom) * 2); - - &.status-bar { - margin-top: 20px; - } } .bar-header { border: 0; @@ -191,9 +187,9 @@ } } - .buttons { + .send-receive-buttons { max-width: 600px; - margin: 30px auto 0; + margin: 45px auto 0; >.col { padding: 5px 10px; margin-bottom: 0; @@ -206,8 +202,8 @@ width: 100%; font-size: 19px; font-weight: bolder; - min-height: 40px; - line-height: 40px; + min-height: auto; + line-height: 36px; } } } diff --git a/www/views/walletDetails.html b/www/views/walletDetails.html index 2da69fb6e..85aace8fc 100644 --- a/www/views/walletDetails.html +++ b/www/views/walletDetails.html @@ -90,21 +90,23 @@
-
+ +
Receive
-
+
Buy Bitcoin
-
+
Send
+
@@ -212,6 +214,22 @@
+
+
+
+ Receive +
+
+
+
+ Buy Bitcoin +
+
+ Send +
+
+
+
From 3732d21728b92993771ab51aefc114b31a84d5bb Mon Sep 17 00:00:00 2001 From: Sebastiaan Pasma Date: Mon, 30 Jul 2018 09:37:14 +0200 Subject: [PATCH 28/30] send/receive iPhoneX fixes --- src/js/controllers/walletDetails.js | 14 +++++++------- src/sass/views/walletDetails.scss | 19 ++++++++++++------- 2 files changed, 19 insertions(+), 14 deletions(-) diff --git a/src/js/controllers/walletDetails.js b/src/js/controllers/walletDetails.js index c824cbfda..f4f2d2488 100644 --- a/src/js/controllers/walletDetails.js +++ b/src/js/controllers/walletDetails.js @@ -327,16 +327,16 @@ angular.module('copayApp.controllers').controller('walletDetailsController', fun } scrollPos = scrollPos || 0; - var amountHeight = 230 - scrollPos; + var amountHeight = 210 - scrollPos; if (amountHeight < 80) { amountHeight = 80; } var contentMargin = amountHeight; - if (contentMargin > 230) { - contentMargin = 230; + if (contentMargin > 210) { + contentMargin = 210; } - var amountScale = (amountHeight / 230); + var amountScale = (amountHeight / 210); if (amountScale < 0.5) { amountScale = 0.5; } @@ -354,9 +354,9 @@ angular.module('copayApp.controllers').controller('walletDetailsController', fun top = TOP_BALANCE_BUTTON; } - var amountTop = ((amountScale - 0.85) / 0.85) * top; - if (amountTop < -10) { - amountTop = -10; + var amountTop = ((amountScale - 0.80) / 0.80) * top; //0.85 + if (amountTop < -2) { + amountTop = -2; } if (amountTop > top) { amountTop = top; diff --git a/src/sass/views/walletDetails.scss b/src/sass/views/walletDetails.scss index 0536a5735..8d6972f09 100644 --- a/src/sass/views/walletDetails.scss +++ b/src/sass/views/walletDetails.scss @@ -132,10 +132,15 @@ position: relative; height: 100%; height: calc(100% - env(safe-area-inset-bottom) * 2); + + &.status-bar { + margin-top: 20px; + margin-top: env(safe-area-inset-top); + } } .bar-header { border: 0; - background: none; + background: rgb(238, 182, 64); .title, .button { color: #fff; } @@ -143,13 +148,13 @@ background-color: transparent; } } - //.nav-bar-block, .bar { - //background-color: inherit !important; - //} + .nav-bar-block, .bar { + background-color: inherit !important; + } ion-content { &.collapsible { - margin-top: 210px; + margin-top: 230px; } padding-top: 0; @@ -189,7 +194,7 @@ .send-receive-buttons { max-width: 600px; - margin: 45px auto 0; + margin: 25px auto 0; >.col { padding: 5px 10px; margin-bottom: 0; @@ -211,7 +216,7 @@ width: 100%; text-align: center; color: #fff; - height: 210px; + height: 230px; padding-top: 40px; display: block; align-items: center; From 734153ec5b76cd4f8a5c130d4e534bbdcf62ba72 Mon Sep 17 00:00:00 2001 From: Sebastiaan Pasma Date: Mon, 30 Jul 2018 15:17:15 +0200 Subject: [PATCH 29/30] more fixes on the send/receive on Android & iOS / removed some unused code --- src/js/controllers/walletDetails.js | 12 ++---------- src/sass/views/walletDetails.scss | 4 +++- www/views/walletDetails.html | 8 ++++---- 3 files changed, 9 insertions(+), 15 deletions(-) diff --git a/src/js/controllers/walletDetails.js b/src/js/controllers/walletDetails.js index f4f2d2488..ffbc070f5 100644 --- a/src/js/controllers/walletDetails.js +++ b/src/js/controllers/walletDetails.js @@ -12,13 +12,6 @@ angular.module('copayApp.controllers').controller('walletDetailsController', fun $scope.isAndroid = platformInfo.isAndroid; $scope.isIOS = platformInfo.isIOS; - $scope.currencySymbols = { - 'EUR': '€', - 'GBP': '£', - 'USD': '$', - 'YEN' : '' - }; - var channel = "firebase"; if (platformInfo.isNW) { channel = "ga"; @@ -354,7 +347,7 @@ angular.module('copayApp.controllers').controller('walletDetailsController', fun top = TOP_BALANCE_BUTTON; } - var amountTop = ((amountScale - 0.80) / 0.80) * top; //0.85 + var amountTop = ((amountScale - 0.80) / 0.80) * top; if (amountTop < -2) { amountTop = -2; } @@ -365,8 +358,7 @@ angular.module('copayApp.controllers').controller('walletDetailsController', fun var t = amountTop; $scope.altAmountOpacity = (amountHeight - 100) / 80; - - $scope.buttonsOpacity = (amountHeight - 150)/80; + $scope.buttonsOpacity = (amountHeight - 140) / 70; $window.requestAnimationFrame(function() { $scope.amountHeight = amountHeight + 'px'; $scope.contentMargin = contentMargin + 'px'; diff --git a/src/sass/views/walletDetails.scss b/src/sass/views/walletDetails.scss index 8d6972f09..6b760bbc4 100644 --- a/src/sass/views/walletDetails.scss +++ b/src/sass/views/walletDetails.scss @@ -194,7 +194,9 @@ .send-receive-buttons { max-width: 600px; - margin: 25px auto 0; + position: absolute; + bottom: 20px; + >.col { padding: 5px 10px; margin-bottom: 0; diff --git a/www/views/walletDetails.html b/www/views/walletDetails.html index 85aace8fc..e29cd5c51 100644 --- a/www/views/walletDetails.html +++ b/www/views/walletDetails.html @@ -91,7 +91,7 @@
-
+
Receive @@ -214,17 +214,17 @@
-
+
Receive
-
+
Buy Bitcoin
-
+
Send
From ed291b1ac5f706315c5e074e1389cc9e6b3f1fbc Mon Sep 17 00:00:00 2001 From: Sebastiaan Pasma Date: Mon, 30 Jul 2018 15:25:52 +0200 Subject: [PATCH 30/30] removed currencySymbolService and it's references --- src/js/controllers/walletDetails.js | 7 +- src/js/services/currencySymbolService.js | 195 ----------------------- www/views/walletDetails.html | 16 +- 3 files changed, 9 insertions(+), 209 deletions(-) delete mode 100644 src/js/services/currencySymbolService.js diff --git a/src/js/controllers/walletDetails.js b/src/js/controllers/walletDetails.js index ffbc070f5..3e92b2a40 100644 --- a/src/js/controllers/walletDetails.js +++ b/src/js/controllers/walletDetails.js @@ -1,6 +1,6 @@ 'use strict'; -angular.module('copayApp.controllers').controller('walletDetailsController', function($scope, $rootScope, $interval, $timeout, $filter, $log, $ionicModal, $ionicPopover, $state, $stateParams, $ionicHistory, profileService, lodash, configService, currencySymbolService, platformInfo, walletService, txpModalService, externalLinkService, popupService, addressbookService, storageService, $ionicScrollDelegate, $window, bwcError, gettextCatalog, timeService, feeService, appConfigService, rateService) { +angular.module('copayApp.controllers').controller('walletDetailsController', function($scope, $rootScope, $interval, $timeout, $filter, $log, $ionicModal, $ionicPopover, $state, $stateParams, $ionicHistory, profileService, lodash, configService, platformInfo, walletService, txpModalService, externalLinkService, popupService, addressbookService, storageService, $ionicScrollDelegate, $window, bwcError, gettextCatalog, timeService, feeService, appConfigService, rateService) { var HISTORY_SHOW_LIMIT = 10; var currentTxHistoryPage = 0; @@ -256,11 +256,6 @@ angular.module('copayApp.controllers').controller('walletDetailsController', fun return !tx.confirmations || tx.confirmations === 0; }; - $scope.currencySymbol = function(code) { - var symbol = currencySymbolService.getCurrencySymbol(code); - return symbol?symbol:""; - }; - $scope.showMore = function() { $timeout(function() { currentTxHistoryPage++; diff --git a/src/js/services/currencySymbolService.js b/src/js/services/currencySymbolService.js deleted file mode 100644 index 029cd9eb2..000000000 --- a/src/js/services/currencySymbolService.js +++ /dev/null @@ -1,195 +0,0 @@ -'use strict'; - -angular.module('copayApp.services').factory('currencySymbolService', function($log) { - var root = {}; - root.currencySymbols = { - 'AED': 'د.إ', - 'AFN': '؋', - 'ALL': 'L', - 'AMD': '֏', - 'ANG': 'ƒ', - 'AOA': 'Kz', - 'ARS': '$', - 'AUD': '$', - 'AWG': 'ƒ', - 'AZN': '₼', - 'BAM': 'KM', - 'BBD': '$', - 'BDT': '৳', - 'BGN': 'лв', - 'BHD': '.د.ب', - 'BIF': 'FBu', - 'BMD': '$', - 'BND': '$', - 'BOB': '$b', - 'BRL': 'R$', - 'BSD': '$', - 'BTC': '฿', - 'BTN': 'Nu.', - 'BWP': 'P', - 'BYR': 'Br', - 'BYN': 'Br', - 'BZD': 'BZ$', - 'CAD': '$', - 'CDF': 'FC', - 'CHF': 'CHF', - 'CLP': '$', - 'CNY': '¥', - 'COP': '$', - 'CRC': '₡', - 'CUC': '$', - 'CUP': '₱', - 'CVE': '$', - 'CZK': 'Kč', - 'DJF': 'Fdj', - 'DKK': 'kr', - 'DOP': 'RD$', - 'DZD': 'دج', - 'EEK': 'kr', - 'EGP': '£', - 'ERN': 'Nfk', - 'ETB': 'Br', - 'ETH': 'Ξ', - 'EUR': '€', - 'FJD': '$', - 'FKP': '£', - 'GBP': '£', - 'GEL': '₾', - 'GGP': '£', - 'GHC': '₵', - 'GHS': 'GH₵', - 'GIP': '£', - 'GMD': 'D', - 'GNF': 'FG', - 'GTQ': 'Q', - 'GYD': '$', - 'HKD': '$', - 'HNL': 'L', - 'HRK': 'kn', - 'HTG': 'G', - 'HUF': 'Ft', - 'IDR': 'Rp', - 'ILS': '₪', - 'IMP': '£', - 'INR': '₹', - 'IQD': 'ع.د', - 'IRR': '﷼', - 'ISK': 'kr', - 'JEP': '£', - 'JMD': 'J$', - 'JOD': 'JD', - 'JPY': '¥', - 'KES': 'KSh', - 'KGS': 'лв', - 'KHR': '៛', - 'KMF': 'CF', - 'KPW': '₩', - 'KRW': '₩', - 'KWD': 'KD', - 'KYD': '$', - 'KZT': 'лв', - 'LAK': '₭', - 'LBP': '£', - 'LKR': '₨', - 'LRD': '$', - 'LSL': 'M', - 'LTC': 'Ł', - 'LTL': 'Lt', - 'LVL': 'Ls', - 'LYD': 'LD', - 'MAD': 'MAD', - 'MDL': 'lei', - 'MGA': 'Ar', - 'MKD': 'ден', - 'MMK': 'K', - 'MNT': '₮', - 'MOP': 'MOP$', - 'MRO': 'UM', - 'MRU': 'UM', - 'MUR': '₨', - 'MVR': 'Rf', - 'MWK': 'MK', - 'MXN': '$', - 'MYR': 'RM', - 'MZN': 'MT', - 'NAD': '$', - 'NGN': '₦', - 'NIO': 'C$', - 'NOK': 'kr', - 'NPR': '₨', - 'NZD': '$', - 'OMR': '﷼', - 'PAB': 'B/.', - 'PEN': 'S/.', - 'PGK': 'K', - 'PHP': '₱', - 'PKR': '₨', - 'PLN': 'zł', - 'PYG': 'Gs', - 'QAR': '﷼', - 'RMB': '¥', - 'RON': 'lei', - 'RSD': 'Дин.', - 'RUB': '₽', - 'RWF': 'R₣', - 'SAR': '﷼', - 'SBD': '$', - 'SCR': '₨', - 'SDG': 'ج.س.', - 'SEK': 'kr', - 'SGD': '$', - 'SHP': '£', - 'SLL': 'Le', - 'SOS': 'S', - 'SRD': '$', - 'SSP': '£', - 'STD': 'Db', - 'STN': 'Db', - 'SVC': '$', - 'SYP': '£', - 'SZL': 'E', - 'THB': '฿', - 'TJS': 'SM', - 'TMT': 'T', - 'TND': 'د.ت', - 'TOP': 'T$', - 'TRL': '₤', - 'TRY': '₺', - 'TTD': 'TT$', - 'TVD': '$', - 'TWD': 'NT$', - 'TZS': 'TSh', - 'UAH': '₴', - 'UGX': 'USh', - 'USD': '$', - 'UYU': '$U', - 'UZS': 'лв', - 'VEF': 'Bs', - 'VND': '₫', - 'VUV': 'VT', - 'WST': 'WS$', - 'XAF': 'FCFA', - 'XBT': 'Ƀ', - 'XCD': '$', - 'XOF': 'CFA', - 'XPF': '₣', - 'YER': '﷼', - 'ZAR': 'R', - 'ZWD': 'Z$' - }; - - root.getCurrencySymbol = function(code) { - if (!code) return false; - - code = code.toUpperCase(); - - if (root.currencySymbols[code]) { - return root.currencySymbols[code]; - } - $log.debug("Currency symbol for "+code+" not found"); - return false; - }; - - return root; - -}); \ No newline at end of file diff --git a/www/views/walletDetails.html b/www/views/walletDetails.html index e29cd5c51..f9cf662cb 100644 --- a/www/views/walletDetails.html +++ b/www/views/walletDetails.html @@ -34,7 +34,7 @@ on-hold="hideToggle()" ng-style="{'transform': amountScale}" ng-class="{amount__balance: amountIsCollapsible}"> - {{currencySymbol(status.alternativeIsoCode)}} {{status.totalBalanceAlternative}} {{status.alternativeIsoCode}} + {{status.totalBalanceAlternative}} {{status.alternativeIsoCode}}
- {{currencySymbol(status.alternativeIsoCode)}} {{status.totalBalanceAlternative}} {{status.alternativeIsoCode}} + {{status.totalBalanceAlternative}} {{status.alternativeIsoCode}}
@@ -86,7 +86,7 @@   - {{currencySymbol(status.alternativeIsoCode)}} {{status.spendableBalanceAlternative}} {{status.alternativeIsoCode}} + {{status.spendableBalanceAlternative}} {{status.alternativeIsoCode}}
@@ -148,7 +148,7 @@ class="size-14 amount-alternative" ng-if="status.totalBalanceAlternative && wallet.network == 'livenet'" ng-style="{opacity: altAmountOpacity}"> - {{currencySymbol(status.alternativeIsoCode)}} {{status.totalBalanceAlternative}} {{status.alternativeIsoCode}} + {{status.totalBalanceAlternative}} {{status.alternativeIsoCode}}
@@ -158,7 +158,7 @@ on-hold="hideToggle()" ng-style="{'transform': amountScale}" ng-class="{amount__balance: amountIsCollapsible}"> - {{currencySymbol(status.alternativeIsoCode)}} {{status.totalBalanceAlternative}} {{status.alternativeIsoCode}} + {{status.totalBalanceAlternative}} {{status.alternativeIsoCode}}
  - {{currencySymbol(status.alternativeIsoCode)}} {{status.spendableBalanceAlternative}} {{status.alternativeIsoCode}} + {{status.spendableBalanceAlternative}} {{status.alternativeIsoCode}}
@@ -205,7 +205,7 @@