From 236a93d69d9780b94ec04173d021f7c7806b630c Mon Sep 17 00:00:00 2001 From: Sebastiaan Pasma Date: Mon, 16 Jul 2018 17:21:15 +0200 Subject: [PATCH 001/256] 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 cc907251f75493d0ab0f5536a1fd9f924e56322b Mon Sep 17 00:00:00 2001 From: Brendon Duncan Date: Wed, 18 Jul 2018 17:20:59 +1200 Subject: [PATCH 007/256] Removing unused services, and making string translatable. --- i18n/po/template.pot | 4 ++++ src/js/controllers/amount.js | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/i18n/po/template.pot b/i18n/po/template.pot index a23e5dbae..45a4fbd44 100644 --- a/i18n/po/template.pot +++ b/i18n/po/template.pot @@ -3699,3 +3699,7 @@ msgstr "" #: www/views/includes/walletInfo.html:18 msgid "{{wallet.m}}-of-{{wallet.n}}" msgstr "" + +#: src/js/controllers/amount.js:49 +msgid "Address doesn\'t contain currency information, please make sure you are sending the correct currency." +msgstr "" \ No newline at end of file diff --git a/src/js/controllers/amount.js b/src/js/controllers/amount.js index 52695e829..1c91baf97 100644 --- a/src/js/controllers/amount.js +++ b/src/js/controllers/amount.js @@ -1,6 +1,6 @@ 'use strict'; -angular.module('copayApp.controllers').controller('amountController', function($scope, $filter, $timeout, $ionicModal, $ionicScrollDelegate, $ionicHistory, storageService, walletService, gettextCatalog, platformInfo, lodash, configService, rateService, $stateParams, $window, $state, $log, txFormatService, ongoingProcess, popupService, bwcError, payproService, profileService, bitcore, amazonService, nodeWebkitService) { +angular.module('copayApp.controllers').controller('amountController', function($scope, $filter, $timeout, $ionicModal, $ionicScrollDelegate, $ionicHistory, walletService, gettextCatalog, platformInfo, lodash, configService, rateService, $stateParams, $window, $state, $log, txFormatService, ongoingProcess, popupService, profileService, nodeWebkitService) { var _id; var unitToSatoshi; @@ -46,7 +46,7 @@ angular.module('copayApp.controllers').controller('amountController', function($ if (data.stateParams.noPrefix) { $scope.showWarningMessage = data.stateParams.noPrefix != 0; if ($scope.showWarningMessage) { - var message = 'Address doesn\'t contain currency information, please make sure you are sending the correct currency.'; + var message = gettextCatalog.getString('Address doesn\'t contain currency information, please make sure you are sending the correct currency.'); popupService.showAlert('', message, function() {}, 'Ok'); } } From 0db57f997a6d8e374544a445ce050be5734a1508 Mon Sep 17 00:00:00 2001 From: Brendon Duncan Date: Wed, 18 Jul 2018 18:24:49 +1200 Subject: [PATCH 008/256] First successful test, instantiating an amountController. --- src/js/controllers/amount.spec.js | 55 ++++++++++++++++++++ src/js/services/secureStorageService.spec.js | 6 +-- src/js/services/storageService.spec.js | 4 +- test/karma.conf.js | 2 + 4 files changed, 62 insertions(+), 5 deletions(-) create mode 100644 src/js/controllers/amount.spec.js diff --git a/src/js/controllers/amount.spec.js b/src/js/controllers/amount.spec.js new file mode 100644 index 000000000..1e5342cd9 --- /dev/null +++ b/src/js/controllers/amount.spec.js @@ -0,0 +1,55 @@ +fdescribe('amountController', function(){ + var $controller, + $rootScope, + platformInfo, + $stateParams; + + + + beforeEach(function(){ + module('ngLodash'); + module('copayApp.controllers'); + + platformInfo = { + isChromeApp: false, + isAndroid: false, + isIos: true + }; + + $stateParams = {}; + + inject(function(_$controller_, _$rootScope_){ + // The injector unwraps the underscores (_) from around the parameter names when matching + $controller = _$controller_; + $rootScope = _$rootScope_; + }); + + + + }); + + it('something', function() { + var $scope = $rootScope.$new(); + var amountController = $controller('amountController', { + configService: {}, + gettextCatalog: {}, + $ionicHistory: {}, + $ionicModal: {}, + $ionicScrollDelegate: {}, + nodeWebkitService: {}, + ongoingProcess: {}, + platformInfo: platformInfo, + profileService: {}, + popupService: {}, + rateService: {}, + $scope: $scope, + $state: {}, + $stateParams: $stateParams, + txFormatService: {}, + walletService: {} + }); + + expect(true).toBe(true); + }); + +}); \ No newline at end of file diff --git a/src/js/services/secureStorageService.spec.js b/src/js/services/secureStorageService.spec.js index abfa5d947..8d2842a6a 100644 --- a/src/js/services/secureStorageService.spec.js +++ b/src/js/services/secureStorageService.spec.js @@ -1,4 +1,4 @@ -describe('secureStorageService in browser', function(){ +xdescribe('secureStorageService in browser', function(){ var localStorage, sss; @@ -100,7 +100,7 @@ describe('secureStorageService in browser', function(){ }); -describe('secureStorageService on desktop', function(){ +xdescribe('secureStorageService on desktop', function(){ var desktopSss, sss; @@ -202,7 +202,7 @@ describe('secureStorageService on desktop', function(){ }); -describe('secureStorageService on mobile', function(){ +xdescribe('secureStorageService on mobile', function(){ var mobileSss, sss; diff --git a/src/js/services/storageService.spec.js b/src/js/services/storageService.spec.js index 493678b97..cc3ad285d 100644 --- a/src/js/services/storageService.spec.js +++ b/src/js/services/storageService.spec.js @@ -414,7 +414,7 @@ xdescribe('storageService on desktop', function(){ }); -describe('storageService on desktop using local storage', function(){ +xdescribe('storageService on desktop using local storage', function(){ var appConfig, localStorageServiceMock, log, @@ -614,7 +614,7 @@ describe('storageService on desktop using local storage', function(){ }); -describe('storageService on mobile', function(){ +xdescribe('storageService on mobile', function(){ var appConfig, expectedOldProfileSavedToSecure, expectedOldProfileMergedWithSecure, diff --git a/test/karma.conf.js b/test/karma.conf.js index 002d40c91..b4f64af73 100644 --- a/test/karma.conf.js +++ b/test/karma.conf.js @@ -17,6 +17,8 @@ module.exports = function(config) { files: [ 'node_modules/angular/angular.js', + 'bitanalytics/bitanalytics-0.1.0.js', + // From Gruntfile.js 'bower_components/qrcode-generator/js/qrcode.js', 'bower_components/qrcode-generator/js/qrcode_UTF8.js', From 8725adb959f38d971cfecf05bbd067b6baf3186b Mon Sep 17 00:00:00 2001 From: Sebastiaan Pasma Date: Wed, 18 Jul 2018 09:02:52 +0200 Subject: [PATCH 009/256] 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 3df28360819870a3ab62a858f9866f1407aafe8a Mon Sep 17 00:00:00 2001 From: Brendon Duncan Date: Wed, 18 Jul 2018 20:26:20 +1200 Subject: [PATCH 010/256] Successful test with amountController, using beforeEnter. --- src/js/controllers/amount.spec.js | 62 +++++++++++++++++++++++++++---- 1 file changed, 54 insertions(+), 8 deletions(-) diff --git a/src/js/controllers/amount.spec.js b/src/js/controllers/amount.spec.js index 1e5342cd9..ed64da836 100644 --- a/src/js/controllers/amount.spec.js +++ b/src/js/controllers/amount.spec.js @@ -1,7 +1,12 @@ -fdescribe('amountController', function(){ - var $controller, +describe('amountController', function(){ + var configCache, + configService, + $controller, + $ionicHistory, $rootScope, platformInfo, + profileService, + rateService, $stateParams; @@ -10,12 +15,34 @@ fdescribe('amountController', function(){ module('ngLodash'); module('copayApp.controllers'); + configCache = { + wallet: { + settings: { + + } + } + }; + + + configService = jasmine.createSpyObj(['getDefaults','getSync']); + configService.getDefaults.and.returnValue({ + bitcoinCashAlias: 'bch', + bitcoinAlias: 'btc' + }); + configService.getSync.and.returnValue(configCache); + + $ionicHistory = jasmine.createSpyObj(['backView']); + platformInfo = { isChromeApp: false, isAndroid: false, isIos: true }; + profileService = jasmine.createSpyObj(['getWallets']); + + rateService = jasmine.createSpyObj(['fromFiat', 'whenAvailable']); + $stateParams = {}; inject(function(_$controller_, _$rootScope_){ @@ -28,20 +55,30 @@ fdescribe('amountController', function(){ }); - it('something', function() { + it('receives fromWalletId and toAddress.', function() { + + var backView = { + stateName: 'ignoreme' + }; + $ionicHistory.backView.and.returnValue(backView); + profileService.getWallets.and.returnValue([{}]); + rateService.fromFiat.and.returnValue(12); // satoshis or coins? + var $scope = $rootScope.$new(); + + var amountController = $controller('amountController', { - configService: {}, + configService: configService, gettextCatalog: {}, - $ionicHistory: {}, + $ionicHistory: $ionicHistory, $ionicModal: {}, $ionicScrollDelegate: {}, nodeWebkitService: {}, ongoingProcess: {}, platformInfo: platformInfo, - profileService: {}, + profileService: profileService, popupService: {}, - rateService: {}, + rateService: rateService, $scope: $scope, $state: {}, $stateParams: $stateParams, @@ -49,7 +86,16 @@ fdescribe('amountController', function(){ walletService: {} }); - expect(true).toBe(true); + var data = { + stateParams: { + fromWalletId: 'fd56c1e7-e3ac-4fd9-8afc-27b9c1b3718b', + toAddress: 'qrup46avn8t466xxwlzs4qelht7cnwvesv2e29wf7s' + } + }; + $scope.$emit('$ionicView.beforeEnter', data); + + expect($scope.fromWalletId).toBe('fd56c1e7-e3ac-4fd9-8afc-27b9c1b3718b'); + expect($scope.toAddress).toBe('qrup46avn8t466xxwlzs4qelht7cnwvesv2e29wf7s'); }); }); \ No newline at end of file From 8a0575d238690d7dec073b8adcbc120fe0923693 Mon Sep 17 00:00:00 2001 From: Sam Cheng Hung Date: Wed, 18 Jul 2018 16:41:52 +0800 Subject: [PATCH 011/256] Add empty view and controller for review transaction route --- src/js/controllers/review.js | 5 + src/js/routes.js | 12 + www/css/main.css | 1162 ++++++++++++++++++---------------- www/index.html | 7 +- www/views/review.html | 45 ++ 5 files changed, 670 insertions(+), 561 deletions(-) create mode 100644 src/js/controllers/review.js create mode 100644 www/views/review.html diff --git a/src/js/controllers/review.js b/src/js/controllers/review.js new file mode 100644 index 000000000..1effff0ba --- /dev/null +++ b/src/js/controllers/review.js @@ -0,0 +1,5 @@ +'use strict'; + +angular.module('copayApp.controllers').controller('reviewController', 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) { + +}); diff --git a/src/js/routes.js b/src/js/routes.js index 8277314e5..79b88e2f7 100644 --- a/src/js/routes.js +++ b/src/js/routes.js @@ -316,6 +316,18 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr } } }) + .state('tabs.send.review', { + url: '/review', + views: { + 'tab-send@tabs': { + controller: 'reviewController', + templateUrl: 'views/review.html' + } + }, + params: { + paypro: null + } + }) /* * diff --git a/www/css/main.css b/www/css/main.css index b4e67edac..a87bc4be9 100644 --- a/www/css/main.css +++ b/www/css/main.css @@ -9970,7 +9970,7 @@ ion-nav-bar.hide { .card { margin: 20px 14px; } -ion-view.deflash-blue:before, ion-view#view-amount:before, ion-view#view-confirm:before, ion-view#copayers-invitation:before, ion-view#tab-home:before, ion-view#tab-receive:before, ion-view#tab-send:before, ion-view.settings:before, ion-view#bitpayCard:before, ion-view#bitpayCard-intro:before, ion-view#view-address-book:before, ion-view#addresses:before, ion-view#send-feedback:before, ion-view#choose-fee-level:before, ion-view#txp-details:before, ion-view#coinbase:before, ion-view#glidera:before, ion-view#amazon:before, ion-view#mercadolibre:before, ion-view#custom-amount:before { +ion-view.deflash-blue:before, ion-view#view-amount:before, ion-view#view-confirm:before, ion-view#copayers-invitation:before, ion-view#tab-home:before, ion-view#tab-receive:before, ion-view#tab-send:before, ion-view.settings:before, ion-view#bitpayCard:before, ion-view#bitpayCard-intro:before, ion-view#view-address-book:before, ion-view#addresses:before, ion-view#choose-fee-level:before, ion-view#txp-details:before, ion-view#coinbase:before, ion-view#glidera:before, ion-view#amazon:before, ion-view#mercadolibre:before, ion-view#custom-amount:before { content: " "; display: block; position: absolute; @@ -9980,7 +9980,7 @@ ion-view.deflash-blue:before, ion-view#view-amount:before, ion-view#view-confirm height: 44px; background-color: #fab915; } -.platform-ios.platform-cordova:not(.fullscreen) ion-view.deflash-blue:before, .platform-ios.platform-cordova:not(.fullscreen) ion-view#view-amount:before, .platform-ios.platform-cordova:not(.fullscreen) ion-view#view-confirm:before, .platform-ios.platform-cordova:not(.fullscreen) ion-view#copayers-invitation:before, .platform-ios.platform-cordova:not(.fullscreen) ion-view#tab-home:before, .platform-ios.platform-cordova:not(.fullscreen) ion-view#tab-receive:before, .platform-ios.platform-cordova:not(.fullscreen) ion-view#tab-send:before, .platform-ios.platform-cordova:not(.fullscreen) ion-view.settings:before, .platform-ios.platform-cordova:not(.fullscreen) ion-view#bitpayCard:before, .platform-ios.platform-cordova:not(.fullscreen) ion-view#bitpayCard-intro:before, .platform-ios.platform-cordova:not(.fullscreen) ion-view#view-address-book:before, .platform-ios.platform-cordova:not(.fullscreen) ion-view#addresses:before, .platform-ios.platform-cordova:not(.fullscreen) ion-view#send-feedback:before, .platform-ios.platform-cordova:not(.fullscreen) ion-view#choose-fee-level:before, .platform-ios.platform-cordova:not(.fullscreen) ion-view#txp-details:before, .platform-ios.platform-cordova:not(.fullscreen) ion-view#coinbase:before, .platform-ios.platform-cordova:not(.fullscreen) ion-view#glidera:before, .platform-ios.platform-cordova:not(.fullscreen) ion-view#amazon:before, .platform-ios.platform-cordova:not(.fullscreen) ion-view#mercadolibre:before, .platform-ios.platform-cordova:not(.fullscreen) ion-view#custom-amount:before { +.platform-ios.platform-cordova:not(.fullscreen) ion-view.deflash-blue:before, .platform-ios.platform-cordova:not(.fullscreen) ion-view#view-amount:before, .platform-ios.platform-cordova:not(.fullscreen) ion-view#view-confirm:before, .platform-ios.platform-cordova:not(.fullscreen) ion-view#copayers-invitation:before, .platform-ios.platform-cordova:not(.fullscreen) ion-view#tab-home:before, .platform-ios.platform-cordova:not(.fullscreen) ion-view#tab-receive:before, .platform-ios.platform-cordova:not(.fullscreen) ion-view#tab-send:before, .platform-ios.platform-cordova:not(.fullscreen) ion-view.settings:before, .platform-ios.platform-cordova:not(.fullscreen) ion-view#bitpayCard:before, .platform-ios.platform-cordova:not(.fullscreen) ion-view#bitpayCard-intro:before, .platform-ios.platform-cordova:not(.fullscreen) ion-view#view-address-book:before, .platform-ios.platform-cordova:not(.fullscreen) ion-view#addresses:before, .platform-ios.platform-cordova:not(.fullscreen) ion-view#choose-fee-level:before, .platform-ios.platform-cordova:not(.fullscreen) ion-view#txp-details:before, .platform-ios.platform-cordova:not(.fullscreen) ion-view#coinbase:before, .platform-ios.platform-cordova:not(.fullscreen) ion-view#glidera:before, .platform-ios.platform-cordova:not(.fullscreen) ion-view#amazon:before, .platform-ios.platform-cordova:not(.fullscreen) ion-view#mercadolibre:before, .platform-ios.platform-cordova:not(.fullscreen) ion-view#custom-amount:before { height: 64px; } .just-a-hint, .icon.bp-arrow-right, .icon.bp-arrow-down, .icon.bp-arrow-up { @@ -10071,10 +10071,12 @@ ion-view.deflash-blue:before, ion-view#view-amount:before, ion-view#view-confirm .loading .spinner svg { margin-top: 0; } -.button.button-primary.button-standard, .button.button-secondary.button-standard, .button.button-light.button-standard, .button.button-assertive.button-standard, +.button.button-primary.button-standard, .button.button-secondary.button-standard, .button.button-light.button-standard, .button.button-white.button-standard, .button.button-green.button-standard, .button.button-assertive.button-standard, .onboarding .button.button-primary.button-standard, .onboarding .button.button-secondary.button-standard, .onboarding .button.button-light.button-standard, +.onboarding .button.button-white.button-standard, +.onboarding .button.button-green.button-standard, .onboarding .button.button-assertive.button-standard { width: 85%; max-width: 300px; @@ -10118,10 +10120,12 @@ ion-view.deflash-blue:before, ion-view#view-amount:before, ion-view#view-confirm box-shadow: none; color: #fff; } -.button.button-primary.button-standard + .button-standard, .button.button-secondary.button-standard + .button-standard, .button.button-light.button-standard + .button-standard, .button.button-assertive.button-standard + .button-standard, +.button.button-primary.button-standard + .button-standard, .button.button-secondary.button-standard + .button-standard, .button.button-light.button-standard + .button-standard, .button.button-white.button-standard + .button-standard, .button.button-green.button-standard + .button-standard, .button.button-assertive.button-standard + .button-standard, .onboarding .button.button-primary.button-standard + .button-standard, .onboarding .button.button-secondary.button-standard + .button-standard, .onboarding .button.button-light.button-standard + .button-standard, +.onboarding .button.button-white.button-standard + .button-standard, +.onboarding .button.button-green.button-standard + .button-standard, .onboarding .button.button-assertive.button-standard + .button-standard { margin-top: 1rem; } @@ -10183,8 +10187,67 @@ ion-view.deflash-blue:before, ion-view#view-amount:before, ion-view#view-confirm font-size: 0.7em !important; display: inline !important; } -.button.button-full { - display: block; } +.button { + border-radius: 6px; } + .button.button-full { + display: block; } + .button-green { + border-color: #FFF; + background-color: #719561; + color: #FFF; + border: 0px; + box-shadow: 0 2px 11px 0 #C1C1C1; } + .button-green:hover { + color: #FFF; + text-decoration: none; } + .button-green.active, .button-green.activated { + border-color: #FFF; + background-color: #606060; } + .button-green.button-clear { + border-color: transparent; + background: none; + box-shadow: none; + color: #FFF; } + .button-green.button-icon { + border-color: transparent; + background: none; } + .button-green.button-outline { + border-color: #C1C1C1; + background: transparent; + color: #C1C1C1; } + .button-green.button-outline.active, .button-green.button-outline.activated { + background-color: #C1C1C1; + box-shadow: none; + color: #fff; } + .button-white { + border-color: #C1C1C1; + background-color: #FFF; + color: #606060; + box-shadow: 0 2px 11px 0 #C1C1C1; } + .button-white:hover { + color: #606060; + text-decoration: none; } + .button-white.active, .button-white.activated { + border-color: #FFF; + background-color: #C1C1C1; } + .button-white.button-clear { + border-color: transparent; + background: none; + box-shadow: none; + color: #FFF; } + .button-white.button-icon { + border-color: transparent; + background: none; } + .button-white.button-outline { + border-color: #C1C1C1; + background: transparent; + color: #C1C1C1; } + .button-white.button-outline.active, .button-white.button-outline.activated { + background-color: #C1C1C1; + box-shadow: none; + color: #fff; } + .button-white.activated { + color: #FFF; } .button-clear { background: none !important; } @@ -10197,6 +10260,22 @@ textarea.d-block { display: block; width: 100%; } +qrcode { + position: relative; } + qrcode.qr-overlay::before { + content: ""; + background-size: 100% 100%; + display: block; + left: 88px; + margin-top: 88px; + width: 44px; + height: 44px; + position: absolute; } + qrcode.qr-overlay--bch::before { + background-image: url("../img/qr-overlay-bch.png"); } + qrcode.qr-overlay--btc::before { + background-image: url("../img/qr-overlay-btc.png"); } + .center-block { float: none; margin: 0 auto; } @@ -10237,6 +10316,10 @@ textarea.d-block { font-weight: 700; } #tab-home .card > .item-heading .icon, #tab-home .list > .item-heading .icon, #tab-send .card > .item-heading .icon, #tab-send .list > .item-heading .icon { color: #667; } + #tab-home .card > .item-heading .subtitle, #tab-home .list > .item-heading .subtitle, #tab-send .card > .item-heading .subtitle, #tab-send .list > .item-heading .subtitle { + color: #667; + font-size: 12px; + font-weight: 300; } #view-add .item { margin-bottom: 10px; @@ -10260,349 +10343,345 @@ textarea.d-block { #view-add .bg.join { padding: 10px; } -#view-amount .recipient-label { - font-size: 14px; - padding-bottom: 0; - color: #667; } - -#view-amount .item-no-bottom-border + .item { - border-top: 0; } - -#view-amount .icon-bitpay-card { - background-image: url("../img/icon-bitpay.svg"); } - -#view-amount .icon-amazon { - background-image: url("../img/icon-amazon.svg"); } - -@media (max-width: 480px) { - #view-amount .bitcoin-address { - font-size: 13px; - padding-left: 48px; } - #view-amount .bitcoin-address .icon { - left: 8px; - font-size: 24px; } - #view-amount .bitcoin-address .big-icon-svg { - left: 5px; } - #view-amount .bitcoin-address .big-icon-svg > .bg { - width: 30px; - height: 30px; - box-shadow: none; } } - -@media (max-width: 320px) { - #view-amount .bitcoin-address > span:last-child { - margin-left: -2px; } } - -#view-amount .send-gravatar { - left: 11px; - position: absolute; - top: 10px; } - -#view-amount .amount span input { - display: inline; - width: 120px; } - -#view-amount .amount-pane-recipient { - position: absolute; - top: 95px; - bottom: 0; - width: 100%; - background-color: #fff; - padding: 0 16px; } - #view-amount .amount-pane-recipient .amount-bar { - padding: 24px 0; - font-size: 18px; } - @media (max-height: 480px) { - #view-amount .amount-pane-recipient .amount-bar { - padding: 0px; } } - @media (max-width: 320px) { - #view-amount .amount-pane-recipient .amount-bar { - padding: 0px; } } - #view-amount .amount-pane-recipient .amount-bar .title { - float: left; - padding-top: 10px; - color: #445; - font-weight: bold; } +#view-amount { + background: #494949; } + #view-amount .recipient-label { + font-size: 14px; + padding-bottom: 0; + color: #667; } + #view-amount .item-no-bottom-border + .item { + border-top: 0; } + #view-amount .icon-bitpay-card { + background-image: url("../img/icon-bitpay.svg"); } + #view-amount .icon-amazon { + background-image: url("../img/icon-amazon.svg"); } + @media (max-width: 480px) { + #view-amount .bitcoin-address { + font-size: 13px; + padding-left: 48px; } + #view-amount .bitcoin-address .icon { + left: 8px; + font-size: 24px; } + #view-amount .bitcoin-address .big-icon-svg { + left: 5px; } + #view-amount .bitcoin-address .big-icon-svg > .bg { + width: 30px; + height: 30px; + box-shadow: none; } } + @media (max-width: 320px) { + #view-amount .bitcoin-address > span:last-child { + margin-left: -2px; } } + #view-amount .send-gravatar { + left: 11px; + position: absolute; + top: 10px; } + #view-amount .amount span input { + display: inline; + width: 120px; } + #view-amount .amount-pane-recipient { + position: absolute; + top: 95px; + bottom: 0; + width: 100%; + background-color: #fff; + padding: 0 16px; } + #view-amount .amount-pane-recipient .amount-bar { + padding: 24px 0; + font-size: 18px; } @media (max-height: 480px) { - #view-amount .amount-pane-recipient .amount-bar .title { + #view-amount .amount-pane-recipient .amount-bar { padding: 0px; } } - @media (max-height: 480px) { - #view-amount .amount-pane-recipient .amount-bar { - padding-top: 3px; } } - #view-amount .amount-pane-recipient .amount { - display: flex; - flex-direction: column; - justify-content: center; - flex-grow: 1; - position: absolute; - bottom: 254px; - top: 66px; } - #view-amount .amount-pane-recipient .amount .light { - color: #9b9bab; } - @media (max-height: 480px) { - #view-amount .amount-pane-recipient .amount { - top: 45px; } } - @media (max-width: 320px) { - #view-amount .amount-pane-recipient .amount { - bottom: 276px; - top: 60px; } - #view-amount .amount-pane-recipient .amount > div { - display: inline-block; } - #view-amount .amount-pane-recipient .amount > div:first-child { - display: inherit; } } - -#view-amount .amount-pane-no-recipient { - position: absolute; - top: 0; - bottom: 0; - width: 100%; - background-color: #fff; - padding: 0 16px; } - #view-amount .amount-pane-no-recipient .amount-bar { - padding: 24px 0; - font-size: 18px; } - #view-amount .amount-pane-no-recipient .amount-bar .title { - padding-top: 10px; - color: #445; - font-weight: bold; } - #view-amount .amount-pane-no-recipient .amount-bar .title .limits { - margin-top: 10px; - color: #9b9bab; - font-size: 12px; } - #view-amount .amount-pane-no-recipient .amount-bar .title .select { - margin: 10px 1px; } - #view-amount .amount-pane-no-recipient .amount { - display: flex; - flex-direction: column; - justify-content: center; - flex-grow: 1; - position: absolute; - bottom: 254px; - top: 66px; } - #view-amount .amount-pane-no-recipient .amount .light { - color: #9b9bab; } - -#view-amount .amount { - padding-top: 10px; - padding-bottom: 10px; } - #view-amount .amount .icon-toggle { - font-size: 1.2em; - width: auto; - margin: 0.8em auto; - border: 1px solid #f2f2f2; - color: #445; - border-radius: 3px; - padding: 0 10px; - cursor: pointer; } - @media (max-height: 280px) { - #view-amount .amount .icon-toggle { - margin: 0.1em auto; } } - #view-amount .amount__editable--minimize { - font-size: 22px; } - #view-amount .amount__editable--standard { - font-size: 42px; } - @media (max-height: 480px) { - #view-amount .amount__editable--standard { - font-size: 26px; - padding-top: 10px; } } - #view-amount .amount__editable--placeholder { - color: #9b9bab; } - #view-amount .amount__number { - color: #445; } - #view-amount .amount__currency-toggle { - border: 1px solid #f2f2f2; - color: #445; - border-radius: 3px; - padding: 0 10px; - cursor: pointer; - font-size: .6em; - position: relative; - top: -3px; - line-height: 1; } - @media (max-width: 320px) { - #view-amount .amount__currency-toggle { - line-height: 30px; - height: 30px; } } - #view-amount .amount__currency-toggle-mobile { - border: 1px solid #f2f2f2; - color: #445; - border-radius: 3px; - cursor: pointer; - position: relative; - line-height: 1; } - @media (max-width: 320px) { - #view-amount .amount__currency-toggle-mobile { - line-height: 30px; - height: 30px; } } - #view-amount .amount__results--minimize { - font-size: 12px; } - #view-amount .amount__results--standard { - font-size: 18px; - padding: 10px 0; } - #view-amount .amount__results--placeholder { - color: #9b9bab; } - #view-amount .amount__result { - color: #9b9bab; - font-size: .9em; - line-height: 1; } - @media (max-height: 480px) { - #view-amount .amount__result { - margin-bottom: 0; } } - #view-amount .amount__result-equiv { - color: #667; - font-size: 1.2em; } - @media (max-height: 480px) { - #view-amount .amount__result-equiv { - margin-top: 0; - font-size: 16px; } } - -#view-amount .scroll-content { - display: flex; - flex-direction: column; } - #view-amount .scroll-content .send-amount { - flex: 1 1 auto; - display: flex; - flex-direction: column; - justify-content: center; } - #view-amount .scroll-content .send-amount .send-amount-tool { - flex: 0 1 auto; } - #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input { - text-align: center; - position: relative; - padding: 10px 30px; } - #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .text-selectable { - -webkit-user-select: text; - -moz-user-select: text; - -ms-user-select: text; - user-select: text; } - #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount input, #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount .unit, #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount .primary-amount-display { - font-size: 1.8em; } - @media (min-width: 375px) { - #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount input, #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount .unit, #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount .primary-amount-display { - font-size: 2.1em; } } - @media (min-width: 414px) { - #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount input, #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount .unit, #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount .primary-amount-display { - font-size: 2.4em; } } - #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount.long input, #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount.long .unit, #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount.long .primary-amount-display { - font-size: 1.6em; } - @media (min-width: 375px) { - #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount.long input, #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount.long .unit, #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount.long .primary-amount-display { - font-size: 1.8em; } } - @media (min-width: 414px) { - #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount.long input, #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount.long .unit, #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount.long .primary-amount-display { - font-size: 2em; } } - #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount.very-long input, #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount.very-long .unit, #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount.very-long .primary-amount-display { - font-size: 0.9em; } - @media (min-width: 375px) { - #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount.very-long input, #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount.very-long .unit, #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount.very-long .primary-amount-display { - font-size: 1.3em; } } - @media (min-width: 414px) { - #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount.very-long input, #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount.very-long .unit, #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount.very-long .primary-amount-display { - font-size: 1.4em; } } - #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount input { - border: 0; - padding: 0; - white-space: normal; - background: none; - line-height: 1; - box-sizing: content-box; - display: inline-block; - vertical-align: middle; - margin: 0; - height: 1em; - margin-right: 5px; - font-family: 'ProximaNova'; } - #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount .unit, - #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount .primary-amount-display { - display: inline-block; - vertical-align: middle; - line-height: 1em; } - #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount .unit { - font-weight: bold; } - #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount .primary-amount-display { - margin-right: 5px; - word-break: break-all; } - #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .switch-currencies { - position: absolute; - right: 0; - top: 50%; - transform: translate(0, -50%); - padding: 15px; } - #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .switch-currencies img { - width: 18px; } - #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-actions { - margin-top: 15px; - display: flex; - align-items: center; - justify-content: center; } - #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-actions .button { - flex: 1 1 auto; - line-height: 1.2em; } - #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-actions .button + .button { - margin-left: 10px; } - #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-actions .button span { - display: flex; - align-items: center; - justify-content: center; } - #view-amount .scroll-content .button.no-margin { - margin: 0; } - #view-amount .scroll-content .notification-warning { - display: block; - padding: .75rem 1.25rem; - color: #856404; - background-color: #fff3cd; - border: 1px solid #ffeeba; - line-height: 1.4em; - margin-bottom: 20px; } - #view-amount .scroll-content .keypad-container { - position: relative; } - #view-amount .scroll-content .keypad-container .keypad { - text-align: center; - font-size: 18px; - font-weight: lighter; - position: absolute; - bottom: 0; - width: 100%; - color: #667; } - @media (min-height: 667px) { - #view-amount .scroll-content .keypad-container .keypad { - font-size: 24px; } } - #view-amount .scroll-content .keypad-container .keypad .row { - padding: 0 !important; - margin: 0 !important; } - #view-amount .scroll-content .keypad-container .keypad .col { - line-height: 38px; } - @media (min-height: 667px) { - #view-amount .scroll-content .keypad-container .keypad .col { - line-height: 45px; } } - #view-amount .scroll-content .keypad-container .keypad .row:last-child .col { - padding-bottom: 10px; } - #view-amount .scroll-content .keypad-container .keypad .operator { - background-color: #f2f2f2; - font-weight: normal; - cursor: pointer; } - #view-amount .scroll-content .keypad-container .keypad .operator:active { - background-color: #9b9bab; } - #view-amount .scroll-content .keypad-container .keypad .operator-send { - font-weight: bolder; - color: #fff; - background-color: #494949; - font-size: 36px; - cursor: pointer; } - #view-amount .scroll-content .keypad-container .keypad .operator-send:active { - background-color: #eaeaea; } - #view-amount .scroll-content .keypad-container .keypad .digit { - cursor: pointer; - border-top: 1px solid #f2f2f2; - border-left: 1px solid #f2f2f2; - transition: all 0.1s ease; } - #view-amount .scroll-content .keypad-container .keypad .digit:active { - background-color: #f2f2f2; } + @media (max-width: 320px) { + #view-amount .amount-pane-recipient .amount-bar { + padding: 0px; } } + #view-amount .amount-pane-recipient .amount-bar .title { + float: left; + padding-top: 10px; + color: #445; + font-weight: bold; } + @media (max-height: 480px) { + #view-amount .amount-pane-recipient .amount-bar .title { + padding: 0px; } } @media (max-height: 480px) { - #view-amount .scroll-content .keypad-container .keypad { - font-size: 12px; } } + #view-amount .amount-pane-recipient .amount-bar { + padding-top: 3px; } } + #view-amount .amount-pane-recipient .amount { + display: flex; + flex-direction: column; + justify-content: center; + flex-grow: 1; + position: absolute; + bottom: 254px; + top: 66px; } + #view-amount .amount-pane-recipient .amount .light { + color: #9b9bab; } + @media (max-height: 480px) { + #view-amount .amount-pane-recipient .amount { + top: 45px; } } + @media (max-width: 320px) { + #view-amount .amount-pane-recipient .amount { + bottom: 276px; + top: 60px; } + #view-amount .amount-pane-recipient .amount > div { + display: inline-block; } + #view-amount .amount-pane-recipient .amount > div:first-child { + display: inherit; } } + #view-amount .amount-pane-no-recipient { + position: absolute; + top: 0; + bottom: 0; + width: 100%; + background-color: #fff; + padding: 0 16px; } + #view-amount .amount-pane-no-recipient .amount-bar { + padding: 24px 0; + font-size: 18px; } + #view-amount .amount-pane-no-recipient .amount-bar .title { + padding-top: 10px; + color: #445; + font-weight: bold; } + #view-amount .amount-pane-no-recipient .amount-bar .title .limits { + margin-top: 10px; + color: #9b9bab; + font-size: 12px; } + #view-amount .amount-pane-no-recipient .amount-bar .title .select { + margin: 10px 1px; } + #view-amount .amount-pane-no-recipient .amount { + display: flex; + flex-direction: column; + justify-content: center; + flex-grow: 1; + position: absolute; + bottom: 254px; + top: 66px; } + #view-amount .amount-pane-no-recipient .amount .light { + color: #9b9bab; } + #view-amount .amount { + padding-top: 10px; + padding-bottom: 10px; } + #view-amount .amount .icon-toggle { + font-size: 1.2em; + width: auto; + margin: 0.8em auto; + border: 1px solid #f2f2f2; + color: #445; + border-radius: 3px; + padding: 0 10px; + cursor: pointer; } + @media (max-height: 280px) { + #view-amount .amount .icon-toggle { + margin: 0.1em auto; } } + #view-amount .amount__editable--minimize { + font-size: 22px; } + #view-amount .amount__editable--standard { + font-size: 42px; } + @media (max-height: 480px) { + #view-amount .amount__editable--standard { + font-size: 26px; + padding-top: 10px; } } + #view-amount .amount__editable--placeholder { + color: #9b9bab; } + #view-amount .amount__number { + color: #445; } + #view-amount .amount__currency-toggle { + border: 1px solid #f2f2f2; + color: #445; + border-radius: 3px; + padding: 0 10px; + cursor: pointer; + font-size: .6em; + position: relative; + top: -3px; + line-height: 1; } + @media (max-width: 320px) { + #view-amount .amount__currency-toggle { + line-height: 30px; + height: 30px; } } + #view-amount .amount__currency-toggle-mobile { + border: 1px solid #f2f2f2; + color: #445; + border-radius: 3px; + cursor: pointer; + position: relative; + line-height: 1; } + @media (max-width: 320px) { + #view-amount .amount__currency-toggle-mobile { + line-height: 30px; + height: 30px; } } + #view-amount .amount__results--minimize { + font-size: 12px; } + #view-amount .amount__results--standard { + font-size: 18px; + padding: 10px 0; } + #view-amount .amount__results--placeholder { + color: #9b9bab; } + #view-amount .amount__result { + color: #9b9bab; + font-size: .9em; + line-height: 1; } + @media (max-height: 480px) { + #view-amount .amount__result { + margin-bottom: 0; } } + #view-amount .amount__result-equiv { + color: #667; + font-size: 1.2em; } + @media (max-height: 480px) { + #view-amount .amount__result-equiv { + margin-top: 0; + font-size: 16px; } } + #view-amount .scroll-content { + display: flex; + flex-direction: column; } + #view-amount .scroll-content .send-amount { + flex: 1 1 auto; + display: flex; + flex-direction: column; + justify-content: center; } + #view-amount .scroll-content .send-amount .send-amount-tool { + flex: 0 1 auto; } + #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input { + text-align: center; + position: relative; + padding: 10px 30px; } + #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .text-selectable { + -webkit-user-select: text; + -moz-user-select: text; + -ms-user-select: text; + user-select: text; } + #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount input, #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount .unit, #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount .primary-amount-display { + font-size: 1.8em; } + @media (min-width: 375px) { + #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount input, #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount .unit, #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount .primary-amount-display { + font-size: 2.1em; } } + @media (min-width: 414px) { + #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount input, #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount .unit, #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount .primary-amount-display { + font-size: 2.4em; } } + #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount.long input, #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount.long .unit, #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount.long .primary-amount-display { + font-size: 1.6em; } + @media (min-width: 375px) { + #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount.long input, #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount.long .unit, #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount.long .primary-amount-display { + font-size: 1.8em; } } + @media (min-width: 414px) { + #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount.long input, #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount.long .unit, #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount.long .primary-amount-display { + font-size: 2em; } } + #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount.very-long input, #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount.very-long .unit, #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount.very-long .primary-amount-display { + font-size: 0.9em; } + @media (min-width: 375px) { + #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount.very-long input, #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount.very-long .unit, #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount.very-long .primary-amount-display { + font-size: 1.3em; } } + @media (min-width: 414px) { + #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount.very-long input, #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount.very-long .unit, #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount.very-long .primary-amount-display { + font-size: 1.4em; } } + #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount input { + border: 0; + padding: 0; + white-space: normal; + background: none; + line-height: 1; + box-sizing: content-box; + display: inline-block; + vertical-align: middle; + margin: 0; + height: 1em; + margin-right: 5px; + font-family: 'ProximaNova'; } + #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount .unit, + #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount .primary-amount-display { + display: inline-block; + vertical-align: middle; + line-height: 1em; } + #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount .unit { + font-weight: bold; } + #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount .primary-amount-display { + margin-right: 5px; + word-break: break-all; } + #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .switch-currencies { + position: absolute; + right: 0; + top: 50%; + transform: translate(0, -50%); + padding: 15px; } + #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .switch-currencies img { + width: 18px; } + #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-actions { + margin-top: 15px; + display: flex; + align-items: center; + justify-content: center; } + #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-actions .button { + flex: 1 1 auto; + line-height: 1.2em; } + #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-actions .button + .button { + margin-left: 10px; } + #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-actions .button span { + display: flex; + align-items: center; + justify-content: center; } + #view-amount .scroll-content .button.no-margin { + margin: 0; } + #view-amount .scroll-content .notification-warning { + display: block; + padding: .75rem 1.25rem; + color: #856404; + background-color: #fff3cd; + border: 1px solid #ffeeba; + line-height: 1.4em; + margin-bottom: 20px; } + #view-amount .scroll-content .keypad-container { + position: relative; } + #view-amount .scroll-content .keypad-container .keypad { + text-align: center; + font-size: 18px; + font-weight: lighter; + position: absolute; + bottom: 0; + width: 100%; + color: #667; } + @media (min-height: 667px) { + #view-amount .scroll-content .keypad-container .keypad { + font-size: 24px; } } + #view-amount .scroll-content .keypad-container .keypad .row { + padding: 0 !important; + margin: 0 !important; } + #view-amount .scroll-content .keypad-container .keypad .col { + line-height: 38px; } + @media (min-height: 667px) { + #view-amount .scroll-content .keypad-container .keypad .col { + line-height: 45px; } } + #view-amount .scroll-content .keypad-container .keypad .row:last-child .col { + padding-bottom: 10px; } + #view-amount .scroll-content .keypad-container .keypad .operator { + background-color: #f2f2f2; + font-weight: normal; + cursor: pointer; } + #view-amount .scroll-content .keypad-container .keypad .operator:active { + background-color: #9b9bab; } + #view-amount .scroll-content .keypad-container .keypad .operator-send { + font-weight: bolder; + color: #fff; + background-color: #494949; + font-size: 36px; + cursor: pointer; } + #view-amount .scroll-content .keypad-container .keypad .operator-send:active { + background-color: #eaeaea; } + #view-amount .scroll-content .keypad-container .keypad .digit { + cursor: pointer; + border-top: 1px solid #f2f2f2; + border-left: 1px solid #f2f2f2; + transition: all 0.1s ease; } + #view-amount .scroll-content .keypad-container .keypad .digit:active { + background-color: #f2f2f2; } + @media (max-height: 480px) { + #view-amount .scroll-content .keypad-container .keypad { + font-size: 12px; } } + #view-amount ion-content { + margin-bottom: constant(safe-area-inset-bottom); + /* iOS 11.0 */ + margin-bottom: env(safe-area-inset-bottom); + /* iOS 11.2 */ } #view-confirm { - background-color: #ffffff; } + background-color: #494949; } #view-confirm .item-note { float: none; } #view-confirm .item-note .fee-rate { @@ -10622,6 +10701,13 @@ textarea.d-block { margin-top: -3px; } #view-confirm .toggle { cursor: pointer; } + #view-confirm ion-content { + background-color: #ffffff; } + #view-confirm slide-to-accept, #view-confirm slide-to-accept-success { + margin-bottom: constant(safe-area-inset-bottom); + /* iOS 11.0 */ + margin-bottom: env(safe-area-inset-bottom); + /* iOS 11.2 */ } #copayers-invitation .button-share { color: #fff; @@ -10728,6 +10814,8 @@ textarea.d-block { #tab-home .card-banner { padding: 0; } + #tab-home .card-banner svg { + margin: 40px auto 40px; } #tab-home .card-banner__img { width: 100%; display: block; } @@ -10951,123 +11039,154 @@ textarea.d-block { #cordova-plugin-qrscanner-still, #cordova-plugin-qrscanner-video-preview { background-color: #fab915 !important; } -#tab-send .input input { - width: 100%; - height: auto; } +#tab-send-header { + height: 300px; + width: 100%; } -#tab-send .input.item { - height: 55px; } +#tab-send-contacts { + height: calc(100vh - 300px - 50px - 44px); + /* screen size - button container - bottom-tab-menu - header top */ + overflow: scroll; } + #tab-send-contacts.ios { + height: calc(100vh - 300px - 50px - 44px - 18px); } -#tab-send .input i.left { - padding-left: 15px; } +#tab-send .input { + width: 100%; } + #tab-send .input input { + width: 100%; + height: 57px; + background: #FFF; + border: 1px #D9D9D9 solid; } + #tab-send .input input::placeholder { + color: #DCDCDC; } + #tab-send .input i.left { + padding-left: 15px; } + #tab-send .input i.qr { + cursor: pointer; + cursor: hand; + padding-right: 5px; } -#tab-send .input i.qr { - cursor: pointer; - cursor: hand; - padding-right: 5px; } - -#tab-send .qr-scan-icon { - cursor: pointer; - cursor: hand; - border-left: 1px solid #e4e4e4; - padding-left: 10px; } - -#tab-send .qr-icon { - line-height: 20px; } - -#tab-send .zero-state-cta { - padding-bottom: 3vh; - left: 0; } - -#tab-send .send-heading { - font-size: 14px; - font-weight: bold; - padding: 0 0 16px 0; - border: none; } - -#tab-send .send-header-wrapper { - padding: 10px; - background-color: white; - box-shadow: 0px 5px 10px 0px #cccccc; } - -#tab-send .search-wrapper { +#tab-send .send-wrapper { + padding: 18px 9px 9px 9px; background-color: #f2f2f2; border-radius: 3px; border: none; } - #tab-send .search-wrapper .svg#Bitcoin_Symbol { - width: 14px; } - #tab-send .search-wrapper .svg#Bitcoin_Symbol .st0 { - fill: #cccccc; } - #tab-send .search-wrapper.focus { - background: none; } - #tab-send .search-wrapper.focus .svg#Bitcoin_Symbol { - display: none; } - #tab-send .search-wrapper.focus .search-input { - padding-left: 30px; } - #tab-send .search-wrapper.focus .search-input:focus::-webkit-input-placeholder { - opacity: 0; } - -#tab-send .abs-v-center { - position: absolute; - top: 50%; - transform: translateY(-50%); } + #tab-send .send-wrapper:after { + display: block; + position: relative; + height: 1px; + background: #DEDEDE; + bottom: 0; + content: ''; + margin: 10px 6px 0px; } + #tab-send .send-wrapper.focus .search-input { + padding-left: 30px; } + #tab-send .send-wrapper.focus .search-input:focus::-webkit-input-placeholder { + opacity: 0; } + #tab-send .send-wrapper .buttons { + margin: auto; + margin-top: 18px; } + #tab-send .send-wrapper .buttons .button { + height: 60px; + line-height: 16px; + margin-right: 0px; + width: 95%; + max-width: none; + padding: 2px; } + #tab-send .send-wrapper .buttons .button-clipboard-paste { + margin-left: 0; } + #tab-send .send-wrapper .buttons .button-clipboard-paste .address { + display: none; } + #tab-send .send-wrapper .buttons .button-clipboard-paste .icon { + background: url(../img/icon-clipboard-paste.svg); + width: 15px; + height: 19px; + display: inline-block; + margin-bottom: 4px; } + #tab-send .send-wrapper .buttons .button-clipboard-paste.contains-address, #tab-send .send-wrapper .buttons .button-clipboard-paste.contains-content { + background: #FAB915; + color: #FFF !important; + border: 0; + box-shadow: 0 2px 11px 0 #C1C1C1; } + #tab-send .send-wrapper .buttons .button-clipboard-paste.contains-address .address, #tab-send .send-wrapper .buttons .button-clipboard-paste.contains-content .address { + display: none; } + #tab-send .send-wrapper .buttons .button-clipboard-paste.contains-address .icon, #tab-send .send-wrapper .buttons .button-clipboard-paste.contains-content .icon { + background: url(../img/icon-clipboard-paste-white.svg); } + #tab-send .send-wrapper .buttons .button-clipboard-paste.contains-address.contains-address .address, #tab-send .send-wrapper .buttons .button-clipboard-paste.contains-content.contains-address .address { + display: inline; } + #tab-send .send-wrapper .buttons .button-clipboard-paste.contains-address.contains-address .non-address, #tab-send .send-wrapper .buttons .button-clipboard-paste.contains-content.contains-address .non-address { + display: none; } + #tab-send .send-wrapper .buttons .button span { + font-size: 14px; } + #tab-send .send-wrapper .buttons .button img { + height: 16px; + width: auto; + margin: 2px 0 4px; } + #tab-send .send-wrapper .buttons .button-qr { + font-weight: bold; + max-width: none; + width: 100%; + height: 95px; + margin-top: 20px; } + #tab-send .send-wrapper .buttons .button-qr img { + vertical-align: middle; + margin-right: 12px; + width: 43px; + height: 43px; } + #tab-send .send-wrapper .buttons .button-qr span { + font-size: 19px; } #tab-send .search-input { background-color: transparent; padding-left: 30px; } -#tab-send .separator-left { - border-left: 1px solid #d9d9df; - padding-left: 10px; - height: 70%; } - -#tab-send .bitcoin-address { - border-top: none; - padding-bottom: .5rem; } - @media (max-width: 480px) { - #tab-send .bitcoin-address input { - font-size: 14px; } } - #tab-send .bitcoin-address .icon { - line-height: 31px; - padding-top: 2px; - padding-bottom: 1px; } - -#tab-send .show-more { - text-align: center; - padding: 20px; - font-size: 16px; - color: #387ef5; - font-weight: bold; } - #tab-send .sendTip { + padding-top: 5vh; text-align: center; } - #tab-send .sendTip > .item-heading { - margin-top: 10px; - background: 0 none; } - #tab-send .sendTip img { - content: url("../img/app/tab-icons/ico-send-selected.svg"); } #tab-send .sendTip .item { border-style: none; } #tab-send .sendTip > .title { font-size: 20px; - font-weight: bold; color: #445; margin: 20px 10px; } #tab-send .sendTip > .subtitle { font-size: 1rem; line-height: 1.5em; font-weight: 300; - color: #445; + color: #6F6F70; margin: 20px 1em 2.5em; } #tab-send .sendTip .big-icon-svg .bg.green { padding: 0 10px; box-shadow: none; } + #tab-send .sendTip .buttons { + margin-top: 18px; } + #tab-send .sendTip .buttons .button { + font-weight: bold; + font-size: 19px; } + #tab-send .sendTip .button-first-contact img { + height: 19px; + width: 19px; + margin-right: 6px; + vertical-align: sub; } + +#tab-send .item-heading { + line-height: 16px; + font-size: 14px; + font-weight: bold; } + #tab-send .item-heading .subtitle { + color: #B5B2B2; + font-size: 12px; + font-weight: 300; } #tab-send .list .item { + font-weight: 600; color: #444; - border-top: none; - padding-top: 1.5rem; - padding-bottom: 1.5rem; } + padding-top: 0.6rem; + padding-bottom: 0.6rem; } + #tab-send .list .item p { + font-weight: normal; } + #tab-send .list .item.item-icon-left { + padding-left: 64px; } #tab-send .list .item .big-icon-svg { left: 5px; } #tab-send .list .item .big-icon-svg > .bg { @@ -11077,7 +11196,7 @@ textarea.d-block { #tab-send .list .item:before { display: block; position: absolute; - width: 80%; + width: 100%; height: 1px; background: rgba(221, 221, 221, 0.3); top: 0; @@ -11096,6 +11215,28 @@ textarea.d-block { #tab-send .scroll { height: 100%; } +#tab-send .card.contacts { + margin: 4px 4px 16px 4px; + border-radius: 6px; + box-shadow: 0px 2px 1px 0 #C1C1C1; } + #tab-send .card.contacts .gravatar { + border-radius: 30px; + height: 40px; + width: 40px; } + +@media only screen and (min-device-width: 320px) and (max-device-width: 568px) { + #tab-send .send-wrapper .buttons .button-qr { + height: 60px; } + #tab-send .send-wrapper .buttons .button-qr span { + font-size: 16px; } + #tab-send #tab-send-header { + height: 270px; } + #tab-send #tab-send-contacts { + height: calc(100vh - 270px - 50px - 44px); + /* screen size - button container - bottom-tab-menu - header top */ } + #tab-send #tab-send-contacts.ios { + height: calc(100vh - 270px - 50px - 44px - 18px); } } + .settings .icon-bitpay { background-image: url("../img/icon-bitpay.svg"); } @@ -11604,7 +11745,8 @@ textarea.d-block { fill: white; } #walletDetails .bp-content { position: relative; - height: 100%; } + height: 100%; + height: calc(100% - env(safe-area-inset-bottom) * 2); } #walletDetails .bp-content.status-bar { margin-top: 20px; } #walletDetails .bar-header { @@ -11618,7 +11760,8 @@ textarea.d-block { background-color: inherit !important; } #walletDetails ion-content { padding-top: 0; - top: 0; } + top: 0; + margin-bottom: 16px; } #walletDetails ion-content.collapsible { margin-top: 210px; } #walletDetails ion-content .scroll { @@ -12211,7 +12354,6 @@ a.item { position: relative; height: 70px; border-color: #fab915; - background-color: #fab915; padding-top: 20px; margin-bottom: 50px; text-align: center; } @@ -13013,74 +13155,13 @@ a.item { .onboarding-illustration-backup-warning { background-image: url(../img/app/backup-warning.svg); } -#rate-card .item-heading { - font-weight: 700; } - -#rate-card .row { - border: none; } - -#rate-card .item-icon-right { - margin: 0; } - -#rate-card .feedback-flow-button { - margin-bottom: 20px; } - -#rate-card .icon-svg > img { - height: 1.8rem; - margin-bottom: 5px; } - -#send-feedback { - background-color: #ffffff; } - #send-feedback .row { - border: none; } - #send-feedback .skip { - color: rgba(255, 255, 255, 0.3); } - #send-feedback .feedback-heading { - padding-top: 20px; } - #send-feedback .feedback-title { - padding-left: 10px; - font-size: 20px; - font-weight: bold; - color: #445; } - #send-feedback .rating { - text-align: right; - padding-right: 15px; } - #send-feedback .comment { - padding: 0 20px 20px; - font-size: 1rem; - line-height: 1.5em; - font-weight: 300; - color: #445; } - #send-feedback .user-feedback { - border-top: 1px solid #f2f2f2; - border-bottom: 1px solid #f2f2f2; - padding: 20px; - width: 100%; - margin-bottom: 20px; - -webkit-appearance: none; } - #send-feedback .send-feedback-star { - height: 1rem; - margin-left: 5px; } - #send-feedback .form-fade-in { - opacity: 0; - animation-name: fadeIn; - animation-duration: .5s; - animation-fill-mode: forwards; - animation-timing-function: ease-in; } - -@keyframes fadeIn { - from { - opacity: 0; } - to { - opacity: 1; } } - -#complete { +#share-app { background-color: #fff; } - #complete .complete-layout { + #share-app .share-app-layout { display: flex; flex-direction: column; height: 100%; } - #complete .complete-layout__expand { + #share-app .share-app-layout__expand { display: flex; flex-direction: column; flex-grow: 1; @@ -13089,36 +13170,27 @@ a.item { text-align: center; opacity: 0; transition: opacity .3s; } - #complete .complete-layout__expand.fade-in { + #share-app .share-app-layout__expand.fade-in { opacity: 1; } - #complete .share-the-love-illustration { + #share-app .share-the-love-illustration { width: 5rem; margin: 1rem; } - #complete .send-feedback-illustration { - height: 16rem; - margin: 1rem; } - #complete .feedback-title { - font-size: 20px; - font-weight: bold; - color: #445; - margin: 20px 10px; - text-align: center; } - #complete .subtitle { + #share-app .subtitle { padding: 10px 30px 20px; text-align: center; color: #667; } - #complete .icon-svg > img { + #share-app .icon-svg > img { height: 16rem; width: 16rem; margin: 10px; } - #complete .socialsharing-icon { + #share-app .socialsharing-icon { display: inline-block; width: 60px; } - #complete .addressbook-icon-svg { + #share-app .addressbook-icon-svg { display: inline-block; width: 50px; height: 50px; } - #complete .share-buttons { + #share-app .share-buttons { padding: 50px 10px 30px; background-color: #f2f2f2; text-align: center; @@ -13130,7 +13202,7 @@ a.item { animation-fill-mode: forwards; animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1); animation-delay: .2s; } - #complete .share-buttons__action { + #share-app .share-buttons__action { display: inline-block; color: #667; font-size: .9rem; @@ -13148,38 +13220,6 @@ a.item { transform: translateY(0); opacity: 1; } } -#rate-app { - background-color: #ffffff; - text-align: center; } - #rate-app .skip-rating { - color: #445; - position: absolute; - top: 5px; - right: 10px; - padding: 15px; } - #rate-app .icon-svg > img { - width: 80px; - height: 80px; - margin-top: 15px; } - #rate-app .feedback-title { - font-size: 20px; - font-weight: bold; - color: #445; - margin: 80px 50px 10px; - text-align: center; } - #rate-app .share-the-love-illustration { - width: 5rem; - margin: 1rem; } - #rate-app .subtitle { - padding: 10px 30px 20px 40px; - color: #667; } - #rate-app .rate-buttons { - bottom: 0; - width: 100%; - position: absolute; - background-color: #f2f2f2; - padding: 30px 0 15px; } - action-sheet .bp-action-sheet__sheet { background: #fff; width: calc(100% + 1px); @@ -13800,7 +13840,11 @@ slide-to-accept-success { transform: translateY(5rem); opacity: 0; transition: transform 400ms ease, opacity 400ms ease; - transition-delay: 250ms; } + transition-delay: 250ms; + margin-bottom: constant(safe-area-inset-bottom); + /* iOS 11.0 */ + margin-bottom: env(safe-area-inset-bottom); + /* iOS 11.2 */ } slide-to-accept-success .slide-success__footer.reveal { -webkit-transform: translateY(0); transform: translateY(0); @@ -13858,16 +13902,16 @@ slide-to-accept-success { line-height: 30px; } #txp-details .head .amount-label .amount, #view-confirm .head .amount-label .amount { - font-size: 38px; - margin-bottom: .5rem; } - #txp-details .head .amount-label .amount > .unit, - #view-confirm .head .amount-label .amount > .unit { - font-family: "Roboto-Light"; } + font-size: 16px; + color: #9B9B9B; + font-family: "Roboto-Light"; } #txp-details .head .amount-label .alternative, #view-confirm .head .amount-label .alternative { - font-size: 16px; - font-family: "Roboto-Light"; - color: #9B9B9B; } + font-size: 38px; + margin-bottom: .5rem; } + #txp-details .head .amount-label .alternative > .unit, + #view-confirm .head .amount-label .alternative > .unit { + font-family: "Roboto-Light"; } #txp-details .item, #view-confirm .item { border-color: #EFEFEF; } @@ -14155,6 +14199,10 @@ wallet-selector .subheader { font-weight: bold; padding-bottom: 10px; border-bottom: 1px solid #EFEFEF; } + wallet-selector .subheader .subtitle { + color: #667; + font-size: 12px; + font-weight: 300; } wallet-selector .subheader .wallet-coin-logo { vertical-align: middle; margin-right: 5px; } 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 @@ - + diff --git a/www/views/review.html b/www/views/review.html new file mode 100644 index 000000000..d68eca05b --- /dev/null +++ b/www/views/review.html @@ -0,0 +1,45 @@ + + + + {{'Review'|translate}} + + + + + + + Review + + + {{buttonText}} + + + {{buttonText}} + + + Payment Sent + Proposal Created + Transaction Created + + + + + + From 155ea281d8ede8cc8c619a339aa4d389684e5431 Mon Sep 17 00:00:00 2001 From: Sam Cheng Hung Date: Wed, 18 Jul 2018 17:24:13 +0800 Subject: [PATCH 012/256] Adds header component --- src/sass/components/components.scss | 1 + src/sass/components/header.scss | 36 +++++++++++++++++++++++++++++ src/sass/main.scss | 1 + www/css/main.css | 24 +++++++++++++++++++ www/views/review.html | 8 ++++++- 5 files changed, 69 insertions(+), 1 deletion(-) create mode 100644 src/sass/components/components.scss create mode 100644 src/sass/components/header.scss diff --git a/src/sass/components/components.scss b/src/sass/components/components.scss new file mode 100644 index 000000000..833f565dd --- /dev/null +++ b/src/sass/components/components.scss @@ -0,0 +1 @@ +@import "header"; diff --git a/src/sass/components/header.scss b/src/sass/components/header.scss new file mode 100644 index 000000000..1c178dd07 --- /dev/null +++ b/src/sass/components/header.scss @@ -0,0 +1,36 @@ +.header { + padding: 29px 12px 65px; + background-color: #FAB915; + color: #FFFFFF; + + .title { + font-size: 18px; + font-weight: 400; + line-height: 1em; + color: #FFFFFF; + text-align: center; + + + .content { + margin-top: 23px; + } + } + + .content { + text-align: center; + + p { + margin: 0; + line-height: 1em; + font-size: 18px; + + &.large { + font-size: 29px; + font-weight: 600; + } + + + p { + margin-top: 8px; + } + } + } +} \ No newline at end of file diff --git a/src/sass/main.scss b/src/sass/main.scss index 7b3e46291..516656449 100644 --- a/src/sass/main.scss +++ b/src/sass/main.scss @@ -9,4 +9,5 @@ @import "mixins/mixins"; @import "views/views"; @import "directives/directives"; +@import "components/components"; @import "shame"; diff --git a/www/css/main.css b/www/css/main.css index a87bc4be9..2e2726888 100644 --- a/www/css/main.css +++ b/www/css/main.css @@ -15066,6 +15066,30 @@ log-options #check-bar .checkbox-icon { border-radius: 3px; display: inline-block; } +.header { + padding: 29px 12px 65px; + background-color: #FAB915; + color: #FFFFFF; } + .header .title { + font-size: 18px; + font-weight: 400; + line-height: 1em; + color: #FFFFFF; + text-align: center; } + .header .title + .content { + margin-top: 23px; } + .header .content { + text-align: center; } + .header .content p { + margin: 0; + line-height: 1em; + font-size: 18px; } + .header .content p.large { + font-size: 29px; + font-weight: 600; } + .header .content p + p { + margin-top: 8px; } + /* This is for rules that don't yet have a home. * Our goal is to delete this file. Search the regex: /class=".*CLASS.*?"/ */ diff --git a/www/views/review.html b/www/views/review.html index d68eca05b..cc57c79b8 100644 --- a/www/views/review.html +++ b/www/views/review.html @@ -8,7 +8,13 @@ - Review +
+

You are sending

+
+

13.98 USD

+

0.014 BCH

+
+
Date: Wed, 18 Jul 2018 11:29:03 +0200 Subject: [PATCH 013/256] price display translation --- i18n/po/template.pot | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/i18n/po/template.pot b/i18n/po/template.pot index a23e5dbae..df01cecec 100644 --- a/i18n/po/template.pot +++ b/i18n/po/template.pot @@ -197,6 +197,10 @@ msgstr "" msgid "Alternative Currency" msgstr "" +#: www/views/tab-settings.html:75 +msgid "Price Display" +msgstr "" + #: src/js/controllers/buyAmazon.js:98 msgid "Amazon.com is not available at this moment. Please try back later." msgstr "" From b8bab036e6e2b7f1008e050ea762e9a65a6e7613 Mon Sep 17 00:00:00 2001 From: Sebastiaan Pasma Date: Wed, 18 Jul 2018 11:54:41 +0200 Subject: [PATCH 014/256] wallet to wallet transfer views + css --- .../controllers/walletToWalletController.js | 14 ++++++ src/js/routes.js | 9 ++++ src/sass/views/views.scss | 1 + src/sass/views/wallet-to-wallet-transfer.scss | 18 ++++++++ www/views/tab-send.html | 2 +- www/views/wallet-to-wallet-transfer.html | 43 +++++++++++++++++++ 6 files changed, 86 insertions(+), 1 deletion(-) create mode 100644 src/js/controllers/walletToWalletController.js create mode 100644 src/sass/views/wallet-to-wallet-transfer.scss create mode 100644 www/views/wallet-to-wallet-transfer.html diff --git a/src/js/controllers/walletToWalletController.js b/src/js/controllers/walletToWalletController.js new file mode 100644 index 000000000..7cb467b67 --- /dev/null +++ b/src/js/controllers/walletToWalletController.js @@ -0,0 +1,14 @@ +'use strict'; + +angular.module('copayApp.controllers').controller('walletToWalletController', function($scope, $rootScope, $log, profileService, configService) { + + $scope.$on("$ionicView.enter", function(event, data) { + $scope.walletsBch = profileService.getWallets({coin: 'bch'}); + $scope.walletsBtc = profileService.getWallets({coin: 'btc'}); + configService.whenAvailable(function(config) { + $scope.selectedPriceDisplay = config.wallet.settings.priceDisplay; + }); + }); + + +}); \ No newline at end of file diff --git a/src/js/routes.js b/src/js/routes.js index 8277314e5..72397d872 100644 --- a/src/js/routes.js +++ b/src/js/routes.js @@ -295,6 +295,15 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr } } }) + .state('tabs.send.wallet-to-wallet', { + url: '/wallet-to-wallet', + views: { + 'tab-send@tabs': { + controller: 'walletToWalletController', + templateUrl: 'views/wallet-to-wallet-transfer.html' + } + } + }) .state('tabs.send.confirm', { url: '/confirm/:recipientType/:toAddress/:toName/:toAmount/:toEmail/:toColor/:description/:coin/:useSendMax/:fromWalletId/:displayAddress/:requiredFeeRate', views: { diff --git a/src/sass/views/views.scss b/src/sass/views/views.scss index d4ed735ed..538787901 100644 --- a/src/sass/views/views.scss +++ b/src/sass/views/views.scss @@ -8,6 +8,7 @@ @import "tab-receive"; @import "tab-scan"; @import "tab-send"; +@import "wallet-to-wallet-transfer"; @import "tab-settings"; @import "wallet-colors"; @import "walletBalance"; diff --git a/src/sass/views/wallet-to-wallet-transfer.scss b/src/sass/views/wallet-to-wallet-transfer.scss new file mode 100644 index 000000000..e909258cf --- /dev/null +++ b/src/sass/views/wallet-to-wallet-transfer.scss @@ -0,0 +1,18 @@ +#wallet-to-wallet-transfer { + .header, .list { + font-size: 12px; + margin: 20px 14px; + + .title { + font-size: 20px; + font-weight: bold; + color: $v-dark-gray; + } + .subtitle { + font-size: 12px; + line-height: 1.5em; + font-weight: 300; + color: $v-dark-gray; + } + } +} \ No newline at end of file diff --git a/www/views/tab-send.html b/www/views/tab-send.html index 8b39808db..b5d556214 100644 --- a/www/views/tab-send.html +++ b/www/views/tab-send.html @@ -22,7 +22,7 @@
- diff --git a/www/views/wallet-to-wallet-transfer.html b/www/views/wallet-to-wallet-transfer.html new file mode 100644 index 000000000..2eb2bcb11 --- /dev/null +++ b/www/views/wallet-to-wallet-transfer.html @@ -0,0 +1,43 @@ + + + {{'Wallet to wallet transfer' | translate}} + + +
+
+ Choose your origin wallet +
+
+ This is where the Bitcoin will be taken out from. +
+
+
+
+
Bitcoin Cash (BCH)
+
Instant transactions with low fees
+ +
+
+ + + +
+
+ +
+
+
Bitcoin Core (BTC)
+ +
+
+ + + +
+
+
+
\ No newline at end of file From 450b80b03fd6ab9701a481b383cedeadd658cdd4 Mon Sep 17 00:00:00 2001 From: Sebastiaan Pasma Date: Wed, 18 Jul 2018 16:30:54 +0200 Subject: [PATCH 015/256] 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 46906352e5c1d4bab852192e14af7b2cbdc77c60 Mon Sep 17 00:00:00 2001 From: Sebastiaan Pasma Date: Wed, 18 Jul 2018 16:47:15 +0200 Subject: [PATCH 016/256] remove "add wallet" buttons --- www/views/wallet-to-wallet-transfer.html | 2 -- 1 file changed, 2 deletions(-) diff --git a/www/views/wallet-to-wallet-transfer.html b/www/views/wallet-to-wallet-transfer.html index 2eb2bcb11..68a61fe2d 100644 --- a/www/views/wallet-to-wallet-transfer.html +++ b/www/views/wallet-to-wallet-transfer.html @@ -15,7 +15,6 @@
Bitcoin Cash (BCH)
Instant transactions with low fees
-
Date: Wed, 18 Jul 2018 16:48:57 +0200 Subject: [PATCH 017/256] wallet selection stub --- src/js/controllers/walletToWalletController.js | 3 +++ www/views/wallet-to-wallet-transfer.html | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/js/controllers/walletToWalletController.js b/src/js/controllers/walletToWalletController.js index 7cb467b67..77d2218e6 100644 --- a/src/js/controllers/walletToWalletController.js +++ b/src/js/controllers/walletToWalletController.js @@ -10,5 +10,8 @@ angular.module('copayApp.controllers').controller('walletToWalletController', fu }); }); + $scope.useWallet = function(wallet) { + // Do something with selected wallet + }; }); \ No newline at end of file diff --git a/www/views/wallet-to-wallet-transfer.html b/www/views/wallet-to-wallet-transfer.html index 68a61fe2d..f172f40da 100644 --- a/www/views/wallet-to-wallet-transfer.html +++ b/www/views/wallet-to-wallet-transfer.html @@ -19,7 +19,7 @@ From 3cedfa5146d0e732f66eb21ef48ada651f625286 Mon Sep 17 00:00:00 2001 From: Brendon Duncan Date: Thu, 19 Jul 2018 12:19:08 +1200 Subject: [PATCH 018/256] Added $scope.fundsAreInsufficient for triggering UI. --- src/js/controllers/amount.js | 52 +++++++++++++++++++++++++++++++----- 1 file changed, 46 insertions(+), 6 deletions(-) diff --git a/src/js/controllers/amount.js b/src/js/controllers/amount.js index 1c91baf97..3d8422447 100644 --- a/src/js/controllers/amount.js +++ b/src/js/controllers/amount.js @@ -7,6 +7,8 @@ angular.module('copayApp.controllers').controller('amountController', function($ var satToUnit; var unitDecimals; var satToBtc; + var spendableAmountInSatoshis = null; + var SMALL_FONT_SIZE_LIMIT = 10; var LENGTH_EXPRESSION_LIMIT = 19; var LENGTH_BEFORE_COMMA_EXPRESSION_LIMIT = 8; @@ -22,6 +24,10 @@ angular.module('copayApp.controllers').controller('amountController', function($ $scope.amountModel = { amount: 0 }; + // Use insufficient for logic, as when the amount is invalid, funds being + // either sufficent or insufficient doesn't make sense. + $scope.fundsAreInsufficient = false; + $scope.isChromeApp = platformInfo.isChromeApp; $scope.isAndroid = platformInfo.isAndroid; $scope.isIos = platformInfo.isIOS; @@ -134,6 +140,12 @@ angular.module('copayApp.controllers').controller('amountController', function($ }); altUnitIndex = 0; + + if ($scope.fromWalletId) { + var fromWallet = profileService.getWallet($scope.fromWalletId); + console.log('got fromWallet.'); + updateSpendableAmountInSatoshisFromWallet(fromWallet); + } }; // Go to... @@ -387,24 +399,41 @@ angular.module('copayApp.controllers').controller('amountController', function($ var a = fromFiat(result); if (a) { - $scope.alternativeAmount = txFormatService.formatAmount(a * unitToSatoshi, true); - $scope.allowSend = lodash.isNumber(a) && a > 0 + var amountInSatoshis = a * unitToSatoshi; + $scope.fundsAreInsufficient = !!$scope.fromWalletId + && spendableAmountInSatoshis !== null + && spendableAmountInSatoshis < amountInSatoshis; + + $scope.alternativeAmount = txFormatService.formatAmount(amountInSatoshis, true); + $scope.allowSend = lodash.isNumber(a) + && a > 0 && (!$scope.shapeshiftOrderId - || (a >= $scope.minShapeshiftAmount && a <= $scope.maxShapeshiftAmount)); + || (a >= $scope.minShapeshiftAmount && a <= $scope.maxShapeshiftAmount)) + && !$scope.fundsAreInsufficient; } else { if (result) { $scope.alternativeAmount = 'N/A'; } else { $scope.alternativeAmount = null; } + $scope.fundsAreInsufficient = false; $scope.allowSend = false; } } else { + $scope.fundsAreInsufficient = !!$scope.fromWalletId + && spendableAmountInSatoshis !== null + && spendableAmountInSatoshis < result * unitToSatoshi; + $scope.alternativeAmount = $filter('formatFiatAmount')(toFiat(result)); - $scope.allowSend = lodash.isNumber(result) && result > 0 + $scope.allowSend = lodash.isNumber(result) + && result > 0 && (!$scope.shapeshiftOrderId - || (result >= $scope.minShapeshiftAmount && result <= $scope.maxShapeshiftAmount)); + || (result >= $scope.minShapeshiftAmount && result <= $scope.maxShapeshiftAmount)) + && !$scope.fundsAreInsufficient; } + + } else { + $scope.fundsAreInsufficient = false; } }; @@ -584,6 +613,7 @@ angular.module('copayApp.controllers').controller('amountController', function($ $timeout(function() { $scope.$apply(); }); + rateService.updateRates(); }); } @@ -632,5 +662,15 @@ angular.module('copayApp.controllers').controller('amountController', function($ updateUnitUI(); $scope.close(); }); - }; + }; + + function updateSpendableAmountInSatoshisFromWallet(wallet) { + if (wallet.status) { + spendableAmountInSatoshis = wallet.status.spendableAmount; + } else if (fromWallet.cachedStatus) { + spendableAmountInSatoshis = wallet.cachedStatus.spendableAmount; + } else { + spendableAmountInSatoshis = null; + } + } }); From 61f1603bbffb90bd7661a31990821af9b77a1e13 Mon Sep 17 00:00:00 2001 From: Brendon Duncan Date: Thu, 19 Jul 2018 12:52:37 +1200 Subject: [PATCH 019/256] Added $scope.availableFunds. --- src/js/controllers/amount.js | 51 +++++++++++++++++++++++++++--------- 1 file changed, 39 insertions(+), 12 deletions(-) diff --git a/src/js/controllers/amount.js b/src/js/controllers/amount.js index 3d8422447..1ea8f3104 100644 --- a/src/js/controllers/amount.js +++ b/src/js/controllers/amount.js @@ -3,11 +3,14 @@ angular.module('copayApp.controllers').controller('amountController', function($scope, $filter, $timeout, $ionicModal, $ionicScrollDelegate, $ionicHistory, walletService, gettextCatalog, platformInfo, lodash, configService, rateService, $stateParams, $window, $state, $log, txFormatService, ongoingProcess, popupService, profileService, nodeWebkitService) { var _id; + var availableFundsInCrypto = ''; + var availableFundsInFiat = ''; + var availableSatoshis = null; var unitToSatoshi; var satToUnit; var unitDecimals; var satToBtc; - var spendableAmountInSatoshis = null; + var SMALL_FONT_SIZE_LIMIT = 10; var LENGTH_EXPRESSION_LIMIT = 19; @@ -23,6 +26,8 @@ angular.module('copayApp.controllers').controller('amountController', function($ var fixedUnit; $scope.amountModel = { amount: 0 }; + $scope.availableFunds = ''; + // Use insufficient for logic, as when the amount is invalid, funds being // either sufficent or insufficient doesn't make sense. @@ -143,8 +148,7 @@ angular.module('copayApp.controllers').controller('amountController', function($ if ($scope.fromWalletId) { var fromWallet = profileService.getWallet($scope.fromWalletId); - console.log('got fromWallet.'); - updateSpendableAmountInSatoshisFromWallet(fromWallet); + updateAvailableFundsFromWallet(fromWallet); } }; @@ -281,12 +285,15 @@ angular.module('copayApp.controllers').controller('amountController', function($ if (availableUnits[unitIndex].isFiat) { altUnitIndex = altUnitIndex == 0 && availableUnits.length > 2 ? 1 : 0; + $scope.availableFunds = availableFundsInFiat || availableFundsInCrypto; } else { altUnitIndex = lodash.findIndex(availableUnits, { isFiat: true }); + $scope.availableFunds = availableFundsInCrypto; } + console.log('availableFunds: ' + $scope.availableFunds); updateUnitUI(); }; @@ -401,8 +408,8 @@ angular.module('copayApp.controllers').controller('amountController', function($ if (a) { var amountInSatoshis = a * unitToSatoshi; $scope.fundsAreInsufficient = !!$scope.fromWalletId - && spendableAmountInSatoshis !== null - && spendableAmountInSatoshis < amountInSatoshis; + && availableSatoshis !== null + && availableSatoshis < amountInSatoshis; $scope.alternativeAmount = txFormatService.formatAmount(amountInSatoshis, true); $scope.allowSend = lodash.isNumber(a) @@ -421,8 +428,8 @@ angular.module('copayApp.controllers').controller('amountController', function($ } } else { $scope.fundsAreInsufficient = !!$scope.fromWalletId - && spendableAmountInSatoshis !== null - && spendableAmountInSatoshis < result * unitToSatoshi; + && availableSatoshis !== null + && availableSatoshis < result * unitToSatoshi; $scope.alternativeAmount = $filter('formatFiatAmount')(toFiat(result)); $scope.allowSend = lodash.isNumber(result) @@ -664,13 +671,33 @@ angular.module('copayApp.controllers').controller('amountController', function($ }); }; - function updateSpendableAmountInSatoshisFromWallet(wallet) { + function updateAvailableFundsFromWallet(wallet) { if (wallet.status) { - spendableAmountInSatoshis = wallet.status.spendableAmount; - } else if (fromWallet.cachedStatus) { - spendableAmountInSatoshis = wallet.cachedStatus.spendableAmount; + availableFundsInCrypto = wallet.status.spendableBalanceStr; + availableSatoshis = wallet.status.spendableAmount; + if (wallet.status.alternativeBalanceAvailable) { + availableFundsInFiat = wallet.status.spendableBalanceAlternative + ' ' + wallet.status.alternativeIsoCode; + } else { + availableFundsInFiat = ''; + } + + } else if (wallet.cachedStatus) { + + if (wallet.cachedStatus.alternativeBalanceAvailable) { + availableFundsInFiat = wallet.cachedStatus.spendableBalanceAlternative + ' ' + wallet.cachedStatus.alternativeIsoCode; + } else { + availableFundsInFiat = ''; + } + availableFundsInCrypto = wallet.cachedStatus.spendableBalanceStr; + availableSatoshis = wallet.cachedStatus.spendableAmount; + } else { - spendableAmountInSatoshis = null; + + availableFundsInFiat = ''; + availableFundsInCrypto = ''; + availableSatoshis = null; } + + } }); From 9e7566b171fb7c46876b1a2adcb9bb705170147f Mon Sep 17 00:00:00 2001 From: Brendon Duncan Date: Thu, 19 Jul 2018 12:58:17 +1200 Subject: [PATCH 020/256] Removing log statements. --- src/js/controllers/amount.js | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/js/controllers/amount.js b/src/js/controllers/amount.js index 1ea8f3104..92d54c281 100644 --- a/src/js/controllers/amount.js +++ b/src/js/controllers/amount.js @@ -293,7 +293,6 @@ angular.module('copayApp.controllers').controller('amountController', function($ $scope.availableFunds = availableFundsInCrypto; } - console.log('availableFunds: ' + $scope.availableFunds); updateUnitUI(); }; @@ -697,7 +696,5 @@ angular.module('copayApp.controllers').controller('amountController', function($ availableFundsInCrypto = ''; availableSatoshis = null; } - - } }); From d2d1511e61ed4cad15add697488d7d9c37ff766b Mon Sep 17 00:00:00 2001 From: Brendon Duncan Date: Thu, 19 Jul 2018 13:03:29 +1200 Subject: [PATCH 021/256] Added some additional validation checks on wallet status. --- src/js/controllers/amount.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/js/controllers/amount.js b/src/js/controllers/amount.js index 92d54c281..7684aaac6 100644 --- a/src/js/controllers/amount.js +++ b/src/js/controllers/amount.js @@ -671,7 +671,7 @@ angular.module('copayApp.controllers').controller('amountController', function($ }; function updateAvailableFundsFromWallet(wallet) { - if (wallet.status) { + if (wallet.status && wallet.status.isValid) { availableFundsInCrypto = wallet.status.spendableBalanceStr; availableSatoshis = wallet.status.spendableAmount; if (wallet.status.alternativeBalanceAvailable) { @@ -680,7 +680,7 @@ angular.module('copayApp.controllers').controller('amountController', function($ availableFundsInFiat = ''; } - } else if (wallet.cachedStatus) { + } else if (wallet.cachedStatus && wallet.status.isValid) { if (wallet.cachedStatus.alternativeBalanceAvailable) { availableFundsInFiat = wallet.cachedStatus.spendableBalanceAlternative + ' ' + wallet.cachedStatus.alternativeIsoCode; From 19bec8a09aac2079abc632db721a1f4cdeaf5632 Mon Sep 17 00:00:00 2001 From: Brendon Duncan Date: Thu, 19 Jul 2018 15:34:53 +1200 Subject: [PATCH 022/256] Fixed update of available funds text. --- src/js/controllers/amount.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/js/controllers/amount.js b/src/js/controllers/amount.js index 7684aaac6..40a5f63ce 100644 --- a/src/js/controllers/amount.js +++ b/src/js/controllers/amount.js @@ -696,5 +696,12 @@ angular.module('copayApp.controllers').controller('amountController', function($ availableFundsInCrypto = ''; availableSatoshis = null; } + + if (availableUnits[unitIndex].isFiat) { + $scope.availableFunds = availableFundsInFiat || availableFundsInCrypto; + } else { + $scope.availableFunds = availableFundsInCrypto; + } + } }); From 0076ff26e6c637a553991ea0d109cb72dcccb1b0 Mon Sep 17 00:00:00 2001 From: Brendon Duncan Date: Thu, 19 Jul 2018 16:24:24 +1200 Subject: [PATCH 023/256] Currency of available funds changes when the currency of the amount is changed. --- src/js/controllers/amount.js | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/js/controllers/amount.js b/src/js/controllers/amount.js index 40a5f63ce..c705dc24b 100644 --- a/src/js/controllers/amount.js +++ b/src/js/controllers/amount.js @@ -665,11 +665,31 @@ angular.module('copayApp.controllers').controller('amountController', function($ availableUnits[altUnitIndex].name = newAltCurrency.isoCode; availableUnits[altUnitIndex].shortName = newAltCurrency.isoCode; fiatCode = newAltCurrency.isoCode; + updateAvailableFiatIfNeeded(); updateUnitUI(); $scope.close(); }); }; + + function updateAvailableFiatIfNeeded() { + if ($scope.fromWalletId && availableSatoshis !== null) { + availableFundsInFiat = ''; + $scope.availableFunds = availableFundsInCrypto; + var coin = availableUnits[altUnitIndex].isFiat ? availableUnits[unitIndex].id : availableUnits[altUnitIndex].id; + txFormatService.formatAlternativeStr(coin, availableSatoshis, function formatCallback(formatted){ + if (formatted) { + availableFundsInFiat = formatted; + if (availableUnits[unitIndex].isFiat) { + $scope.availableFunds = availableFundsInFiat; + } else { + $scope.availableFunds = availableFundsInCrypto; + } + } + }); + } + } + function updateAvailableFundsFromWallet(wallet) { if (wallet.status && wallet.status.isValid) { availableFundsInCrypto = wallet.status.spendableBalanceStr; From 0a96ae0dbedb9b421114283c6f847af2a4024dd2 Mon Sep 17 00:00:00 2001 From: Brendon Duncan Date: Thu, 19 Jul 2018 17:06:53 +1200 Subject: [PATCH 024/256] Added $scope.isRequestingSpecifcAmount. --- src/js/controllers/amount.js | 4 ++++ www/index.html | 7 +++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/js/controllers/amount.js b/src/js/controllers/amount.js index 52695e829..f4e789436 100644 --- a/src/js/controllers/amount.js +++ b/src/js/controllers/amount.js @@ -26,6 +26,8 @@ angular.module('copayApp.controllers').controller('amountController', function($ $scope.isAndroid = platformInfo.isAndroid; $scope.isIos = platformInfo.isIOS; + $scope.isRequestingSpecificAmount = false; + $scope.$on('$ionicView.leave', function() { angular.element($window).off('keydown'); }); @@ -51,6 +53,8 @@ angular.module('copayApp.controllers').controller('amountController', function($ } } + $scope.isRequestingSpecificAmount = !!data.stateParams.id; + var config = configService.getSync().wallet.settings; function setAvailableUnits() { 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 4f4bee27f1c53eef16b541542bae2c8fac586fe5 Mon Sep 17 00:00:00 2001 From: Sebastiaan Pasma Date: Thu, 19 Jul 2018 09:59:56 +0200 Subject: [PATCH 025/256] 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 026/256] 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 a2f6277e7eaca60b0bb90139ccc35abefda4bf9c Mon Sep 17 00:00:00 2001 From: Sam Cheng Hung Date: Thu, 19 Jul 2018 17:41:02 +0800 Subject: [PATCH 027/256] Added content-frame, item and ion-content components, added dummy wallet interfaces --- src/sass/components/components.scss | 3 ++ src/sass/components/content-frame.scss | 11 ++++++ src/sass/components/ion-content.scss | 13 ++++++ src/sass/components/item.scss | 39 ++++++++++++++++++ src/sass/icons.scss | 7 ++++ src/sass/views/review.scss | 8 ++++ src/sass/views/views.scss | 1 + www/css/main.css | 55 ++++++++++++++++++++++++++ www/views/review.html | 44 ++++++++++++++++++++- 9 files changed, 179 insertions(+), 2 deletions(-) create mode 100644 src/sass/components/content-frame.scss create mode 100644 src/sass/components/ion-content.scss create mode 100644 src/sass/components/item.scss create mode 100644 src/sass/views/review.scss diff --git a/src/sass/components/components.scss b/src/sass/components/components.scss index 833f565dd..fa0d9008b 100644 --- a/src/sass/components/components.scss +++ b/src/sass/components/components.scss @@ -1 +1,4 @@ @import "header"; +@import "content-frame"; +@import "item"; +@import "ion-content"; diff --git a/src/sass/components/content-frame.scss b/src/sass/components/content-frame.scss new file mode 100644 index 000000000..1c6831271 --- /dev/null +++ b/src/sass/components/content-frame.scss @@ -0,0 +1,11 @@ +.content-frame { + &.negative-top { + margin-top: -20px; + + .card { + &:first-child { + margin-top: 0; + } + } + } +} \ No newline at end of file diff --git a/src/sass/components/ion-content.scss b/src/sass/components/ion-content.scss new file mode 100644 index 000000000..7be47c9ab --- /dev/null +++ b/src/sass/components/ion-content.scss @@ -0,0 +1,13 @@ +/* +* Extends Ionic v1 ion-content +*/ + +ion-content { + &.bg-neutral { + background-color: #F2F2F2; + } + + &.padded-bottom-cta { + bottom: 92px; + } +} \ No newline at end of file diff --git a/src/sass/components/item.scss b/src/sass/components/item.scss new file mode 100644 index 000000000..0d8ece804 --- /dev/null +++ b/src/sass/components/item.scss @@ -0,0 +1,39 @@ +/* +* Extends Ionic v1 item +*/ + +.item { + &.item-compact { + padding: 11px 13px; + } + &.item-gutterless { + padding: 0; + } + + .item-content { + &.item-content-compact { + min-height: 69px; + padding: 13px 11px 13px 68px; + + > img, + > i { + &:first-child { + position: absolute; + max-width: 40px; + max-height: 40px; + width: 100%; + height: 100%; + border-radius: 50%; + left: 13px; + top: 50%; + padding: 0; + transform: translate(0,-50%); + } + } + } + + .highlight { + color: #FAB915; + } + } +} \ No newline at end of file diff --git a/src/sass/icons.scss b/src/sass/icons.scss index 7d14f8886..ee270408f 100644 --- a/src/sass/icons.scss +++ b/src/sass/icons.scss @@ -88,6 +88,13 @@ background-image: url('../img/icon-faucet.svg'); background-size: 70%; } + + &.icon-wallet { + background-color: #FAB915; + background-image: url('../img/icon-wallet.svg'); + border: none; + box-shadow: 0 0 0 1px rgba(0,0,0,0.3) inset; + } } } diff --git a/src/sass/views/review.scss b/src/sass/views/review.scss new file mode 100644 index 000000000..e1d4ebd07 --- /dev/null +++ b/src/sass/views/review.scss @@ -0,0 +1,8 @@ +#view-review { + background-color: #494949; + + slide-to-accept, slide-to-accept-success { + margin-bottom: constant(safe-area-inset-bottom); /* iOS 11.0 */ + margin-bottom: env(safe-area-inset-bottom); /* iOS 11.2 */ + } +} \ No newline at end of file diff --git a/src/sass/views/views.scss b/src/sass/views/views.scss index d4ed735ed..1e54062f9 100644 --- a/src/sass/views/views.scss +++ b/src/sass/views/views.scss @@ -48,3 +48,4 @@ @import "includes/logOptions"; @import "includes/checkBar"; @import "cashScan"; +@import "review"; diff --git a/www/css/main.css b/www/css/main.css index 2e2726888..7b40c47c7 100644 --- a/www/css/main.css +++ b/www/css/main.css @@ -10037,6 +10037,11 @@ ion-view.deflash-blue:before, ion-view#view-amount:before, ion-view#view-confirm .big-icon-svg.theme-circle > .bg.icon-faucet { background-image: url("../img/icon-faucet.svg"); background-size: 70%; } + .big-icon-svg.theme-circle > .bg.icon-wallet { + background-color: #FAB915; + background-image: url("../img/icon-wallet.svg"); + border: none; + box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.3) inset; } .big-icon-svg.theme-circle-services > .bg { border: 1px solid #191919; } .big-icon-svg.theme-circle-community > .bg { @@ -15062,6 +15067,14 @@ log-options #check-bar .checkbox-icon { #cash-scan a { cursor: pointer; } +#view-review { + background-color: #494949; } + #view-review slide-to-accept, #view-review slide-to-accept-success { + margin-bottom: constant(safe-area-inset-bottom); + /* iOS 11.0 */ + margin-bottom: env(safe-area-inset-bottom); + /* iOS 11.2 */ } + .gravatar { border-radius: 3px; display: inline-block; } @@ -15090,6 +15103,48 @@ log-options #check-bar .checkbox-icon { .header .content p + p { margin-top: 8px; } +.content-frame.negative-top { + margin-top: -20px; } + .content-frame.negative-top .card:first-child { + margin-top: 0; } + +/* +* Extends Ionic v1 item +*/ +.item.item-compact { + padding: 11px 13px; } + +.item.item-gutterless { + padding: 0; } + +.item .item-content.item-content-compact { + min-height: 69px; + padding: 13px 11px 13px 68px; } + .item .item-content.item-content-compact > img:first-child, + .item .item-content.item-content-compact > i:first-child { + position: absolute; + max-width: 40px; + max-height: 40px; + width: 100%; + height: 100%; + border-radius: 50%; + left: 13px; + top: 50%; + padding: 0; + transform: translate(0, -50%); } + +.item .item-content .highlight { + color: #FAB915; } + +/* +* Extends Ionic v1 ion-content +*/ +ion-content.bg-neutral { + background-color: #F2F2F2; } + +ion-content.padded-bottom-cta { + bottom: 92px; } + /* This is for rules that don't yet have a home. * Our goal is to delete this file. Search the regex: /class=".*CLASS.*?"/ */ diff --git a/www/views/review.html b/www/views/review.html index cc57c79b8..563ddf6d6 100644 --- a/www/views/review.html +++ b/www/views/review.html @@ -1,4 +1,4 @@ - + {{'Review'|translate}} @@ -7,7 +7,7 @@ - +

You are sending

@@ -15,6 +15,46 @@

0.014 BCH

+ +
+
+
From:
+
+
+ +
+
+

Personal Wallet (BCH)

+

128.67

+
+
+
+
+
From:
+
+
+ +
+
+

Personal Wallet (BTC)

+

128.67

+
+
+
+
+
To:
+
+
+ +

Satoshi Nakamoto

+

128.67

+
+
+
+
Date: Thu, 19 Jul 2018 13:10:25 +0200 Subject: [PATCH 028/256] 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 029/256] 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 030/256] 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 22e93b823c4f508f88e12ebe31894e976061df45 Mon Sep 17 00:00:00 2001 From: Sam Cheng Hung Date: Thu, 19 Jul 2018 20:21:58 +0800 Subject: [PATCH 031/256] Adds address component --- src/sass/components/address.scss | 27 ++++++++++++++++++++++++ src/sass/components/components.scss | 1 + src/sass/components/item.scss | 13 ++++++++++-- www/css/main.css | 32 ++++++++++++++++++++++++++--- www/views/review.html | 9 +++++--- 5 files changed, 74 insertions(+), 8 deletions(-) create mode 100644 src/sass/components/address.scss diff --git a/src/sass/components/address.scss b/src/sass/components/address.scss new file mode 100644 index 000000000..2848deb82 --- /dev/null +++ b/src/sass/components/address.scss @@ -0,0 +1,27 @@ +.address { + background-color: #F8F8F8; + border: 0.5px solid #EDEBEB; + border-radius: 3px; + padding: 9px; + text-align: center; + font-size: 14px; + overflow: hidden; + text-overflow: ellipsis; + + &.expanded { + white-space: pre-wrap; + word-break: break-all; + } + + .prefix { + color: #000000; + } + + .mid { + color: #919191; + } + + .suffix { + color: #000000; + } +} \ No newline at end of file diff --git a/src/sass/components/components.scss b/src/sass/components/components.scss index fa0d9008b..b547defad 100644 --- a/src/sass/components/components.scss +++ b/src/sass/components/components.scss @@ -2,3 +2,4 @@ @import "content-frame"; @import "item"; @import "ion-content"; +@import "address"; diff --git a/src/sass/components/item.scss b/src/sass/components/item.scss index 0d8ece804..bb75ae8e0 100644 --- a/src/sass/components/item.scss +++ b/src/sass/components/item.scss @@ -11,7 +11,7 @@ } .item-content { - &.item-content-compact { + &.item-content-avatar { min-height: 69px; padding: 13px 11px 13px 68px; @@ -32,8 +32,17 @@ } } + &.item-content-compact { + min-height: 0; + padding: 13px 11px; + } + .highlight { - color: #FAB915; + color: #FAB915 + } + + + .item-content { + padding-top: 0; } } } \ No newline at end of file diff --git a/www/css/main.css b/www/css/main.css index 7b40c47c7..4f9410e68 100644 --- a/www/css/main.css +++ b/www/css/main.css @@ -15117,11 +15117,11 @@ log-options #check-bar .checkbox-icon { .item.item-gutterless { padding: 0; } -.item .item-content.item-content-compact { +.item .item-content.item-content-avatar { min-height: 69px; padding: 13px 11px 13px 68px; } - .item .item-content.item-content-compact > img:first-child, - .item .item-content.item-content-compact > i:first-child { + .item .item-content.item-content-avatar > img:first-child, + .item .item-content.item-content-avatar > i:first-child { position: absolute; max-width: 40px; max-height: 40px; @@ -15133,9 +15133,16 @@ log-options #check-bar .checkbox-icon { padding: 0; transform: translate(0, -50%); } +.item .item-content.item-content-compact { + min-height: 0; + padding: 13px 11px; } + .item .item-content .highlight { color: #FAB915; } +.item .item-content + .item-content { + padding-top: 0; } + /* * Extends Ionic v1 ion-content */ @@ -15145,6 +15152,25 @@ ion-content.bg-neutral { ion-content.padded-bottom-cta { bottom: 92px; } +.address { + background-color: #F8F8F8; + border: 0.5px solid #EDEBEB; + border-radius: 3px; + padding: 9px; + text-align: center; + font-size: 14px; + overflow: hidden; + text-overflow: ellipsis; } + .address.expanded { + white-space: pre-wrap; + word-break: break-all; } + .address .prefix { + color: #000000; } + .address .mid { + color: #919191; } + .address .suffix { + color: #000000; } + /* This is for rules that don't yet have a home. * Our goal is to delete this file. Search the regex: /class=".*CLASS.*?"/ */ diff --git a/www/views/review.html b/www/views/review.html index 563ddf6d6..9df212be9 100644 --- a/www/views/review.html +++ b/www/views/review.html @@ -20,7 +20,7 @@
From:
-
+
From:
-
+
@@ -47,11 +47,14 @@
To:
-
+

Satoshi Nakamoto

128.67

+
+
qz9cqq5pryv9hnqwa8q8mccmynk9uf4vlu5nxerpzmc
+
From 8ddfffd56b4dca5458545e5421cb467cdeb45be4 Mon Sep 17 00:00:00 2001 From: Sebastiaan Pasma Date: Thu, 19 Jul 2018 15:21:27 +0200 Subject: [PATCH 032/256] 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 033/256] 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 034/256] 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 035/256] 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 c3cded5cb06ca88e32b50d5b33dbf583e450fbba Mon Sep 17 00:00:00 2001 From: Sebastiaan Pasma Date: Thu, 19 Jul 2018 15:50:09 +0200 Subject: [PATCH 036/256] wallet to wallet (sub)title --- src/js/controllers/walletToWalletController.js | 4 ++++ www/views/wallet-to-wallet-transfer.html | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/js/controllers/walletToWalletController.js b/src/js/controllers/walletToWalletController.js index 77d2218e6..eaf8f7700 100644 --- a/src/js/controllers/walletToWalletController.js +++ b/src/js/controllers/walletToWalletController.js @@ -2,6 +2,10 @@ angular.module('copayApp.controllers').controller('walletToWalletController', function($scope, $rootScope, $log, profileService, configService) { + // TODO: change according to which screen this is, origin/destination + $scope.headerTitle = gettextCatalog.getString('Choose your origin wallet'); + $scope.headerSubtitle = gettextCatalog.getString('This is where the Bitcoin will be taken out from.'); + $scope.$on("$ionicView.enter", function(event, data) { $scope.walletsBch = profileService.getWallets({coin: 'bch'}); $scope.walletsBtc = profileService.getWallets({coin: 'btc'}); diff --git a/www/views/wallet-to-wallet-transfer.html b/www/views/wallet-to-wallet-transfer.html index f172f40da..87ae6f6ed 100644 --- a/www/views/wallet-to-wallet-transfer.html +++ b/www/views/wallet-to-wallet-transfer.html @@ -5,10 +5,10 @@
- Choose your origin wallet + {{headerTitle}}
- This is where the Bitcoin will be taken out from. + {{headerSubtitle}}
From 3952df634324176ccdbdb7652ac1992a48264dea Mon Sep 17 00:00:00 2001 From: Sebastiaan Pasma Date: Thu, 19 Jul 2018 17:07:30 +0200 Subject: [PATCH 037/256] 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 da853bcbf685f0bcec66a108bea5b2ecf3772730 Mon Sep 17 00:00:00 2001 From: Brendon Duncan Date: Fri, 20 Jul 2018 18:15:25 +1200 Subject: [PATCH 038/256] Placeholders for buttons. --- www/views/shapeshift.html | 2 ++ 1 file changed, 2 insertions(+) diff --git a/www/views/shapeshift.html b/www/views/shapeshift.html index 27be00fbd..48664ebba 100644 --- a/www/views/shapeshift.html +++ b/www/views/shapeshift.html @@ -13,6 +13,8 @@
No available wallets to convert between. + +
From 6efd338f87c94913ad5c745aba5eb6108ed1f1be Mon Sep 17 00:00:00 2001 From: Sam Cheng Hung Date: Fri, 20 Jul 2018 15:56:39 +0800 Subject: [PATCH 039/256] Adds action-minor component --- src/sass/components/action-minor.scss | 23 +++++++++++++++++++++++ src/sass/components/components.scss | 1 + www/css/main.css | 15 +++++++++++++++ www/img/icon-bookmark.svg | 3 +++ www/views/review.html | 4 ++++ 5 files changed, 46 insertions(+) create mode 100644 src/sass/components/action-minor.scss create mode 100644 www/img/icon-bookmark.svg diff --git a/src/sass/components/action-minor.scss b/src/sass/components/action-minor.scss new file mode 100644 index 000000000..74fbe5639 --- /dev/null +++ b/src/sass/components/action-minor.scss @@ -0,0 +1,23 @@ +.action-minor { + margin: 20px 14px; + font-size: 14px; + + &.mt-negative { + margin-top: -10px; + } + + &.right { + text-align: right; + } + + > .action-icon { + width: 15px; + height: 15px; + vertical-align: middle; + margin-right: 3px; + } + + > .action-text { + vertical-align: middle; + } +} \ No newline at end of file diff --git a/src/sass/components/components.scss b/src/sass/components/components.scss index b547defad..c0224e56f 100644 --- a/src/sass/components/components.scss +++ b/src/sass/components/components.scss @@ -3,3 +3,4 @@ @import "item"; @import "ion-content"; @import "address"; +@import "action-minor"; diff --git a/www/css/main.css b/www/css/main.css index 4f9410e68..b34db534e 100644 --- a/www/css/main.css +++ b/www/css/main.css @@ -15171,6 +15171,21 @@ ion-content.padded-bottom-cta { .address .suffix { color: #000000; } +.action-minor { + margin: 20px 14px; + font-size: 14px; } + .action-minor.mt-negative { + margin-top: -10px; } + .action-minor.right { + text-align: right; } + .action-minor > .action-icon { + width: 15px; + height: 15px; + vertical-align: middle; + margin-right: 3px; } + .action-minor > .action-text { + vertical-align: middle; } + /* This is for rules that don't yet have a home. * Our goal is to delete this file. Search the regex: /class=".*CLASS.*?"/ */ diff --git a/www/img/icon-bookmark.svg b/www/img/icon-bookmark.svg new file mode 100644 index 000000000..b1ad892fd --- /dev/null +++ b/www/img/icon-bookmark.svg @@ -0,0 +1,3 @@ + + + diff --git a/www/views/review.html b/www/views/review.html index 9df212be9..2bef9a95e 100644 --- a/www/views/review.html +++ b/www/views/review.html @@ -57,6 +57,10 @@
+
+ + Add a personal note +
Date: Fri, 20 Jul 2018 10:06:59 +0200 Subject: [PATCH 040/256] 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 041/256] 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 893dbe5c6fa4a8fad918adda1e036c8a95656700 Mon Sep 17 00:00:00 2001 From: Sebastiaan Pasma Date: Mon, 23 Jul 2018 14:20:46 +0200 Subject: [PATCH 042/256] "has no funds" case --- .../controllers/walletToWalletController.js | 24 ++++--- src/js/services/profileService.js | 7 ++ src/sass/views/wallet-to-wallet-transfer.scss | 69 ++++++++++++++++--- www/views/wallet-to-wallet-transfer.html | 24 +++++-- 4 files changed, 103 insertions(+), 21 deletions(-) diff --git a/src/js/controllers/walletToWalletController.js b/src/js/controllers/walletToWalletController.js index eaf8f7700..e12b78837 100644 --- a/src/js/controllers/walletToWalletController.js +++ b/src/js/controllers/walletToWalletController.js @@ -1,14 +1,23 @@ 'use strict'; -angular.module('copayApp.controllers').controller('walletToWalletController', function($scope, $rootScope, $log, profileService, configService) { - - // TODO: change according to which screen this is, origin/destination - $scope.headerTitle = gettextCatalog.getString('Choose your origin wallet'); - $scope.headerSubtitle = gettextCatalog.getString('This is where the Bitcoin will be taken out from.'); +angular.module('copayApp.controllers').controller('walletToWalletController', function($scope, $rootScope, $log, configService, gettextCatalog, profileService) { $scope.$on("$ionicView.enter", function(event, data) { - $scope.walletsBch = profileService.getWallets({coin: 'bch'}); - $scope.walletsBtc = profileService.getWallets({coin: 'btc'}); + $scope.type = 'origin'; + $scope.coin = 'bch'; + $scope.walletsEmpty = []; + $scope.isPaymentRequest = true; + + if ($scope.type === 'origin') { + $scope.headerTitle = gettextCatalog.getString('Choose a wallet to send from'); + $scope.walletsEmpty = profileService.getWallets({coin: $scope.coin, hasNoFunds: true}); + } else if ($scope.type === 'destination') { + $scope.headerTitle = gettextCatalog.getString('Choose a wallet to send to'); + } + + $scope.walletsBch = profileService.getWallets({coin: 'bch', hasFunds: $scope.type==='origin'}); + $scope.walletsBtc = profileService.getWallets({coin: 'btc', hasFunds: $scope.type==='origin'}); + configService.whenAvailable(function(config) { $scope.selectedPriceDisplay = config.wallet.settings.priceDisplay; }); @@ -17,5 +26,4 @@ angular.module('copayApp.controllers').controller('walletToWalletController', fu $scope.useWallet = function(wallet) { // Do something with selected wallet }; - }); \ No newline at end of file diff --git a/src/js/services/profileService.js b/src/js/services/profileService.js index 4f8710c28..c86d263f2 100644 --- a/src/js/services/profileService.js +++ b/src/js/services/profileService.js @@ -847,6 +847,13 @@ angular.module('copayApp.services') }); } + if (opts.hasNoFunds) { + ret = lodash.filter(ret, function(w) { + if (!w.status) return; + return (w.status.availableBalanceSat === 0); + }); + } + if (opts.minAmount) { ret = lodash.filter(ret, function(w) { if (!w.status) return; diff --git a/src/sass/views/wallet-to-wallet-transfer.scss b/src/sass/views/wallet-to-wallet-transfer.scss index e909258cf..7328a2891 100644 --- a/src/sass/views/wallet-to-wallet-transfer.scss +++ b/src/sass/views/wallet-to-wallet-transfer.scss @@ -1,18 +1,71 @@ #wallet-to-wallet-transfer { - .header, .list { + .header--request { + padding: 30px 24px; + width: 100%; + height: 139px; + background-color: #fff; + &__title { + width: 46px; + height: 20px; + font-size: 16px; + font-weight: 600; + letter-spacing: -0.4px; + color: #000000; + } + &__amount { + font-size: 29px; + font-weight: 600; + letter-spacing: -0.7px; + color: #000000; + margin: 11px 0 2px; + } + &__amount-alt { + opacity: 0.45; + font-size: 16px; + font-weight: 600; + letter-spacing: -0.4px; + color: #000000; + } + } + .wallets-header { font-size: 12px; - margin: 20px 14px; + margin: 20px 14px 0px; .title { - font-size: 20px; + font-size: 16px; font-weight: bold; color: $v-dark-gray; + margin-bottom: -12px; } - .subtitle { - font-size: 12px; - line-height: 1.5em; - font-weight: 300; - color: $v-dark-gray; + } + .card { + font-size: 12px; + margin: 20px 14px 0px; + + .item-heading { + font-weight: 600; + } + + &-insufficient { + .wallet { + opacity: 0.4; + + } + .item-heading { + font-size: 12px; + >div { + display: inline-block; + vertical-align: text-bottom; + } + } + &__dot { + display: inline-block; + width: 16px; + height: 16px; + background-color: #ec5959; + border-radius: 8px; + margin: 2px 6px 2px 2px; + } } } } \ No newline at end of file diff --git a/www/views/wallet-to-wallet-transfer.html b/www/views/wallet-to-wallet-transfer.html index 87ae6f6ed..2055e4845 100644 --- a/www/views/wallet-to-wallet-transfer.html +++ b/www/views/wallet-to-wallet-transfer.html @@ -3,13 +3,15 @@ {{'Wallet to wallet transfer' | translate}} -
+
+
Paying
+
$37.42 USD
+
0.04580000 BCH
+
+
{{headerTitle}}
-
- {{headerSubtitle}} -
@@ -25,7 +27,7 @@
-
+
Bitcoin Core (BTC)
@@ -37,5 +39,17 @@
+ +
+
+
Insufficient funds
+
+
+ + + +
+
\ No newline at end of file From 7aecd2306f64188e45be5f4a65a491a08f9f70c1 Mon Sep 17 00:00:00 2001 From: Sebastiaan Pasma Date: Mon, 23 Jul 2018 14:48:25 +0200 Subject: [PATCH 043/256] comments & show wallets --- src/js/controllers/walletToWalletController.js | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/js/controllers/walletToWalletController.js b/src/js/controllers/walletToWalletController.js index e12b78837..d83f93ddb 100644 --- a/src/js/controllers/walletToWalletController.js +++ b/src/js/controllers/walletToWalletController.js @@ -3,10 +3,10 @@ angular.module('copayApp.controllers').controller('walletToWalletController', function($scope, $rootScope, $log, configService, gettextCatalog, profileService) { $scope.$on("$ionicView.enter", function(event, data) { - $scope.type = 'origin'; - $scope.coin = 'bch'; + $scope.type = 'origin'; // origin || destination + $scope.coin = false; // Wallets to show (for destination screen) $scope.walletsEmpty = []; - $scope.isPaymentRequest = true; + $scope.isPaymentRequest = true; // Show price-header if ($scope.type === 'origin') { $scope.headerTitle = gettextCatalog.getString('Choose a wallet to send from'); @@ -15,8 +15,12 @@ angular.module('copayApp.controllers').controller('walletToWalletController', fu $scope.headerTitle = gettextCatalog.getString('Choose a wallet to send to'); } - $scope.walletsBch = profileService.getWallets({coin: 'bch', hasFunds: $scope.type==='origin'}); - $scope.walletsBtc = profileService.getWallets({coin: 'btc', hasFunds: $scope.type==='origin'}); + if (!$scope.coin || $scope.coin === 'bch') { + $scope.walletsBch = profileService.getWallets({coin: 'bch', hasFunds: $scope.type==='origin'}); + } + if (!$scope.coin || $scope.coin === 'btc') { + $scope.walletsBtc = profileService.getWallets({coin: 'btc', hasFunds: $scope.type === 'origin'}); + } configService.whenAvailable(function(config) { $scope.selectedPriceDisplay = config.wallet.settings.priceDisplay; From 3604ee3c3cc66a9233ed2c8af5091563f605565e Mon Sep 17 00:00:00 2001 From: Sebastiaan Pasma Date: Mon, 23 Jul 2018 16:58:32 +0200 Subject: [PATCH 044/256] routes, renames and flow --- src/js/controllers/sendFlowController.js | 69 ++++++++++++++++++ src/js/controllers/tab-send.js | 73 +++++++++---------- .../controllers/walletToWalletController.js | 33 --------- src/js/routes.js | 22 +++++- src/js/services/incomingData.js | 6 +- src/sass/views/views.scss | 2 +- ...er.scss => wallet-origin-destination.scss} | 2 +- www/views/tab-send.html | 54 +++++++------- ...er.html => wallet-origin-destination.html} | 4 +- 9 files changed, 160 insertions(+), 105 deletions(-) create mode 100644 src/js/controllers/sendFlowController.js delete mode 100644 src/js/controllers/walletToWalletController.js rename src/sass/views/{wallet-to-wallet-transfer.scss => wallet-origin-destination.scss} (97%) rename www/views/{wallet-to-wallet-transfer.html => wallet-origin-destination.html} (96%) diff --git a/src/js/controllers/sendFlowController.js b/src/js/controllers/sendFlowController.js new file mode 100644 index 000000000..ec29d7b50 --- /dev/null +++ b/src/js/controllers/sendFlowController.js @@ -0,0 +1,69 @@ +'use strict'; + +angular.module('copayApp.controllers').controller('sendFlowController', function($scope, $rootScope, $state, $stateParams, $log, configService, gettextCatalog, profileService) { + + var unitToSatoshi; + var satToUnit; + var unitDecimals; + var satToBtc; + + $scope.$on("$ionicView.beforeEnter", function(event, data) { + var config = configService.getSync().wallet.settings; + + $scope.specificAmount = $scope.specificAlternativeAmount = ''; + unitToSatoshi = config.unitToSatoshi; + satToUnit = 1 / unitToSatoshi; + satToBtc = 1 / 100000000; + unitDecimals = config.unitDecimals; + + // in SAT ALWAYS + if ($stateParams.toAmount) { + $scope.requestAmount = (($stateParams.toAmount) * satToUnit).toFixed(unitDecimals); + $scope.isPaymentRequest = true; + } + + console.log(data, $stateParams); + + $scope.params = $stateParams; + }); + + $scope.$on("$ionicView.enter", function(event, data) { + console.log(data, $stateParams); + $scope.type = data.stateParams.fromWalletId ? 'destination' : 'origin'; // origin || destination + $scope.coin = false; // Wallets to show (for destination screen) + $scope.walletsEmpty = []; + // Show price-header + + if ($scope.type === 'origin') { + $scope.headerTitle = gettextCatalog.getString('Choose a wallet to send from'); + $scope.walletsEmpty = profileService.getWallets({coin: $scope.coin, hasNoFunds: true}); + } else if ($scope.type === 'destination') { + + $scope.fromWallet = profileService.getWallet(data.stateParams.fromWalletId); + $scope.coin = $scope.fromWallet.coin; + + $scope.headerTitle = gettextCatalog.getString('Choose a wallet to send to'); + } + + if (!$scope.coin || $scope.coin === 'bch') { + $scope.walletsBch = profileService.getWallets({coin: 'bch', hasFunds: $scope.type==='origin'}); + } + if (!$scope.coin || $scope.coin === 'btc') { + $scope.walletsBtc = profileService.getWallets({coin: 'btc', hasFunds: $scope.type === 'origin'}); + } + + configService.whenAvailable(function(config) { + $scope.selectedPriceDisplay = config.wallet.settings.priceDisplay; + }); + }); + + $scope.useWallet = function(wallet) { + if ($scope.type === 'origin') { + $scope.params['fromWalletId'] = wallet.id; + $state.transitionTo('tabs.send.destination', $scope.params); + } else { + $scope.params['toWalletId'] = wallet.id; + $state.transitionTo('tabs.send.amount', $scope.params); + } + }; +}); \ No newline at end of file diff --git a/src/js/controllers/tab-send.js b/src/js/controllers/tab-send.js index 99265457d..8e0ae6b92 100644 --- a/src/js/controllers/tab-send.js +++ b/src/js/controllers/tab-send.js @@ -54,42 +54,42 @@ angular.module('copayApp.controllers').controller('tabSendController', function( updateList(); }); }); - - var wallets; - var walletsBch; - var walletsBtc; - var walletToWalletFrom = false; - - $scope.onWalletSelect = function(wallet) { - if (!$scope.walletToWalletFrom) { - $scope.walletToWalletFrom = wallet; - if (wallet.coin === 'bch') { - $scope.showWalletsBch = true; - } else if (wallet.coin === 'btc') { - $scope.showWalletsBtc = true; - } - $scope.walletSelectorTitleTo = gettextCatalog.getString('Send to'); - } else { - $ionicLoading.show(); - walletService.getAddress(wallet, true, function(err, addr) { - $ionicLoading.hide(); - return $state.transitionTo('tabs.send.amount', { - displayAddress: $scope.walletToWalletFrom.coin === 'bch' ? bitcoinCashJsService.translateAddresses(addr).cashaddr : addr, - recipientType: 'wallet', - fromWalletId: $scope.walletToWalletFrom.id, - toAddress: addr, - coin: $scope.walletToWalletFrom.coin - }); - }); - - } - }; - - $scope.showWalletSelector = function() { - $scope.walletToWalletFrom = false; - $scope.walletSelectorTitleFrom = gettextCatalog.getString('Send from'); - $scope.showWallets = true; - }; + // + // var wallets; + // var walletsBch; + // var walletsBtc; + // var walletToWalletFrom = false; + // + // $scope.onWalletSelect = function(wallet) { + // if (!$scope.walletToWalletFrom) { + // $scope.walletToWalletFrom = wallet; + // if (wallet.coin === 'bch') { + // $scope.showWalletsBch = true; + // } else if (wallet.coin === 'btc') { + // $scope.showWalletsBtc = true; + // } + // $scope.walletSelectorTitleTo = gettextCatalog.getString('Send to'); + // } else { + // $ionicLoading.show(); + // walletService.getAddress(wallet, true, function(err, addr) { + // $ionicLoading.hide(); + // return $state.transitionTo('tabs.send.amount', { + // displayAddress: $scope.walletToWalletFrom.coin === 'bch' ? bitcoinCashJsService.translateAddresses(addr).cashaddr : addr, + // recipientType: 'wallet', + // fromWalletId: $scope.walletToWalletFrom.id, + // toAddress: addr, + // coin: $scope.walletToWalletFrom.coin + // }); + // }); + // + // } + // }; + // + // $scope.showWalletSelector = function() { + // $scope.walletToWalletFrom = false; + // $scope.walletSelectorTitleFrom = gettextCatalog.getString('Send from'); + // $scope.showWallets = true; + // }; $scope.findContact = function(search) { @@ -133,7 +133,6 @@ angular.module('copayApp.controllers').controller('tabSendController', function( }; var updateHasFunds = function() { - $scope.hasFunds = false; var index = 0; lodash.each($scope.wallets, function(w) { diff --git a/src/js/controllers/walletToWalletController.js b/src/js/controllers/walletToWalletController.js deleted file mode 100644 index d83f93ddb..000000000 --- a/src/js/controllers/walletToWalletController.js +++ /dev/null @@ -1,33 +0,0 @@ -'use strict'; - -angular.module('copayApp.controllers').controller('walletToWalletController', function($scope, $rootScope, $log, configService, gettextCatalog, profileService) { - - $scope.$on("$ionicView.enter", function(event, data) { - $scope.type = 'origin'; // origin || destination - $scope.coin = false; // Wallets to show (for destination screen) - $scope.walletsEmpty = []; - $scope.isPaymentRequest = true; // Show price-header - - if ($scope.type === 'origin') { - $scope.headerTitle = gettextCatalog.getString('Choose a wallet to send from'); - $scope.walletsEmpty = profileService.getWallets({coin: $scope.coin, hasNoFunds: true}); - } else if ($scope.type === 'destination') { - $scope.headerTitle = gettextCatalog.getString('Choose a wallet to send to'); - } - - if (!$scope.coin || $scope.coin === 'bch') { - $scope.walletsBch = profileService.getWallets({coin: 'bch', hasFunds: $scope.type==='origin'}); - } - if (!$scope.coin || $scope.coin === 'btc') { - $scope.walletsBtc = profileService.getWallets({coin: 'btc', hasFunds: $scope.type === 'origin'}); - } - - configService.whenAvailable(function(config) { - $scope.selectedPriceDisplay = config.wallet.settings.priceDisplay; - }); - }); - - $scope.useWallet = function(wallet) { - // Do something with selected wallet - }; -}); \ No newline at end of file diff --git a/src/js/routes.js b/src/js/routes.js index 72397d872..29273d444 100644 --- a/src/js/routes.js +++ b/src/js/routes.js @@ -270,6 +270,24 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr } } }) + .state('tabs.send.origin', { + url: '/origin/:thirdParty/:amount/:toAddress/:toWalletId', + views: { + 'tab-send@tabs': { + controller: 'sendFlowController', + templateUrl: 'views/wallet-origin-destination.html', + } + } + }) + .state('tabs.send.destination', { + url: '/destination/:fromWalletId/:thirdParty/:amount', + views: { + 'tab-send@tabs': { + controller: 'sendFlowController', + templateUrl: 'views/wallet-origin-destination.html', + } + } + }) .state('tabs.settings', { url: '/settings', views: { @@ -299,7 +317,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr url: '/wallet-to-wallet', views: { 'tab-send@tabs': { - controller: 'walletToWalletController', + controller: 'sendFlowController', templateUrl: 'views/wallet-to-wallet-transfer.html' } } @@ -1273,7 +1291,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr if (screen.width < 768 && platformInfo.isCordova) screen.lockOrientation('portrait'); - if (ionic.Platform.isAndroid() && StatusBar) { + if (ionic.Platform.isAndroid() && platformInfo.isCordova && StatusBar) { StatusBar.backgroundColorByHexString('#000000'); } diff --git a/src/js/services/incomingData.js b/src/js/services/incomingData.js index 1bb87b49c..fc3d37d47 100644 --- a/src/js/services/incomingData.js +++ b/src/js/services/incomingData.js @@ -83,7 +83,7 @@ angular.module('copayApp.services').factory('incomingData', function($log, $stat // Timeout is required to enable the "Back" button $timeout(function() { if (amount) { - $state.transitionTo('tabs.send.confirm', { + $state.transitionTo('tabs.send.origin', { toAmount: amount, toAddress: addr, displayAddress: originalAddress ? originalAddress : addr, @@ -102,8 +102,10 @@ angular.module('copayApp.services').factory('incomingData', function($log, $stat params['minShapeshiftAmount'] = shapeshiftData.minAmount; params['maxShapeshiftAmount'] = shapeshiftData.maxAmount; params['shapeshiftOrderId'] = shapeshiftData.orderId; + $state.transitionTo('tabs.send.amount', params); + } else { + $state.transitionTo('tabs.send.origin', params); } - $state.transitionTo('tabs.send.amount', params); } }, 100); } diff --git a/src/sass/views/views.scss b/src/sass/views/views.scss index 538787901..e1a122dbb 100644 --- a/src/sass/views/views.scss +++ b/src/sass/views/views.scss @@ -8,7 +8,7 @@ @import "tab-receive"; @import "tab-scan"; @import "tab-send"; -@import "wallet-to-wallet-transfer"; +@import "wallet-origin-destination"; @import "tab-settings"; @import "wallet-colors"; @import "walletBalance"; diff --git a/src/sass/views/wallet-to-wallet-transfer.scss b/src/sass/views/wallet-origin-destination.scss similarity index 97% rename from src/sass/views/wallet-to-wallet-transfer.scss rename to src/sass/views/wallet-origin-destination.scss index 7328a2891..94fbe8e4b 100644 --- a/src/sass/views/wallet-to-wallet-transfer.scss +++ b/src/sass/views/wallet-origin-destination.scss @@ -1,4 +1,4 @@ -#wallet-to-wallet-transfer { +#wallet-origin-destination { .header--request { padding: 30px 24px; width: 100%; diff --git a/www/views/tab-send.html b/www/views/tab-send.html index b5d556214..a1e8a778f 100644 --- a/www/views/tab-send.html +++ b/www/views/tab-send.html @@ -105,31 +105,31 @@
- - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/www/views/wallet-to-wallet-transfer.html b/www/views/wallet-origin-destination.html similarity index 96% rename from www/views/wallet-to-wallet-transfer.html rename to www/views/wallet-origin-destination.html index 2055e4845..66f5852ad 100644 --- a/www/views/wallet-to-wallet-transfer.html +++ b/www/views/wallet-origin-destination.html @@ -1,4 +1,4 @@ - + {{'Wallet to wallet transfer' | translate}} @@ -6,7 +6,7 @@
Paying
$37.42 USD
-
0.04580000 BCH
+
0.04580000 BCH {{requestAmount}}
From ac91282c13ac419f15513106df9eb1f52adc114c Mon Sep 17 00:00:00 2001 From: Brendon Duncan Date: Mon, 23 Jul 2018 12:02:04 -0700 Subject: [PATCH 045/256] Indicative change for view. --- www/views/amount.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/www/views/amount.html b/www/views/amount.html index af4e9d55c..8361dcd73 100644 --- a/www/views/amount.html +++ b/www/views/amount.html @@ -27,7 +27,7 @@
-
-
- +
From 4b18e4b1c3ac8fce0ec76a7b922880cfeb8fb381 Mon Sep 17 00:00:00 2001 From: Sam Cheng Hung Date: Tue, 24 Jul 2018 15:27:21 +0800 Subject: [PATCH 048/256] Adds expand-content component, update various UI measurements --- src/sass/components/action-minor.scss | 5 +- src/sass/components/card.scss | 5 ++ src/sass/components/components.scss | 7 +- src/sass/components/content-frame.scss | 2 +- src/sass/components/expand-content.scss | 26 ++++++++ src/sass/components/header.scss | 2 +- src/sass/directives/directives.scss | 1 + src/sass/directives/elastic.scss | 4 ++ www/css/main.css | 88 ++++++++++++++++--------- www/img/icon-bookmark.svg | 10 ++- www/views/review.html | 42 ++++++------ 11 files changed, 133 insertions(+), 59 deletions(-) create mode 100644 src/sass/components/card.scss create mode 100644 src/sass/components/expand-content.scss create mode 100644 src/sass/directives/elastic.scss diff --git a/src/sass/components/action-minor.scss b/src/sass/components/action-minor.scss index 74fbe5639..f158fe845 100644 --- a/src/sass/components/action-minor.scss +++ b/src/sass/components/action-minor.scss @@ -3,10 +3,10 @@ font-size: 14px; &.mt-negative { - margin-top: -10px; + margin-top: 0; } - &.right { + &.text-right { text-align: right; } @@ -19,5 +19,6 @@ > .action-text { vertical-align: middle; + color: #444444; } } \ No newline at end of file diff --git a/src/sass/components/card.scss b/src/sass/components/card.scss new file mode 100644 index 000000000..6df235ab8 --- /dev/null +++ b/src/sass/components/card.scss @@ -0,0 +1,5 @@ +.card { + &.card-gutter-compact { + margin: 10px 12px; + } +} \ No newline at end of file diff --git a/src/sass/components/components.scss b/src/sass/components/components.scss index c0224e56f..180279125 100644 --- a/src/sass/components/components.scss +++ b/src/sass/components/components.scss @@ -1,6 +1,9 @@ -@import "header"; -@import "content-frame"; @import "item"; @import "ion-content"; +@import "card"; + +@import "header"; +@import "content-frame"; @import "address"; @import "action-minor"; +@import "expand-content"; diff --git a/src/sass/components/content-frame.scss b/src/sass/components/content-frame.scss index 1c6831271..5766b246b 100644 --- a/src/sass/components/content-frame.scss +++ b/src/sass/components/content-frame.scss @@ -1,6 +1,6 @@ .content-frame { &.negative-top { - margin-top: -20px; + margin-top: -40px; .card { &:first-child { diff --git a/src/sass/components/expand-content.scss b/src/sass/components/expand-content.scss new file mode 100644 index 000000000..934a2beec --- /dev/null +++ b/src/sass/components/expand-content.scss @@ -0,0 +1,26 @@ +.expand-content-frame { + position: relative; + + .expand-content-trigger { + position: absolute; + top: 0; + transition: opacity 0.3s ease; + right: 0; + + &.expand-content-revealed { + opacity: 0; + } + } + + .expand-content { + opacity: 0; + transform-origin: 100% 0%; + transform: scale(0,0); + transition: opacity 0.3s ease, transform 0.3s ease; + + &.expand-content-revealed { + opacity: 1; + transform: scale(1,1); + } + } +} \ No newline at end of file diff --git a/src/sass/components/header.scss b/src/sass/components/header.scss index 1c178dd07..fad1f1812 100644 --- a/src/sass/components/header.scss +++ b/src/sass/components/header.scss @@ -1,5 +1,5 @@ .header { - padding: 29px 12px 65px; + padding: 29px 12px 61px; background-color: #FAB915; color: #FFFFFF; diff --git a/src/sass/directives/directives.scss b/src/sass/directives/directives.scss index 9159d3f23..954b86c3a 100644 --- a/src/sass/directives/directives.scss +++ b/src/sass/directives/directives.scss @@ -1 +1,2 @@ @import "gravatar"; +@import "elastic"; \ No newline at end of file diff --git a/src/sass/directives/elastic.scss b/src/sass/directives/elastic.scss new file mode 100644 index 000000000..8e8aba4fa --- /dev/null +++ b/src/sass/directives/elastic.scss @@ -0,0 +1,4 @@ +.elastic { + width: 100%; + font-size: 14px; +} \ No newline at end of file diff --git a/www/css/main.css b/www/css/main.css index b34db534e..df8779400 100644 --- a/www/css/main.css +++ b/www/css/main.css @@ -15079,34 +15079,9 @@ log-options #check-bar .checkbox-icon { border-radius: 3px; display: inline-block; } -.header { - padding: 29px 12px 65px; - background-color: #FAB915; - color: #FFFFFF; } - .header .title { - font-size: 18px; - font-weight: 400; - line-height: 1em; - color: #FFFFFF; - text-align: center; } - .header .title + .content { - margin-top: 23px; } - .header .content { - text-align: center; } - .header .content p { - margin: 0; - line-height: 1em; - font-size: 18px; } - .header .content p.large { - font-size: 29px; - font-weight: 600; } - .header .content p + p { - margin-top: 8px; } - -.content-frame.negative-top { - margin-top: -20px; } - .content-frame.negative-top .card:first-child { - margin-top: 0; } +.elastic { + width: 100%; + font-size: 14px; } /* * Extends Ionic v1 item @@ -15152,6 +15127,38 @@ ion-content.bg-neutral { ion-content.padded-bottom-cta { bottom: 92px; } +.card.card-gutter-compact { + margin: 10px 12px; } + +.header { + padding: 29px 12px 61px; + background-color: #FAB915; + color: #FFFFFF; } + .header .title { + font-size: 18px; + font-weight: 400; + line-height: 1em; + color: #FFFFFF; + text-align: center; } + .header .title + .content { + margin-top: 23px; } + .header .content { + text-align: center; } + .header .content p { + margin: 0; + line-height: 1em; + font-size: 18px; } + .header .content p.large { + font-size: 29px; + font-weight: 600; } + .header .content p + p { + margin-top: 8px; } + +.content-frame.negative-top { + margin-top: -40px; } + .content-frame.negative-top .card:first-child { + margin-top: 0; } + .address { background-color: #F8F8F8; border: 0.5px solid #EDEBEB; @@ -15175,8 +15182,8 @@ ion-content.padded-bottom-cta { margin: 20px 14px; font-size: 14px; } .action-minor.mt-negative { - margin-top: -10px; } - .action-minor.right { + margin-top: 0; } + .action-minor.text-right { text-align: right; } .action-minor > .action-icon { width: 15px; @@ -15184,7 +15191,26 @@ ion-content.padded-bottom-cta { vertical-align: middle; margin-right: 3px; } .action-minor > .action-text { - vertical-align: middle; } + vertical-align: middle; + color: #444444; } + +.expand-content-frame { + position: relative; } + .expand-content-frame .expand-content-trigger { + position: absolute; + top: 0; + transition: opacity 0.3s ease; + right: 0; } + .expand-content-frame .expand-content-trigger.expand-content-revealed { + opacity: 0; } + .expand-content-frame .expand-content { + opacity: 0; + transform-origin: 100% 0%; + transform: scale(0, 0); + transition: opacity 0.3s ease, transform 0.3s ease; } + .expand-content-frame .expand-content.expand-content-revealed { + opacity: 1; + transform: scale(1, 1); } /* This is for rules that don't yet have a home. * Our goal is to delete this file. Search the regex: /class=".*CLASS.*?"/ diff --git a/www/img/icon-bookmark.svg b/www/img/icon-bookmark.svg index b1ad892fd..5db1f9047 100644 --- a/www/img/icon-bookmark.svg +++ b/www/img/icon-bookmark.svg @@ -1,3 +1,11 @@ - + + + + diff --git a/www/views/review.html b/www/views/review.html index 2bef9a95e..9de1a403e 100644 --- a/www/views/review.html +++ b/www/views/review.html @@ -7,9 +7,9 @@ - +
-

You are sending

13.98 USD

0.014 BCH

@@ -17,7 +17,7 @@
-
+
From:
@@ -31,21 +31,8 @@
-
-
From:
-
-
- -
-
-

Personal Wallet (BTC)

-

128.67

-
-
-
-
-
To:
+
+
To:
@@ -57,9 +44,22 @@
-
- - Add a personal note +
+
+ + Add a personal note +
+
+
Personal Note:
+
+
+ +
+
+
From fd4adbfb57be5d678a5319c9e17f4e2c75b771b4 Mon Sep 17 00:00:00 2001 From: Sebastiaan Pasma Date: Tue, 24 Jul 2018 14:24:22 +0200 Subject: [PATCH 049/256] wallet to wallet case worked out. Also fixed routes and some css --- src/js/controllers/amount.js | 27 +-- src/js/controllers/confirm.js | 174 +++++++++--------- src/js/controllers/sendFlowController.js | 31 ++-- src/js/routes.js | 42 ++--- src/js/services/incomingData.js | 4 +- src/sass/views/wallet-origin-destination.scss | 5 +- 6 files changed, 152 insertions(+), 131 deletions(-) diff --git a/src/js/controllers/amount.js b/src/js/controllers/amount.js index 52695e829..c8383a510 100644 --- a/src/js/controllers/amount.js +++ b/src/js/controllers/amount.js @@ -31,7 +31,6 @@ angular.module('copayApp.controllers').controller('amountController', function($ }); $scope.$on("$ionicView.beforeEnter", function(event, data) { - initCurrencies(); if (data.stateParams.shapeshiftOrderId && data.stateParams.shapeshiftOrderId.length > 0) { @@ -42,6 +41,7 @@ angular.module('copayApp.controllers').controller('amountController', function($ // To get the wallet from with the new flow $scope.fromWalletId = data.stateParams.fromWalletId; + $scope.toWalletId = data.stateParams.toWalletId; if (data.stateParams.noPrefix) { $scope.showWarningMessage = data.stateParams.noPrefix != 0; @@ -156,10 +156,10 @@ angular.module('copayApp.controllers').controller('amountController', function($ $scope.toEmail = data.stateParams.toEmail; $scope.toColor = data.stateParams.toColor; - if (!$scope.nextStep && !data.stateParams.toAddress) { - $log.error('Bad params at amount') - throw ('bad params'); - } + // if (!$scope.nextStep && !data.stateParams.toAddress) { + // $log.error('Bad params at amount') + // throw ('bad params'); + // } var reNr = /^[1234567890\.]$/; var reOp = /^[\*\+\-\/]$/; @@ -198,8 +198,8 @@ angular.module('copayApp.controllers').controller('amountController', function($ $scope.resetAmount(); // in SAT ALWAYS - if ($stateParams.toAmount) { - $scope.amountModel.amount = (($stateParams.toAmount) * satToUnit).toFixed(unitDecimals); + if ($stateParams.amount) { + $scope.amountModel.amount = (($stateParams.amount) * satToUnit).toFixed(unitDecimals); } $scope.processAmount(); @@ -461,7 +461,8 @@ angular.module('copayApp.controllers').controller('amountController', function($ currency: unit.id.toUpperCase(), coin: coin, useSendMax: $scope.useSendMax, - fromWalletId: $scope.fromWalletId + fromWalletId: $scope.fromWalletId, + toWalletId: $scope.toWalletId }); } else { var amount = _amount; @@ -474,7 +475,7 @@ angular.module('copayApp.controllers').controller('amountController', function($ var confirmData = { recipientType: $scope.recipientType, - toAmount: amount, + amount: amount, toAddress: $scope.toAddress, displayAddress: $scope.displayAddress || $scope.toAddress, toName: $scope.toName, @@ -482,14 +483,14 @@ angular.module('copayApp.controllers').controller('amountController', function($ toColor: $scope.toColor, coin: coin, useSendMax: $scope.useSendMax, - fromWalletId: $scope.fromWalletId + fromWalletId: $scope.fromWalletId, + toWalletId: $scope.toWalletId }; if ($scope.shapeshiftOrderId) { var shapeshiftOrderUrl = 'https://www.shapeshift.io/#/status/'; shapeshiftOrderUrl += $scope.shapeshiftOrderId; confirmData.description = shapeshiftOrderUrl; - confirmData.fromWalletId = $scope.fromWalletId; if (confirmData.useSendMax) { var wallet = lodash.find(profileService.getWallets({ coin: coin }), @@ -500,10 +501,10 @@ angular.module('copayApp.controllers').controller('amountController', function($ var balance = parseFloat(wallet.cachedBalance.substring(0, wallet.cachedBalance.length-4)); if (balance < $scope.minShapeshiftAmount * 1.04) { confirmData.useSendMax = false; - confirmData.toAmount = $scope.minShapeshiftAmount * unitToSatoshi; + confirmData.amount = $scope.minShapeshiftAmount * unitToSatoshi; } else if (balance > $scope.maxShapeshiftAmount) { confirmData.useSendMax = false; - confirmData.toAmount = $scope.maxShapeshiftAmount * unitToSatoshi * 0.99; + confirmData.amount = $scope.maxShapeshiftAmount * unitToSatoshi * 0.99; } } } diff --git a/src/js/controllers/confirm.js b/src/js/controllers/confirm.js index 03af26fd1..74b86e623 100644 --- a/src/js/controllers/confirm.js +++ b/src/js/controllers/confirm.js @@ -1,6 +1,6 @@ '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, $ionicLoading, 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) { var countDown = null; var FEE_TOO_HIGH_LIMIT_PER = 15; @@ -68,82 +68,95 @@ angular.module('copayApp.controllers').controller('confirmController', function( }); }; + var setWalletSelector = function(coin, network, minAmount, cb) { + + // no min amount? (sendMax) => look for no empty wallets + minAmount = minAmount || 1; + + $scope.wallets = profileService.getWallets({ + onlyComplete: true, + network: network, + coin: coin + }); + + if (tx.fromWalletId) { + $scope.wallets = lodash.filter($scope.wallets, function (w) { + return w.id == tx.fromWalletId; + }); + } + + + if (!$scope.wallets || !$scope.wallets.length) { + setNoWallet(gettextCatalog.getString('No wallets available'), true); + return cb(); + } + + var filteredWallets = []; + var index = 0; + var walletsUpdated = 0; + + lodash.each($scope.wallets, function (w) { + walletService.getStatus(w, {}, function (err, status) { + if (err || !status) { + $log.error(err); + } else { + walletsUpdated++; + w.status = status; + + if (!status.availableBalanceSat) + $log.debug('No balance available in: ' + w.name); + + if (status.availableBalanceSat > minAmount) { + filteredWallets.push(w); + } + } + + if (++index == $scope.wallets.length) { + if (!walletsUpdated) + return cb('Could not update any wallet'); + + if (lodash.isEmpty(filteredWallets)) { + setNoWallet(gettextCatalog.getString('Insufficient confirmed funds'), true); + } + $scope.wallets = lodash.clone(filteredWallets); + return cb(); + } + }); + }); + }; $scope.$on("$ionicView.beforeEnter", function(event, data) { - - function setWalletSelector(coin, network, minAmount, cb) { - - // no min amount? (sendMax) => look for no empty wallets - minAmount = minAmount || 1; - - $scope.wallets = profileService.getWallets({ - onlyComplete: true, - network: network, - coin: coin - }); - - if (tx.fromWalletId) { - $scope.wallets = lodash.filter($scope.wallets, function(w) { - return w.id == tx.fromWalletId; - }); - } - - - - if (!$scope.wallets || !$scope.wallets.length) { - setNoWallet(gettextCatalog.getString('No wallets available'), true); - return cb(); - } - - var filteredWallets = []; - var index = 0; - var walletsUpdated = 0; - - lodash.each($scope.wallets, function(w) { - walletService.getStatus(w, {}, function(err, status) { - if (err || !status) { - $log.error(err); - } else { - walletsUpdated++; - w.status = status; - - if (!status.availableBalanceSat) - $log.debug('No balance available in: ' + w.name); - - if (status.availableBalanceSat > minAmount) { - filteredWallets.push(w); - } - } - - if (++index == $scope.wallets.length) { - if (!walletsUpdated) - return cb('Could not update any wallet'); - - if (lodash.isEmpty(filteredWallets)) { - setNoWallet(gettextCatalog.getString('Insufficient confirmed funds'), true); - } - $scope.wallets = lodash.clone(filteredWallets); - return cb(); - } - }); - }); - }; - // Setup $scope var B = data.stateParams.coin == 'bch' ? bitcoreCash : bitcore; var networkName; + $scope.fromWallet = profileService.getWallet(data.stateParams.fromWalletId); + $scope.recipientType = null; + try { - networkName = (new B.Address(data.stateParams.toAddress)).network.name; - } catch(e) { + if (data.stateParams.toWalletId) { + $scope.recipientType = 'wallet'; // set type to wallet-to-wallet + $ionicLoading.show(); + var wallet = profileService.getWallet(data.stateParams.toWalletId); + walletService.getAddress(wallet, true, function (err, addr) { + $ionicLoading.hide(); + data.stateParams.toAddress = addr; + networkName = (new B.Address(data.stateParams.toAddress)).network.name; + vanityTx(networkName, data); + }); + } else if (data.stateParams.toAddress) { + networkName = (new B.Address(data.stateParams.toAddress)).network.name; + vanityTx(networkName, data); + } + } catch (e) { var message = gettextCatalog.getString('Invalid address'); var backText = gettextCatalog.getString('Go back'); var learnText = gettextCatalog.getString('Learn more'); - popupService.showConfirm(null, message, backText, learnText, function(back) { + popupService.showConfirm(null, message, backText, learnText, function (back) { $ionicHistory.nextViewOptions({ disableAnimate: true, historyRoot: true }); - $state.go('tabs.send').then(function() { + $state.go('tabs.send').then(function () { $ionicHistory.clearHistory(); if (!back) { var url = 'https://support.bitpay.com/hc/en-us/articles/115004671663'; @@ -153,27 +166,24 @@ angular.module('copayApp.controllers').controller('confirmController', function( }); return; } - + }); + var vanityTx = function(networkName, data) { // Grab stateParams tx = { - toAmount: parseInt(data.stateParams.toAmount), + amount: parseInt(data.stateParams.amount), sendMax: data.stateParams.useSendMax == 'true' ? true : false, fromWalletId: data.stateParams.fromWalletId, toAddress: data.stateParams.toAddress, - displayAddress: data.stateParams.displayAddress, - description: data.stateParams.description, - paypro: data.stateParams.paypro, - feeLevel: configFeeLevel, spendUnconfirmed: walletConfig.spendUnconfirmed, // Vanity tx info (not in the real tx) - recipientType: data.stateParams.recipientType || null, + recipientType: $scope.recipientType || null, toName: data.stateParams.toName, toEmail: data.stateParams.toEmail, toColor: data.stateParams.toColor, network: networkName, - coin: data.stateParams.coin, + coin: $scope.fromWallet.coin, txp: {}, }; @@ -188,12 +198,10 @@ angular.module('copayApp.controllers').controller('confirmController', function( // Other Scope vars $scope.isCordova = isCordova; - $scope.isWindowsPhoneApp = isWindowsPhoneApp; $scope.showAddress = false; - $scope.walletSelectorTitle = gettextCatalog.getString('Send from'); - setWalletSelector(tx.coin, tx.network, tx.toAmount, function(err) { + setWalletSelector(tx.coin, tx.network, tx.amount, function(err) { if (err) { return exitWithError('Could not update wallets'); } @@ -207,7 +215,7 @@ angular.module('copayApp.controllers').controller('confirmController', function( $scope.displayBalanceAsFiat = walletConfig.settings.priceDisplay === 'fiat'; - }); + }; function getSendMaxInfo(tx, wallet, cb) { @@ -231,7 +239,7 @@ angular.module('copayApp.controllers').controller('confirmController', function( return setSendError(msg); } - if (tx.toAmount > Number.MAX_SAFE_INTEGER) { + if (tx.amount > Number.MAX_SAFE_INTEGER) { var msg = gettextCatalog.getString('Amount too big'); $log.warn(msg); return setSendError(msg); @@ -241,7 +249,7 @@ angular.module('copayApp.controllers').controller('confirmController', function( txp.outputs = [{ 'toAddress': tx.toAddress, - 'amount': tx.toAmount, + 'amount': tx.amount, 'message': tx.description }]; @@ -280,13 +288,13 @@ angular.module('copayApp.controllers').controller('confirmController', function( $scope.tx = tx; function updateAmount() { - if (!tx.toAmount) return; + if (!tx.amount) return; // Amount - tx.amountStr = txFormatService.formatAmountStr(wallet.coin, tx.toAmount); + tx.amountStr = txFormatService.formatAmountStr(wallet.coin, tx.amount); tx.amountValueStr = tx.amountStr.split(' ')[0]; tx.amountUnitStr = tx.amountStr.split(' ')[1]; - txFormatService.formatAlternativeStr(wallet.coin, tx.toAmount, function(v) { + txFormatService.formatAlternativeStr(wallet.coin, tx.amount, function(v) { var parts = v.split(' '); tx.alternativeAmountStr = v; tx.alternativeAmountValueStr = parts[0]; @@ -342,7 +350,7 @@ angular.module('copayApp.controllers').controller('confirmController', function( } tx.sendMaxInfo = sendMaxInfo; - tx.toAmount = tx.sendMaxInfo.amount; + tx.amount = tx.sendMaxInfo.amount; updateAmount(); ongoingProcess.set('calculatingFee', false); $timeout(function() { @@ -393,7 +401,7 @@ angular.module('copayApp.controllers').controller('confirmController', function( function useSelectedWallet() { if (!$scope.useSendMax) { - showAmount(tx.toAmount); + showAmount(tx.amount); } $scope.onWalletSelect($scope.wallet); diff --git a/src/js/controllers/sendFlowController.js b/src/js/controllers/sendFlowController.js index ec29d7b50..d6f2b707d 100644 --- a/src/js/controllers/sendFlowController.js +++ b/src/js/controllers/sendFlowController.js @@ -6,34 +6,34 @@ angular.module('copayApp.controllers').controller('sendFlowController', function var satToUnit; var unitDecimals; var satToBtc; + var nextStep = ''; $scope.$on("$ionicView.beforeEnter", function(event, data) { var config = configService.getSync().wallet.settings; - + $scope.params = $stateParams; $scope.specificAmount = $scope.specificAlternativeAmount = ''; unitToSatoshi = config.unitToSatoshi; satToUnit = 1 / unitToSatoshi; satToBtc = 1 / 100000000; unitDecimals = config.unitDecimals; - // in SAT ALWAYS - if ($stateParams.toAmount) { - $scope.requestAmount = (($stateParams.toAmount) * satToUnit).toFixed(unitDecimals); + if ($scope.params.amount) { + console.log("is Payment Request", $scope.params.amount); + + $scope.requestAmount = (($stateParams.amount) * satToUnit).toFixed(unitDecimals); $scope.isPaymentRequest = true; } - - console.log(data, $stateParams); - - $scope.params = $stateParams; }); $scope.$on("$ionicView.enter", function(event, data) { console.log(data, $stateParams); - $scope.type = data.stateParams.fromWalletId ? 'destination' : 'origin'; // origin || destination + $scope.type = data.stateParams && data.stateParams['fromWalletId'] ? 'destination' : 'origin'; // origin || destination $scope.coin = false; // Wallets to show (for destination screen) $scope.walletsEmpty = []; // Show price-header + console.log("current type: "+$scope.type); + if ($scope.type === 'origin') { $scope.headerTitle = gettextCatalog.getString('Choose a wallet to send from'); $scope.walletsEmpty = profileService.getWallets({coin: $scope.coin, hasNoFunds: true}); @@ -57,13 +57,22 @@ angular.module('copayApp.controllers').controller('sendFlowController', function }); }); + function getNextStep() { + if (!$scope.params.toWalletId && !$scope.params.toAddress) { + return 'tabs.send.destination'; + } else if (!$scope.params.amount) { + return 'tabs.send.amount'; + } else { + return 'tabs.send.confirm'; + } + } + $scope.useWallet = function(wallet) { if ($scope.type === 'origin') { $scope.params['fromWalletId'] = wallet.id; - $state.transitionTo('tabs.send.destination', $scope.params); } else { $scope.params['toWalletId'] = wallet.id; - $state.transitionTo('tabs.send.amount', $scope.params); } + $state.transitionTo(getNextStep(), $scope.params); }; }); \ No newline at end of file diff --git a/src/js/routes.js b/src/js/routes.js index 29273d444..de77a34d5 100644 --- a/src/js/routes.js +++ b/src/js/routes.js @@ -270,24 +270,6 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr } } }) - .state('tabs.send.origin', { - url: '/origin/:thirdParty/:amount/:toAddress/:toWalletId', - views: { - 'tab-send@tabs': { - controller: 'sendFlowController', - templateUrl: 'views/wallet-origin-destination.html', - } - } - }) - .state('tabs.send.destination', { - url: '/destination/:fromWalletId/:thirdParty/:amount', - views: { - 'tab-send@tabs': { - controller: 'sendFlowController', - templateUrl: 'views/wallet-origin-destination.html', - } - } - }) .state('tabs.settings', { url: '/settings', views: { @@ -305,7 +287,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr */ .state('tabs.send.amount', { - url: '/amount/:recipientType/:toAddress/:toName/:toEmail/:toColor/:coin/:fixedUnit/:fromWalletId/:minShapeshiftAmount/:maxShapeshiftAmount/:shapeshiftOrderId/:displayAddress/:noPrefix', + url: '/amount/:recipientType/:toAddress/:toName/:toEmail/:toColor/:coin/:fixedUnit/:fromWalletId/:toWalletId/:minShapeshiftAmount/:maxShapeshiftAmount/:shapeshiftOrderId/:displayAddress/:noPrefix', views: { 'tab-send@tabs': { controller: 'amountController', @@ -318,12 +300,30 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr views: { 'tab-send@tabs': { controller: 'sendFlowController', - templateUrl: 'views/wallet-to-wallet-transfer.html' + templateUrl: 'views/wallet-origin-destination.html' + } + } + }) + .state('tabs.send.origin', { + url: '/origin/:thirdParty/:amount/:toAddress/:toWalletId', + views: { + 'tab-send@tabs': { + controller: 'sendFlowController', + templateUrl: 'views/wallet-origin-destination.html', + } + } + }) + .state('tabs.send.destination', { + url: '/destination/:thirdParty/:amount/:fromWalletId', + views: { + 'tab-send@tabs': { + controller: 'sendFlowController', + templateUrl: 'views/wallet-origin-destination.html', } } }) .state('tabs.send.confirm', { - url: '/confirm/:recipientType/:toAddress/:toName/:toAmount/:toEmail/:toColor/:description/:coin/:useSendMax/:fromWalletId/:displayAddress/:requiredFeeRate', + url: '/confirm/:thirdParty/:amount/:fromWalletId/:toWalletId/:toAddress', views: { 'tab-send@tabs': { controller: 'confirmController', diff --git a/src/js/services/incomingData.js b/src/js/services/incomingData.js index fc3d37d47..e12cc2255 100644 --- a/src/js/services/incomingData.js +++ b/src/js/services/incomingData.js @@ -84,7 +84,7 @@ angular.module('copayApp.services').factory('incomingData', function($log, $stat $timeout(function() { if (amount) { $state.transitionTo('tabs.send.origin', { - toAmount: amount, + amount: amount, toAddress: addr, displayAddress: originalAddress ? originalAddress : addr, description: message, @@ -409,7 +409,7 @@ angular.module('copayApp.services').factory('incomingData', function($log, $stat function handlePayPro(payProDetails, coin) { var stateParams = { - toAmount: payProDetails.amount, + amount: payProDetails.amount, toAddress: payProDetails.toAddress, description: payProDetails.memo, paypro: payProDetails, diff --git a/src/sass/views/wallet-origin-destination.scss b/src/sass/views/wallet-origin-destination.scss index 94fbe8e4b..1c6016862 100644 --- a/src/sass/views/wallet-origin-destination.scss +++ b/src/sass/views/wallet-origin-destination.scss @@ -28,7 +28,6 @@ } } .wallets-header { - font-size: 12px; margin: 20px 14px 0px; .title { @@ -43,7 +42,11 @@ margin: 20px 14px 0px; .item-heading { + .subtitle { + font-size: 12px; + } font-weight: 600; + } &-insufficient { From 91dac0f54c460fb7d41cb8c5a523847454df7050 Mon Sep 17 00:00:00 2001 From: Brendon Duncan Date: Tue, 24 Jul 2018 12:37:51 -0700 Subject: [PATCH 050/256] Refactored Enter Amount controller to follow latest Angular 1 guidelines. --- src/js/controllers/amount.js | 471 +++++++++++++++--------------- src/js/routes.js | 7 + www/views/amount.html | 50 ++-- www/views/modals/altCurrency.html | 18 +- 4 files changed, 276 insertions(+), 270 deletions(-) diff --git a/src/js/controllers/amount.js b/src/js/controllers/amount.js index f4e789436..1bc492136 100644 --- a/src/js/controllers/amount.js +++ b/src/js/controllers/amount.js @@ -1,62 +1,166 @@ 'use strict'; -angular.module('copayApp.controllers').controller('amountController', function($scope, $filter, $timeout, $ionicModal, $ionicScrollDelegate, $ionicHistory, storageService, walletService, gettextCatalog, platformInfo, lodash, configService, rateService, $stateParams, $window, $state, $log, txFormatService, ongoingProcess, popupService, bwcError, payproService, profileService, bitcore, amazonService, nodeWebkitService) { +angular.module('copayApp.controllers').controller('amountController', amountController); + +function amountController(configService, $filter, $ionicHistory, $ionicModal, $ionicScrollDelegate, lodash, $log, nodeWebkitService, rateService, $scope, $state, $stateParams, $timeout, txFormatService, platformInfo, popupService, profileService, walletService, $window) { + var vm = this; + + vm.allowSend = false; + vm.altCurrencyList = []; + vm.alternativeAmount = ''; + vm.alternativeUnit = ''; + vm.amountModel = { amount: 0 }; + vm.fromWalletId = ''; + vm.globalResult = ''; + vm.isRequestingSpecificAmount = false; + vm.listComplete = false; + vm.lastUsedPopularList = []; + vm.maxShapeshiftAmount = 0; + vm.minShapeshiftAmount = 0; + vm.shapeshiftOrderId = ''; + vm.unit = ''; + + vm.changeUnit = changeUnit; + vm.close = close; + vm.findCurrency = findCurrency; + vm.finish = finish; + vm.goBack = goBack; + vm.loadMore = loadMore; + vm.openPopup = openPopup; + vm.pushDigit = pushDigit; + vm.removeDigit = removeDigit; + vm.save = save; + vm.sendMax = sendMax; + + $scope.$on('$ionicView.beforeEnter', onBeforeEnter); + $scope.$on('$ionicView.leave', onLeave); - var _id; - var unitToSatoshi; - var satToUnit; - var unitDecimals; - var satToBtc; - var SMALL_FONT_SIZE_LIMIT = 10; var LENGTH_EXPRESSION_LIMIT = 19; var LENGTH_BEFORE_COMMA_EXPRESSION_LIMIT = 8; var LENGTH_AFTER_COMMA_EXPRESSION_LIMIT = 8; - var isNW = platformInfo.isNW; - var unitIndex = 0; + var _id; + var altCurrencyModal = null; var altUnitIndex = 0; var availableUnits = []; + var displayAddress = null; var fiatCode; - var fixedUnit; + var hasMaxAmount = true; + var isNW = platformInfo.isNW; + var isAndroid = platformInfo.isAndroid; + var isIos = platformInfo.isIOS; + var lastUsedAltCurrencyList = []; + var nextStep = null; + var unitToSatoshi; + var recipientType = null; + var satToUnit; + var showMenu = false; + var showWarningMessage = false; + var toAddress = ''; + var toColor = null; + var toEmail = null; + var toName = null; + var unitDecimals; + var unitIndex = 0; + var useSendMax = false; - $scope.amountModel = { amount: 0 }; - - $scope.isChromeApp = platformInfo.isChromeApp; - $scope.isAndroid = platformInfo.isAndroid; - $scope.isIos = platformInfo.isIOS; - - $scope.isRequestingSpecificAmount = false; - - $scope.$on('$ionicView.leave', function() { + function onLeave() { angular.element($window).off('keydown'); - }); - - $scope.$on("$ionicView.beforeEnter", function(event, data) { + } + function onBeforeEnter(event, data) { + initCurrencies(); if (data.stateParams.shapeshiftOrderId && data.stateParams.shapeshiftOrderId.length > 0) { - $scope.minShapeshiftAmount = parseFloat(data.stateParams.minShapeshiftAmount); - $scope.maxShapeshiftAmount = parseFloat(data.stateParams.maxShapeshiftAmount); - $scope.shapeshiftOrderId = data.stateParams.shapeshiftOrderId; + vm.minShapeshiftAmount = parseFloat(data.stateParams.minShapeshiftAmount); + vm.maxShapeshiftAmount = parseFloat(data.stateParams.maxShapeshiftAmount); + vm.shapeshiftOrderId = data.stateParams.shapeshiftOrderId; } // To get the wallet from with the new flow - $scope.fromWalletId = data.stateParams.fromWalletId; + vm.fromWalletId = data.stateParams.fromWalletId; if (data.stateParams.noPrefix) { - $scope.showWarningMessage = data.stateParams.noPrefix != 0; - if ($scope.showWarningMessage) { + showWarningMessage = data.stateParams.noPrefix != 0; + if (showWarningMessage) { var message = 'Address doesn\'t contain currency information, please make sure you are sending the correct currency.'; popupService.showAlert('', message, function() {}, 'Ok'); } } - $scope.isRequestingSpecificAmount = !!data.stateParams.id; - + vm.isRequestingSpecificAmount = !!data.stateParams.id; var config = configService.getSync().wallet.settings; + // Go to... + _id = data.stateParams.id; // Optional (BitPay Card ID or Wallet ID) + nextStep = data.stateParams.nextStep; + + setAvailableUnits(); + updateUnitUI(); + + if ($ionicHistory.backView().stateName == 'tabs.receive') { + hasMaxAmount = false; + } + + showMenu = $ionicHistory.backView() && ($ionicHistory.backView().stateName == 'tabs.send' || $ionicHistory.backView().stateName == 'tabs.bitpayCard'); + recipientType = data.stateParams.recipientType || null; + toAddress = data.stateParams.toAddress; + displayAddress = data.stateParams.displayAddress; + toName = data.stateParams.toName; + toEmail = data.stateParams.toEmail; + toColor = data.stateParams.toColor; + + if (!nextStep && !data.stateParams.toAddress) { + $log.error('Bad params at amount') + throw ('bad params'); + } + + var reNr = /^[1234567890\.]$/; + var reOp = /^[\*\+\-\/]$/; + + if (!isAndroid && !isIos) { + var disableKeys = angular.element($window).on('keydown', function(e) { + if (!e.key) return; + if (e.which === 8) { // you can add others here inside brackets. + if (!altCurrencyModal) { + e.preventDefault(); + vm.removeDigit(); + } + } + + if (e.key.match(reNr)) { + vm.pushDigit(e.key); + } else if (e.key.match(reOp)) { + pushOperator(e.key); + } else if (e.keyCode === 86) { + if (e.ctrlKey || e.metaKey) processClipboard(); + } else if (e.keyCode === 13) vm.finish(); + + $timeout(function() { + $scope.$apply(); + }); + }); + } + + unitToSatoshi = config.unitToSatoshi; + satToUnit = 1 / unitToSatoshi; + unitDecimals = config.unitDecimals; + + resetAmount(); + + // in SAT ALWAYS + if ($stateParams.toAmount) { + vm.amountModel.amount = (($stateParams.toAmount) * satToUnit).toFixed(unitDecimals); + } + + processAmount(); + + $timeout(function() { + $ionicScrollDelegate.resize(); + }, 10); + function setAvailableUnits() { var defaults = configService.getDefaults(); var configCache = configService.getSync(); @@ -139,82 +243,10 @@ angular.module('copayApp.controllers').controller('amountController', function($ altUnitIndex = 0; }; + }; - // Go to... - _id = data.stateParams.id; // Optional (BitPay Card ID or Wallet ID) - $scope.nextStep = data.stateParams.nextStep; - - setAvailableUnits(); - updateUnitUI(); - - $scope.hasMaxAmount = true; - if ($ionicHistory.backView().stateName == 'tabs.receive') { - $scope.hasMaxAmount = false; - } - - $scope.showMenu = $ionicHistory.backView() && ($ionicHistory.backView().stateName == 'tabs.send' || $ionicHistory.backView().stateName == 'tabs.bitpayCard'); - $scope.recipientType = data.stateParams.recipientType || null; - $scope.toAddress = data.stateParams.toAddress; - $scope.displayAddress = data.stateParams.displayAddress; - $scope.toName = data.stateParams.toName; - $scope.toEmail = data.stateParams.toEmail; - $scope.toColor = data.stateParams.toColor; - - if (!$scope.nextStep && !data.stateParams.toAddress) { - $log.error('Bad params at amount') - throw ('bad params'); - } - - var reNr = /^[1234567890\.]$/; - var reOp = /^[\*\+\-\/]$/; - - if (!$scope.isAndroid && !$scope.isIos) { - var disableKeys = angular.element($window).on('keydown', function(e) { - if (!e.key) return; - if (e.which === 8) { // you can add others here inside brackets. - if (!$scope.altCurrencyModal) { - e.preventDefault(); - $scope.removeDigit(); - } - } - - if (e.key.match(reNr)) { - $scope.pushDigit(e.key); - } else if (e.key.match(reOp)) { - $scope.pushOperator(e.key); - } else if (e.keyCode === 86) { - if (e.ctrlKey || e.metaKey) processClipboard(); - } else if (e.keyCode === 13) $scope.finish(); - - $timeout(function() { - $scope.$apply(); - }); - }); - } - - $scope.specificAmount = $scope.specificAlternativeAmount = ''; - $scope.isCordova = platformInfo.isCordova; - unitToSatoshi = config.unitToSatoshi; - satToUnit = 1 / unitToSatoshi; - satToBtc = 1 / 100000000; - unitDecimals = config.unitDecimals; - - $scope.resetAmount(); - - // in SAT ALWAYS - if ($stateParams.toAmount) { - $scope.amountModel.amount = (($stateParams.toAmount) * satToUnit).toFixed(unitDecimals); - } - - $scope.processAmount(); - - $timeout(function() { - $ionicScrollDelegate.resize(); - }, 10); - }); - - $scope.goBack = function() { - if ($scope.shapeshiftOrderId) { + function goBack() { + if (vm.shapeshiftOrderId) { $state.go('tabs.send').then(function() { $ionicHistory.clearHistory(); $state.go('tabs.home').then(function() { @@ -227,8 +259,8 @@ angular.module('copayApp.controllers').controller('amountController', function($ } function paste(value) { - $scope.amountModel.amount = value; - $scope.processAmount(); + vm.amountModel.amount = value; + processAmount(); $timeout(function() { $scope.$apply(); }); @@ -240,29 +272,22 @@ angular.module('copayApp.controllers').controller('amountController', function($ if (value && evaluate(value) > 0) paste(evaluate(value)); }; - $scope.sendMax = function() { - $scope.useSendMax = true; - $scope.finish(); - }; - - $scope.toggleAlternative = function() { - if ($scope.amountModel.amount && isExpression($scope.amountModel.amount)) { - var amount = evaluate(format($scope.amountModel.amount)); - $scope.globalResult = '= ' + processResult(amount); - } + function sendMax() { + useSendMax = true; + finish(); }; function updateUnitUI() { - $scope.unit = availableUnits[unitIndex].shortName; - $scope.alternativeUnit = availableUnits[altUnitIndex].shortName; + vm.unit = availableUnits[unitIndex].shortName; + vm.alternativeUnit = availableUnits[altUnitIndex].shortName; - $scope.processAmount(); - $log.debug('Update unit coin @amount unit:' + $scope.unit + " alternativeUnit:" + $scope.alternativeUnit); + processAmount(); + $log.debug('Update unit coin @amount unit:' + vm.unit + " alternativeUnit:" + vm.alternativeUnit); }; - $scope.changeUnit = function() { + function changeUnit() { - $scope.amountModel.amount = '0'; + vm.amountModel.amount = '0'; if (fixedUnit) return; @@ -282,59 +307,35 @@ angular.module('copayApp.controllers').controller('amountController', function($ updateUnitUI(); }; - - $scope.changeAlternativeUnit = function() { - - // Do nothing is fiat is not main unit - if (!availableUnits[unitIndex].isFiat) return; - - var nextCoin = lodash.findIndex(availableUnits, function(x) { - if (x.isFiat) return false; - if (x.id == availableUnits[altUnitIndex].id) return false; - return true; - }); - - if (nextCoin >= 0) { - altUnitIndex = nextCoin; - updateUnitUI(); - } - }; - - function checkFontSize() { - if ($scope.amountModel.amount && $scope.amountModel.amount.length >= SMALL_FONT_SIZE_LIMIT) $scope.smallFont = true; - else $scope.smallFont = false; - }; - - $scope.pushDigit = function(digit) { - if ($scope.amountModel.amount && digit != '.') { - var amountSplitByComma = $scope.amountModel.amount.split('.'); + function pushDigit(digit) { + if (vm.amountModel.amount && digit != '.') { + var amountSplitByComma = vm.amountModel.amount.split('.'); if (amountSplitByComma.length > 1 && amountSplitByComma[1].length >= LENGTH_AFTER_COMMA_EXPRESSION_LIMIT) return; if (amountSplitByComma.length == 1 && amountSplitByComma[0].length >= LENGTH_BEFORE_COMMA_EXPRESSION_LIMIT) return; } - if ($scope.amountModel.amount && $scope.amountModel.amount.length >= LENGTH_EXPRESSION_LIMIT) return; - if ($scope.amountModel.amount.indexOf('.') > -1 && digit == '.') return; - if ($scope.amountModel.amount == '0' && digit == '0') return; - if (availableUnits[unitIndex].isFiat && $scope.amountModel.amount.indexOf('.') > -1 && $scope.amountModel.amount[$scope.amountModel.amount.indexOf('.') + 2]) return; + if (vm.amountModel.amount && vm.amountModel.amount.length >= LENGTH_EXPRESSION_LIMIT) return; + if (vm.amountModel.amount.indexOf('.') > -1 && digit == '.') return; + if (vm.amountModel.amount == '0' && digit == '0') return; + if (availableUnits[unitIndex].isFiat && vm.amountModel.amount.indexOf('.') > -1 && vm.amountModel.amount[vm.amountModel.amount.indexOf('.') + 2]) return; - if ($scope.amountModel.amount == '0' && digit != '.') { - $scope.amountModel.amount = ''; + if (vm.amountModel.amount == '0' && digit != '.') { + vm.amountModel.amount = ''; } - if ($scope.amountModel.amount == '' && digit == '.') { - $scope.amountModel.amount = '0'; + if (vm.amountModel.amount == '' && digit == '.') { + vm.amountModel.amount = '0'; } - $scope.amountModel.amount = ($scope.amountModel.amount + digit).replace('..', '.'); - checkFontSize(); - $scope.processAmount(); + vm.amountModel.amount = (vm.amountModel.amount + digit).replace('..', '.'); + processAmount(); }; - $scope.pushOperator = function(operator) { - if (!$scope.amountModel.amount || $scope.amountModel.amount.length == 0) return; - $scope.amountModel.amount = _pushOperator($scope.amountModel.amount); + function pushOperator(operator) { + if (!vm.amountModel.amount || vm.amountModel.amount.length == 0) return; + vm.amountModel.amount = pushOperator(vm.amountModel.amount); - function _pushOperator(val) { + function pushOperator(val) { if (!isOperator(lodash.last(val))) { return val + operator; } else { @@ -353,61 +354,59 @@ angular.module('copayApp.controllers').controller('amountController', function($ return regex.test(val); }; - $scope.removeDigit = function() { - $scope.amountModel.amount = ($scope.amountModel.amount).toString().slice(0, -1); - $scope.processAmount(); - checkFontSize(); - }; + function removeDigit() { + vm.amountModel.amount = (vm.amountModel.amount).toString().slice(0, -1); + processAmount(); + } - $scope.resetAmount = function() { - $scope.amountModel.amount = $scope.alternativeAmount = $scope.globalResult = ''; - $scope.allowSend = false; - checkFontSize(); - }; + function resetAmount() { + vm.amountModel.amount = vm.alternativeAmount = vm.globalResult = ''; + vm.allowSend = false; + } - $scope.openPopup = function() { + function openPopup() { $ionicModal.fromTemplateUrl('views/modals/altCurrency.html', { scope: $scope }).then(function(modal) { - $scope.altCurrencyModal = modal; - $scope.altCurrencyModal.show(); + altCurrencyModal = modal; + altCurrencyModal.show(); }); + } + + function close() { + altCurrencyModal.remove(); + altCurrencyModal = null; }; - $scope.close = function() { - $scope.altCurrencyModal.remove(); - $scope.altCurrencyModal = false; - }; - - $scope.processAmount = function() { - var formatedValue = format($scope.amountModel.amount); + function processAmount() { + var formatedValue = format(vm.amountModel.amount); var result = evaluate(formatedValue); if (lodash.isNumber(result)) { - $scope.globalResult = isExpression($scope.amountModel.amount) ? '= ' + processResult(result) : ''; + vm.globalResult = isExpression(vm.amountModel.amount) ? '= ' + processResult(result) : ''; if (availableUnits[unitIndex].isFiat) { var a = fromFiat(result); if (a) { - $scope.alternativeAmount = txFormatService.formatAmount(a * unitToSatoshi, true); - $scope.allowSend = lodash.isNumber(a) && a > 0 - && (!$scope.shapeshiftOrderId - || (a >= $scope.minShapeshiftAmount && a <= $scope.maxShapeshiftAmount)); + vm.alternativeAmount = txFormatService.formatAmount(a * unitToSatoshi, true); + vm.allowSend = lodash.isNumber(a) && a > 0 + && (!vm.shapeshiftOrderId + || (a >= vm.minShapeshiftAmount && a <= vm.maxShapeshiftAmount)); } else { if (result) { - $scope.alternativeAmount = 'N/A'; + vm.alternativeAmount = 'N/A'; } else { - $scope.alternativeAmount = null; + vm.alternativeAmount = null; } - $scope.allowSend = false; + vm.allowSend = false; } } else { - $scope.alternativeAmount = $filter('formatFiatAmount')(toFiat(result)); - $scope.allowSend = lodash.isNumber(result) && result > 0 - && (!$scope.shapeshiftOrderId - || (result >= $scope.minShapeshiftAmount && result <= $scope.maxShapeshiftAmount)); + vm.alternativeAmount = $filter('formatFiatAmount')(toFiat(result)); + vm.allowSend = lodash.isNumber(result) && result > 0 + && (!vm.shapeshiftOrderId + || (result >= vm.minShapeshiftAmount && result <= vm.maxShapeshiftAmount)); } } }; @@ -448,24 +447,24 @@ angular.module('copayApp.controllers').controller('amountController', function($ return result.replace('x', '*'); }; - $scope.finish = function() { + function finish() { function finish() { var unit = availableUnits[unitIndex]; - var _amount = evaluate(format($scope.amountModel.amount)); + var _amount = evaluate(format(vm.amountModel.amount)); var coin = unit.id; if (unit.isFiat) { coin = availableUnits[altUnitIndex].id; } - if ($scope.nextStep) { - $state.transitionTo($scope.nextStep, { + if (nextStep) { + $state.transitionTo(nextStep, { id: _id, - amount: $scope.useSendMax ? null : _amount, + amount: useSendMax ? null : _amount, currency: unit.id.toUpperCase(), coin: coin, - useSendMax: $scope.useSendMax, - fromWalletId: $scope.fromWalletId + useSendMax: useSendMax, + fromWalletId: vm.fromWalletId }); } else { var amount = _amount; @@ -477,52 +476,52 @@ angular.module('copayApp.controllers').controller('amountController', function($ } var confirmData = { - recipientType: $scope.recipientType, + recipientType: recipientType, toAmount: amount, - toAddress: $scope.toAddress, - displayAddress: $scope.displayAddress || $scope.toAddress, - toName: $scope.toName, - toEmail: $scope.toEmail, - toColor: $scope.toColor, + toAddress: toAddress, + displayAddress: displayAddress || toAddress, + toName: toName, + toEmail: toEmail, + toColor: toColor, coin: coin, - useSendMax: $scope.useSendMax, - fromWalletId: $scope.fromWalletId + useSendMax: useSendMax, + fromWalletId: vm.fromWalletId }; - if ($scope.shapeshiftOrderId) { + if (vm.shapeshiftOrderId) { var shapeshiftOrderUrl = 'https://www.shapeshift.io/#/status/'; - shapeshiftOrderUrl += $scope.shapeshiftOrderId; + shapeshiftOrderUrl += vm.shapeshiftOrderId; confirmData.description = shapeshiftOrderUrl; - confirmData.fromWalletId = $scope.fromWalletId; + confirmData.fromWalletId = vm.fromWalletId; if (confirmData.useSendMax) { var wallet = lodash.find(profileService.getWallets({ coin: coin }), function(w) { - return w.id == $scope.fromWalletId; + return w.id == vm.fromWalletId; }); var balance = parseFloat(wallet.cachedBalance.substring(0, wallet.cachedBalance.length-4)); - if (balance < $scope.minShapeshiftAmount * 1.04) { + if (balance < vm.minShapeshiftAmount * 1.04) { confirmData.useSendMax = false; - confirmData.toAmount = $scope.minShapeshiftAmount * unitToSatoshi; - } else if (balance > $scope.maxShapeshiftAmount) { + confirmData.toAmount = vm.minShapeshiftAmount * unitToSatoshi; + } else if (balance > vm.maxShapeshiftAmount) { confirmData.useSendMax = false; - confirmData.toAmount = $scope.maxShapeshiftAmount * unitToSatoshi * 0.99; + confirmData.toAmount = vm.maxShapeshiftAmount * unitToSatoshi * 0.99; } } } $state.transitionTo('tabs.send.confirm', confirmData); } - $scope.useSendMax = null; + useSendMax = null; } - if ($scope.showWarningMessage) { - var u = $scope.unit == 'BCH' || $scope.unit == 'BTC' ? $scope.unit : $scope.alternativeUnit; + if (showWarningMessage) { + var u = vm.unit == 'BCH' || vm.unit == 'BTC' ? vm.unit : vm.alternativeUnit; var message = 'Are you sure you want to send ' + u.toUpperCase() + '?'; popupService.showConfirm(message, '', 'Yes', 'No', function(res) { if (!res) { - $scope.useSendMax = null; + useSendMax = null; return; }; finish(); @@ -566,10 +565,10 @@ angular.module('copayApp.controllers').controller('amountController', function($ }]; rateService.whenAvailable(function() { - $scope.listComplete = false; + vm.listComplete = false; var idx = lodash.indexBy(unusedCurrencyList, 'isoCode'); - var idx2 = lodash.indexBy($scope.lastUsedAltCurrencyList, 'isoCode'); + var idx2 = lodash.indexBy(lastUsedAltCurrencyList, 'isoCode'); var idx3 = lodash.indexBy(popularCurrencyList, 'isoCode'); var alternatives = rateService.listAlternatives(true); @@ -582,8 +581,8 @@ angular.module('copayApp.controllers').controller('amountController', function($ } }); - $scope.altCurrencyList = completeAlternativeList.slice(0, 10); - $scope.lastUsedPopularList = lodash.unique(lodash.union($scope.lastUsedAltCurrencyList, popularCurrencyList), 'isoCode'); + vm.altCurrencyList = completeAlternativeList.slice(0, 10); + vm.lastUsedPopularList = lodash.unique(lodash.union(lastUsedAltCurrencyList, popularCurrencyList), 'isoCode'); $timeout(function() { $scope.$apply(); @@ -591,19 +590,19 @@ angular.module('copayApp.controllers').controller('amountController', function($ }); } - $scope.loadMore = function() { + function loadMore() { $timeout(function() { - $scope.altCurrencyList = completeAlternativeList.slice(0, next); + vm.altCurrencyList = completeAlternativeList.slice(0, next); next += 10; - $scope.listComplete = $scope.altCurrencyList.length >= completeAlternativeList.length; + vm.listComplete = vm.altCurrencyList.length >= completeAlternativeList.length; $scope.$broadcast('scroll.infiniteScrollComplete'); }, 100); }; - $scope.findCurrency = function(search) { + function findCurrency(search) { if (!search) initCurrencies(); - var list = lodash.unique(lodash.union(completeAlternativeList, lodash.union($scope.lastUsedAltCurrencyList, popularCurrencyList)), 'isoCode'); - $scope.altCurrencyList = lodash.filter(list, function(item) { + var list = lodash.unique(lodash.union(completeAlternativeList, lodash.union(lastUsedAltCurrencyList, popularCurrencyList)), 'isoCode'); + vm.altCurrencyList = lodash.filter(list, function(item) { var val = item.name var val2 = item.isoCode; return lodash.includes(val.toLowerCase(), search.toLowerCase()) || lodash.includes(val2.toLowerCase(), search.toLowerCase()); @@ -613,7 +612,7 @@ angular.module('copayApp.controllers').controller('amountController', function($ }); }; - $scope.save = function(newAltCurrency) { + function save(newAltCurrency) { var opts = { wallet: { settings: { @@ -634,7 +633,7 @@ angular.module('copayApp.controllers').controller('amountController', function($ availableUnits[altUnitIndex].shortName = newAltCurrency.isoCode; fiatCode = newAltCurrency.isoCode; updateUnitUI(); - $scope.close(); + close(); }); }; -}); +} diff --git a/src/js/routes.js b/src/js/routes.js index 8277314e5..286b27ab1 100644 --- a/src/js/routes.js +++ b/src/js/routes.js @@ -291,6 +291,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr views: { 'tab-send@tabs': { controller: 'amountController', + controllerAs: 'vm', templateUrl: 'views/amount.html' } } @@ -699,6 +700,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr views: { 'tab-receive@tabs': { controller: 'amountController', + controllerAs: 'vm', templateUrl: 'views/amount.html' } } @@ -845,6 +847,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr views: { 'tab-home@tabs': { controller: 'amountController', + controllerAs: 'vm', templateUrl: 'views/amount.html' } } @@ -910,6 +913,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr views: { 'tab-home@tabs': { controller: 'amountController', + controllerAs: 'vm', templateUrl: 'views/amount.html' } } @@ -1029,6 +1033,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr views: { 'tab-home@tabs': { controller: 'amountController', + controllerAs: 'vm', templateUrl: 'views/amount.html' } }, @@ -1081,6 +1086,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr views: { 'tab-home@tabs': { controller: 'amountController', + controllerAs: 'vm', templateUrl: 'views/amount.html' } }, @@ -1137,6 +1143,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr views: { 'tab-home@tabs': { controller: 'amountController', + controllerAs: 'vm', templateUrl: 'views/amount.html' } } diff --git a/www/views/amount.html b/www/views/amount.html index e803ffc10..90187ef59 100644 --- a/www/views/amount.html +++ b/www/views/amount.html @@ -3,37 +3,37 @@ {{'Enter amount' | translate}} - +
-
- Minimum amount: {{minShapeshiftAmount}}
- Maximum amount: {{maxShapeshiftAmount}}
+
+ Minimum amount: {{vm.minShapeshiftAmount}}
+ Maximum amount: {{vm.maxShapeshiftAmount}}
- {{ amountModel.amount || 0 }}{{unit}} + ng-class="{long: vm.amountModel.amount.length > 5, 'very-long': vm.amountModel.amount.length > 10}"> + {{ vm.amountModel.amount || 0 }}{{vm.unit}}
- {{globalResult}} {{unit}} + {{vm.globalResult}} {{vm.unit}}
- {{alternativeAmount || '0.00'}} {{alternativeUnit}} + {{vm.alternativeAmount || '0.00'}} {{vm.alternativeUnit}}
-
+
- -
@@ -11,23 +11,23 @@
-
- {{lastUsedAltCurrency.name}} {{lastUsedAltCurrency.isoCode}} +
+ {{lastUsedAltCurrency.name}} {{lastUsedAltCurrency.isoCode}}
-
{{altCurrency.name}} {{altCurrency.isoCode}} +
{{altCurrency.name}} {{altCurrency.isoCode}}
From bba85794ac3599127b6627f11baaf6d435ee30a5 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Dominguez Date: Wed, 25 Jul 2018 16:17:42 +0900 Subject: [PATCH 051/256] 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 052/256] 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 4093e2ba71dff9800d24d3fcdff5980bb58c5dcf Mon Sep 17 00:00:00 2001 From: Sebastiaan Pasma Date: Wed, 25 Jul 2018 11:26:33 +0200 Subject: [PATCH 053/256] refactored the sendFlowController --- src/js/controllers/sendFlowController.js | 53 +++++++++--------------- 1 file changed, 19 insertions(+), 34 deletions(-) diff --git a/src/js/controllers/sendFlowController.js b/src/js/controllers/sendFlowController.js index d6f2b707d..400751867 100644 --- a/src/js/controllers/sendFlowController.js +++ b/src/js/controllers/sendFlowController.js @@ -2,75 +2,60 @@ angular.module('copayApp.controllers').controller('sendFlowController', function($scope, $rootScope, $state, $stateParams, $log, configService, gettextCatalog, profileService) { - var unitToSatoshi; - var satToUnit; - var unitDecimals; - var satToBtc; - var nextStep = ''; - $scope.$on("$ionicView.beforeEnter", function(event, data) { var config = configService.getSync().wallet.settings; $scope.params = $stateParams; - $scope.specificAmount = $scope.specificAlternativeAmount = ''; - unitToSatoshi = config.unitToSatoshi; - satToUnit = 1 / unitToSatoshi; - satToBtc = 1 / 100000000; - unitDecimals = config.unitDecimals; - - if ($scope.params.amount) { - console.log("is Payment Request", $scope.params.amount); - + if ($scope.params.amount) { // There is an amount, so presume that it a payment request + $scope.specificAmount = $scope.specificAlternativeAmount = ''; + var unitToSatoshi = config.unitToSatoshi; + var satToUnit = 1 / unitToSatoshi; + var satToBtc = 1 / 100000000; + var unitDecimals = config.unitDecimals; $scope.requestAmount = (($stateParams.amount) * satToUnit).toFixed(unitDecimals); $scope.isPaymentRequest = true; } }); $scope.$on("$ionicView.enter", function(event, data) { - console.log(data, $stateParams); + configService.whenAvailable(function(config) { + $scope.selectedPriceDisplay = config.wallet.settings.priceDisplay; + }); + $scope.type = data.stateParams && data.stateParams['fromWalletId'] ? 'destination' : 'origin'; // origin || destination $scope.coin = false; // Wallets to show (for destination screen) - $scope.walletsEmpty = []; - // Show price-header - - console.log("current type: "+$scope.type); + $scope.walletsEmpty = []; // empty wallets for origin screen if ($scope.type === 'origin') { $scope.headerTitle = gettextCatalog.getString('Choose a wallet to send from'); $scope.walletsEmpty = profileService.getWallets({coin: $scope.coin, hasNoFunds: true}); } else if ($scope.type === 'destination') { - $scope.fromWallet = profileService.getWallet(data.stateParams.fromWalletId); - $scope.coin = $scope.fromWallet.coin; - + $scope.coin = $scope.fromWallet.coin; // Only show wallets with the select origin wallet coin $scope.headerTitle = gettextCatalog.getString('Choose a wallet to send to'); } - if (!$scope.coin || $scope.coin === 'bch') { + if (!$scope.coin || $scope.coin === 'bch') { // if no specific coin is set or coin is set to bch $scope.walletsBch = profileService.getWallets({coin: 'bch', hasFunds: $scope.type==='origin'}); } - if (!$scope.coin || $scope.coin === 'btc') { + if (!$scope.coin || $scope.coin === 'btc') { // if no specific coin is set or coin is set btc $scope.walletsBtc = profileService.getWallets({coin: 'btc', hasFunds: $scope.type === 'origin'}); } - - configService.whenAvailable(function(config) { - $scope.selectedPriceDisplay = config.wallet.settings.priceDisplay; - }); }); function getNextStep() { - if (!$scope.params.toWalletId && !$scope.params.toAddress) { + if (!$scope.params.toWalletId && !$scope.params.toAddress) { // If we have no toAddress or fromWallet return 'tabs.send.destination'; - } else if (!$scope.params.amount) { + } else if (!$scope.params.amount) { // If we have no amount return 'tabs.send.amount'; - } else { + } else { // If we do have them return 'tabs.send.confirm'; } } $scope.useWallet = function(wallet) { - if ($scope.type === 'origin') { + if ($scope.type === 'origin') { // we're on the origin screen, set wallet to send from $scope.params['fromWalletId'] = wallet.id; - } else { + } else { // we're on the destination screen, set wallet to send to $scope.params['toWalletId'] = wallet.id; } $state.transitionTo(getNextStep(), $scope.params); From b88329fbb36811ce77cb5e783682e9e7dfdc9faa Mon Sep 17 00:00:00 2001 From: Sebastiaan Pasma Date: Wed, 25 Jul 2018 15:07:15 +0200 Subject: [PATCH 054/256] removed unused vars + changes for wallet to wallet transfer --- src/js/controllers/confirm.js | 109 +++++++++++------------ www/views/confirm.html | 4 +- www/views/wallet-origin-destination.html | 1 + 3 files changed, 54 insertions(+), 60 deletions(-) diff --git a/src/js/controllers/confirm.js b/src/js/controllers/confirm.js index 74b86e623..b57d2ca08 100644 --- a/src/js/controllers/confirm.js +++ b/src/js/controllers/confirm.js @@ -10,16 +10,10 @@ angular.module('copayApp.controllers').controller('confirmController', function( // Config Related values var config = configService.getSync(); var walletConfig = config.wallet; - var unitToSatoshi = walletConfig.settings.unitToSatoshi; - var unitDecimals = walletConfig.settings.unitDecimals; - var satToUnit = 1 / unitToSatoshi; var configFeeLevel = walletConfig.settings.feeLevel ? walletConfig.settings.feeLevel : 'normal'; - // Platform info - var isChromeApp = platformInfo.isChromeApp; var isCordova = platformInfo.isCordova; - var isWindowsPhoneApp = platformInfo.isCordova && platformInfo.isWP; //custom fee flag var usingCustomFee = false; @@ -31,7 +25,6 @@ angular.module('copayApp.controllers').controller('confirmController', function( }, 10); } - $scope.showWalletSelector = function() { $scope.walletSelector = true; refresh(); @@ -45,7 +38,6 @@ angular.module('copayApp.controllers').controller('confirmController', function( $ionicConfig.views.swipeBackEnabled(false); }); - function exitWithError(err) { $log.info('Error setting wallet selector:' + err); popupService.showAlert(gettextCatalog.getString(), bwcError.msg(err), function() { @@ -125,49 +117,8 @@ angular.module('copayApp.controllers').controller('confirmController', function( }); }; $scope.$on("$ionicView.beforeEnter", function(event, data) { - // Setup $scope + $scope.fromWallet = profileService.getWallet(data.stateParams.fromWalletId); // Wallet to send from - var B = data.stateParams.coin == 'bch' ? bitcoreCash : bitcore; - var networkName; - $scope.fromWallet = profileService.getWallet(data.stateParams.fromWalletId); - $scope.recipientType = null; - - try { - if (data.stateParams.toWalletId) { - $scope.recipientType = 'wallet'; // set type to wallet-to-wallet - $ionicLoading.show(); - var wallet = profileService.getWallet(data.stateParams.toWalletId); - walletService.getAddress(wallet, true, function (err, addr) { - $ionicLoading.hide(); - data.stateParams.toAddress = addr; - networkName = (new B.Address(data.stateParams.toAddress)).network.name; - vanityTx(networkName, data); - }); - } else if (data.stateParams.toAddress) { - networkName = (new B.Address(data.stateParams.toAddress)).network.name; - vanityTx(networkName, data); - } - } catch (e) { - var message = gettextCatalog.getString('Invalid address'); - var backText = gettextCatalog.getString('Go back'); - var learnText = gettextCatalog.getString('Learn more'); - popupService.showConfirm(null, message, backText, learnText, function (back) { - $ionicHistory.nextViewOptions({ - disableAnimate: true, - historyRoot: true - }); - $state.go('tabs.send').then(function () { - $ionicHistory.clearHistory(); - if (!back) { - var url = 'https://support.bitpay.com/hc/en-us/articles/115004671663'; - externalLinkService.open(url); - } - }); - }); - return; - } - }); - var vanityTx = function(networkName, data) { // Grab stateParams tx = { amount: parseInt(data.stateParams.amount), @@ -179,10 +130,10 @@ angular.module('copayApp.controllers').controller('confirmController', function( // Vanity tx info (not in the real tx) recipientType: $scope.recipientType || null, - toName: data.stateParams.toName, - toEmail: data.stateParams.toEmail, - toColor: data.stateParams.toColor, - network: networkName, + toName: null, + toEmail: null, + toColor: null, + network: false, coin: $scope.fromWallet.coin, txp: {}, }; @@ -192,10 +143,52 @@ angular.module('copayApp.controllers').controller('confirmController', function( tx.feeRate = parseInt(data.stateParams.requiredFeeRate); } - if (tx.coin && tx.coin == 'bch') { + if (tx.coin && tx.coin === 'bch') { tx.feeLevel = 'normal'; } + var B = data.stateParams.coin === 'bch' ? bitcoreCash : bitcore; + var networkName; + $scope.recipientType = null; + try { + if (data.stateParams.toWalletId) { // There is a toWalletId, so we presume this is a wallet-to-wallet transfer + $scope.recipientType = 'wallet'; // set transaction type to wallet-to-wallet + $ionicLoading.show(); + + var toWallet = profileService.getWallet(data.stateParams.toWalletId); + tx.toColor = toWallet.color; + tx.toName = toWallet.name; + + // We need an address to send to, so we ask the walletService to create a new address for the toWallet. + walletService.getAddress(toWallet, true, function (err, addr) { + $ionicLoading.hide(); + tx.toAddress = addr; + networkName = (new B.Address(tx.toAddress)).network.name; + tx.network = networkName; + setupTx(tx); + }); + } else { // This is a Wallet-to-address transfer + networkName = (new B.Address(tx.toAddress)).network.name; + tx.network = networkName; + setupTx(tx); + } + } catch (e) { + var message = gettextCatalog.getString('Invalid address'); + popupService.showAlert(null, message, function () { + $ionicHistory.nextViewOptions({ + disableAnimate: true, + historyRoot: true + }); + $state.go('tabs.send').then(function () { + $ionicHistory.clearHistory(); + }); + }); + return; + } + }); + + var setupTx = function(networkName, data) { + // Other Scope vars $scope.isCordova = isCordova; $scope.showAddress = false; @@ -410,19 +403,19 @@ angular.module('copayApp.controllers').controller('confirmController', function( function setButtonText(isMultisig, isPayPro) { if (isPayPro) { - if (isCordova && !isWindowsPhoneApp) { + if (isCordova) { $scope.buttonText = gettextCatalog.getString('Slide to pay'); } else { $scope.buttonText = gettextCatalog.getString('Click to pay'); } } else if (isMultisig) { - if (isCordova && !isWindowsPhoneApp) { + if (isCordova) { $scope.buttonText = gettextCatalog.getString('Slide to accept'); } else { $scope.buttonText = gettextCatalog.getString('Click to accept'); } } else { - if (isCordova && !isWindowsPhoneApp) { + if (isCordova) { $scope.buttonText = gettextCatalog.getString('Slide to send'); } else { $scope.buttonText = gettextCatalog.getString('Click to send'); diff --git a/www/views/confirm.html b/www/views/confirm.html index e54837f34..1def16389 100644 --- a/www/views/confirm.html +++ b/www/views/confirm.html @@ -105,13 +105,13 @@ {{buttonText}} diff --git a/www/views/wallet-origin-destination.html b/www/views/wallet-origin-destination.html index 66f5852ad..32ac73e59 100644 --- a/www/views/wallet-origin-destination.html +++ b/www/views/wallet-origin-destination.html @@ -1,6 +1,7 @@ {{'Wallet to wallet transfer' | translate}} +
From d51ab2bf79f732a9b5d4eb0a4e6404840367f993 Mon Sep 17 00:00:00 2001 From: Sebastiaan Pasma Date: Wed, 25 Jul 2018 15:11:14 +0200 Subject: [PATCH 055/256] 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 @@
-
+ ng-if="!item.isWallet && item.recipientType != 'wallet'" ng-click="sendToContact(item)"> diff --git a/www/views/wallet-origin-destination.html b/www/views/wallet-origin-destination.html index 32ac73e59..4bdbde22b 100644 --- a/www/views/wallet-origin-destination.html +++ b/www/views/wallet-origin-destination.html @@ -1,13 +1,13 @@ - {{'Wallet to wallet transfer' | translate}} + {{sendFlowTitle}}
Paying
-
$37.42 USD
-
0.04580000 BCH {{requestAmount}}
+
$... USD
+
{{requestAmount}} {{coin.toUpperCase()}}
From decd0a123e1931aaea4ad2763e9fdd10f5701024 Mon Sep 17 00:00:00 2001 From: Brendon Duncan Date: Wed, 25 Jul 2018 16:43:45 -0700 Subject: [PATCH 059/256] Buttons on keypad have correct colour in new Enter Amount screen. --- src/js/routes.js | 2 +- src/sass/views/amountNew.scss | 484 ++++++++++++++++++++++++++++++++++ src/sass/views/views.scss | 1 + www/views/amountNew.html | 85 ++++++ 4 files changed, 571 insertions(+), 1 deletion(-) create mode 100644 src/sass/views/amountNew.scss create mode 100644 www/views/amountNew.html diff --git a/src/js/routes.js b/src/js/routes.js index 286b27ab1..5900b88da 100644 --- a/src/js/routes.js +++ b/src/js/routes.js @@ -701,7 +701,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr 'tab-receive@tabs': { controller: 'amountController', controllerAs: 'vm', - templateUrl: 'views/amount.html' + templateUrl: 'views/amountNew.html' } } }) diff --git a/src/sass/views/amountNew.scss b/src/sass/views/amountNew.scss new file mode 100644 index 000000000..cbffe4929 --- /dev/null +++ b/src/sass/views/amountNew.scss @@ -0,0 +1,484 @@ +#view-amount-new { + @extend .deflash-blue; + .recipient-label { + font-size: 14px; + padding-bottom: 0; + color: $v-mid-gray; + } + .item-no-bottom-border + .item { + border-top: 0; + } + .icon-bitpay-card { + background-image: url("../img/icon-bitpay.svg"); + } + .icon-amazon { + background-image: url("../img/icon-amazon.svg"); + } + @media(max-width: 480px) { + .bitcoin-address { + .icon { + left: 8px; + font-size: 24px; + } + .big-icon-svg { + left:5px; + & > .bg{ + width:30px; + height:30px; + box-shadow: none; + } + } + font-size: 13px; + padding-left: 48px; + } + } + @media(max-width: 320px) { + .bitcoin-address { + & > span:last-child { + margin-left: -2px; + } + } + } + .send-gravatar { + left: 11px; + position: absolute; + top: 10px; + } + .amount span input { + display: inline; + width: 120px; + } + .amount-pane-recipient { + position: absolute; + top: 95px; + bottom: 0; + width: 100%; + background-color: #fff; + padding: 0 16px; + + .amount-bar { + padding: 24px 0; + font-size: 18px; + @media(max-height: 480px) { + padding: 0px; + } + @media(max-width: 320px) { + padding: 0px; + } + .title { + float: left; + padding-top: 10px; + color: $v-dark-gray; + font-weight: bold; + @media(max-height: 480px) { + padding: 0px; + } + } + @media(max-height: 480px) { + padding-top: 3px; + } + } + .amount { + display: flex; + flex-direction: column; + justify-content: center; + flex-grow: 1; + position: absolute; + bottom: 254px; + top: 66px; + .light { + color: $v-light-gray; + } + @media(max-height: 480px) { + top: 45px; + } + @media(max-width: 320px) { + bottom: 276px; + top: 60px; + & > div { + display: inline-block; + } + & > div:first-child { + display: inherit; + } + } + } + } + .amount-pane-no-recipient { + position: absolute; + top: 0; + bottom: 0; + width: 100%; + background-color: #fff; + padding: 0 16px; + + .amount-bar { + padding: 24px 0; + font-size: 18px; + .title { + padding-top: 10px; + color: $v-dark-gray; + font-weight: bold; + .limits { + margin-top: 10px; + color: $v-light-gray; + font-size: 12px; + } + .select { + margin: 10px 1px; + } + } + } + .amount { + display: flex; + flex-direction: column; + justify-content: center; + flex-grow: 1; + position: absolute; + bottom: 254px; + top: 66px; + .light { + color: $v-light-gray; + } + } + } + .amount { + padding-top: 10px; + padding-bottom: 10px; + .icon-toggle { + font-size: 1.2em; + width: auto; + margin: 0.8em auto; + border: 1px solid $v-subtle-gray; + color: $v-dark-gray; + border-radius: 3px; + padding: 0 10px; + cursor: pointer; + @media(max-height: 280px) { + margin: 0.1em auto; + } + } + &__editable { + &--minimize { + font-size: 22px; + } + &--standard { + font-size: 42px; + @media(max-height: 480px) { + font-size: 26px; + padding-top: 10px; + } + } + &--placeholder { + color: $v-light-gray; + } + } + &__number { + color: $v-dark-gray; + } + &__currency-toggle { + border: 1px solid $v-subtle-gray; + color: $v-dark-gray; + border-radius: 3px; + padding: 0 10px; + cursor: pointer; + font-size: .6em; + position: relative; + top: -3px; + line-height: 1; + @media(max-width: 320px) { + line-height: 30px; + height: 30px; + } + } + &__currency-toggle-mobile { + border: 1px solid $v-subtle-gray; + color: $v-dark-gray; + border-radius: 3px; + cursor: pointer; + position: relative; + line-height: 1; + @media(max-width: 320px) { + line-height: 30px; + height: 30px; + } + } + &__results { + &--minimize { + font-size: 12px; + } + &--standard { + font-size: 18px; + padding: 10px 0; + } + &--placeholder { + color: $v-light-gray; + } + } + &__result { + color: $v-light-gray; + font-size: .9em; + //margin-bottom: -.9em; TODO matias + line-height: 1; + @media(max-height: 480px) { + margin-bottom: 0; + } + } + &__result-equiv { + color: $v-mid-gray; + font-size: 1.2em; + @media(max-height: 480px) { + margin-top: 0; + font-size: 16px; + } + } + } + + .scroll-content { + display: flex; + flex-direction: column; + + .send-amount { + flex: 1 1 auto; + display: flex; + flex-direction: column; + justify-content: center; + + .send-amount-tool { + flex: 0 1 auto; + + .send-amount-tool-input { + text-align: center; + position: relative; + padding: 10px 30px; + + .text-selectable { + -webkit-user-select: text; + -moz-user-select: text; + -ms-user-select: text; + user-select: text; + } + + .primary-amount { + input, .unit, .primary-amount-display { + font-size: 1.8em; + + @media (min-width: 375px) { + font-size: 2.1em; + } + + @media (min-width: 414px) { + font-size: 2.4em; + } + } + + &.long { + input, .unit, .primary-amount-display { + font-size: 1.6em; + + @media (min-width: 375px) { + font-size: 1.8em; + } + + @media (min-width: 414px) { + font-size: 2em; + } + } + } + + &.very-long { + input, .unit, .primary-amount-display { + font-size: 0.9em; + + @media (min-width: 375px) { + font-size: 1.3em; + } + + @media (min-width: 414px) { + font-size: 1.4em; + } + } + } + + + input { + border:0; + padding:0; + white-space:normal; + background:none; + line-height:1; + box-sizing:content-box; + display: inline-block; + vertical-align: middle; + margin: 0; + height: 1em; + margin-right: 5px; + font-family: 'ProximaNova'; + + @media (min-width: 375px) { + } + + @media (min-width: 414px) { + } + } + + .unit, + .primary-amount-display { + display: inline-block; + vertical-align: middle; + line-height: 1em; + } + + .unit { + font-weight: bold; + } + + .primary-amount-display { + margin-right: 5px; + word-break: break-all; + } + } + + .switch-currencies { + position: absolute; + right: 0; + top: 50%; + transform: translate(0, -50%); + padding: 15px; + + img { + width: 18px; + } + } + } + + .send-amount-actions { + margin-top: 15px; + display: flex; + align-items: center; + justify-content: center; + + .button { + flex: 1 1 auto; + line-height: 1.2em; + + + .button { + margin-left: 10px; + } + + span { + display: flex; + align-items: center; + justify-content: center; + } + } + } + } + } + + .button { + &.no-margin { + margin: 0; + } + } + + .notification-warning { + display: block; + padding: .75rem 1.25rem; + color: #856404; + background-color: #fff3cd; + border: 1px solid #ffeeba; + line-height: 1.4em; + margin-bottom: 20px; + } + + .keypad-container { + position: relative; + //flex: 0 1 196px; + + @media (min-height: 667px) { + //flex: 0 1 224px; + } + + .keypad { + text-align: center; + font-size: 18px; + font-weight: lighter; + position: absolute; + bottom: 0; + width: 100%; + color: $v-text-primary-color; + + @media (min-height: 667px) { + font-size: 24px; + } + + .row { + padding: 0 !important; + margin: 0 !important; + } + + .col { + line-height: 38px; + + @media (min-height: 667px) { + line-height: 45px; + } + } + + .row { + &:last-child { + .col { + padding-bottom: 10px; + } + } + } + + .operator { + background-color: $v-subtle-gray; + font-weight: normal; + cursor: pointer; + + &:active { + background-color: $v-light-gray; + } + } + + .operator-send { + font-weight: bolder; + color: #fff; + background-color: $positive; + font-size: 36px; + cursor: pointer; + + &:active { + background-color: #eaeaea; + } + } + + .digit{ + cursor: pointer; + background-color: #000; + border: 1px solid #262424; + transition: all 0.1s ease; + + + &:active { + background-color: $v-dark-gray; + } + } + + @media(max-height: 480px) { + font-size: 12px; + + } + } + } + } + background: #494949; + + ion-content { + margin-bottom: constant(safe-area-inset-bottom); /* iOS 11.0 */ + margin-bottom: env(safe-area-inset-bottom); /* iOS 11.2 */ + } +} \ No newline at end of file diff --git a/src/sass/views/views.scss b/src/sass/views/views.scss index d4ed735ed..387b68597 100644 --- a/src/sass/views/views.scss +++ b/src/sass/views/views.scss @@ -1,6 +1,7 @@ @import "tabs"; @import "add"; @import "amount"; +@import "amountNew"; @import "confirm"; @import "copayers"; @import "starting"; diff --git a/www/views/amountNew.html b/www/views/amountNew.html new file mode 100644 index 000000000..6fe58eb9b --- /dev/null +++ b/www/views/amountNew.html @@ -0,0 +1,85 @@ + + + + {{'Enter amount (New)' | translate}} + + + + + +
+ +
+
+ Minimum amount: {{vm.minShapeshiftAmount}}
+ Maximum amount: {{vm.maxShapeshiftAmount}}
+
+
+
+
+ {{ vm.amountModel.amount || 0 }}{{vm.unit}} +
+ {{vm.globalResult}} {{vm.unit}} +
+ {{vm.alternativeAmount || '0.00'}} {{vm.alternativeUnit}} +
+
+
+
+ + +
+
+
+
+ +
+
+ +
+
7
+
8
+
9
+
+ +
+
4
+
5
+
6
+
+ +
+
1
+
2
+
3
+
+ +
+
.
+
0
+
+
+
+
+ + +
+
\ No newline at end of file From e539f0e713bb095dfa8f0869e983ba575df49a99 Mon Sep 17 00:00:00 2001 From: Brendon Duncan Date: Wed, 25 Jul 2018 17:32:07 -0700 Subject: [PATCH 060/256] Space around amount, and added "Not Enough Funds" warning. --- src/sass/views/amountNew.scss | 9 +++++++ www/views/amountNew.html | 45 ++++++++++++++++++++--------------- 2 files changed, 35 insertions(+), 19 deletions(-) diff --git a/src/sass/views/amountNew.scss b/src/sass/views/amountNew.scss index cbffe4929..0d1798e25 100644 --- a/src/sass/views/amountNew.scss +++ b/src/sass/views/amountNew.scss @@ -244,6 +244,15 @@ flex-direction: column; justify-content: center; + .send-amount-header-footer { + flex: 1 1 auto; + min-height: 10px; + + .warning { + text-align:center; + } + } + .send-amount-tool { flex: 0 1 auto; diff --git a/www/views/amountNew.html b/www/views/amountNew.html index 6fe58eb9b..e6b11750c 100644 --- a/www/views/amountNew.html +++ b/www/views/amountNew.html @@ -1,7 +1,7 @@ - {{'Enter amount (New)' | translate}} + {{'Enter Amount' | translate}} @@ -9,10 +9,12 @@
-
-
- Minimum amount: {{vm.minShapeshiftAmount}}
- Maximum amount: {{vm.maxShapeshiftAmount}}
+
+
@@ -26,21 +28,26 @@
-
- - + -
+
+
+
+ +
From 91daae9f7a8fbe046b65218c3d3e364512cfbbc2 Mon Sep 17 00:00:00 2001 From: Brendon Duncan Date: Wed, 25 Jul 2018 18:19:21 -0700 Subject: [PATCH 061/256] Improved amount card layout. Darker background under card. --- src/sass/views/amountNew.scss | 19 ++++++++++++------- www/views/amountNew.html | 2 +- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/src/sass/views/amountNew.scss b/src/sass/views/amountNew.scss index 0d1798e25..894135725 100644 --- a/src/sass/views/amountNew.scss +++ b/src/sass/views/amountNew.scss @@ -246,10 +246,14 @@ .send-amount-header-footer { flex: 1 1 auto; - min-height: 10px; + min-height: 20px; .warning { - text-align:center; + color: #b7664d; + font-family: 'ProximaNova-Semibold'; + font-size: 12pt; + padding: 0 6px 6px 6px; + text-align: center; } } @@ -269,6 +273,8 @@ } .primary-amount { + color: #333; + font-family: 'ProximaNova-Semibold'; input, .unit, .primary-amount-display { font-size: 1.8em; @@ -338,16 +344,15 @@ line-height: 1em; } - .unit { - font-weight: bold; - } - .primary-amount-display { margin-right: 5px; word-break: break-all; } } + .alternative-amount { + color: #6F6F70; + } .switch-currencies { position: absolute; right: 0; @@ -484,7 +489,7 @@ } } } - background: #494949; + background: #f2f2f2; ion-content { margin-bottom: constant(safe-area-inset-bottom); /* iOS 11.0 */ diff --git a/www/views/amountNew.html b/www/views/amountNew.html index e6b11750c..b9b6c08b2 100644 --- a/www/views/amountNew.html +++ b/www/views/amountNew.html @@ -5,7 +5,7 @@ - +
From 507fb21862c4a1b0eb95742fb5e6d537275efc94 Mon Sep 17 00:00:00 2001 From: Brendon Duncan Date: Wed, 25 Jul 2018 18:46:42 -0700 Subject: [PATCH 062/256] Available funds. --- src/js/controllers/amount.js | 2 ++ src/sass/views/amountNew.scss | 42 +++++++++++++++++++++-------------- www/views/amountNew.html | 20 ++++++++++------- 3 files changed, 39 insertions(+), 25 deletions(-) diff --git a/src/js/controllers/amount.js b/src/js/controllers/amount.js index 1bc492136..1d4cb41f1 100644 --- a/src/js/controllers/amount.js +++ b/src/js/controllers/amount.js @@ -10,6 +10,7 @@ function amountController(configService, $filter, $ionicHistory, $ionicModal, $i vm.alternativeAmount = ''; vm.alternativeUnit = ''; vm.amountModel = { amount: 0 }; + vm.availableFunds = '251.00 USD'; vm.fromWalletId = ''; vm.globalResult = ''; vm.isRequestingSpecificAmount = false; @@ -409,6 +410,7 @@ function amountController(configService, $filter, $ionicHistory, $ionicModal, $i || (result >= vm.minShapeshiftAmount && result <= vm.maxShapeshiftAmount)); } } + console.log('allowSend: ', vm.allowSend); }; function processResult(val) { diff --git a/src/sass/views/amountNew.scss b/src/sass/views/amountNew.scss index 894135725..37de78665 100644 --- a/src/sass/views/amountNew.scss +++ b/src/sass/views/amountNew.scss @@ -365,27 +365,35 @@ } } } + } + } - .send-amount-actions { - margin-top: 15px; + .send-amount-extras { + display: flex; + flex: 0 0 auto; + flex-direction: row-reverse; + align-items: center; + justify-content: space-between; + margin: 0 14px; + + .extra { + display: inline-block; + flex: 0 1 auto; + font-size: 12pt; + } + + .button { + flex: 0 1 auto; + line-height: 1.2em; + + + .button { + margin-left: 10px; + } + + span { display: flex; align-items: center; justify-content: center; - - .button { - flex: 1 1 auto; - line-height: 1.2em; - - + .button { - margin-left: 10px; - } - - span { - display: flex; - align-items: center; - justify-content: center; - } - } } } } diff --git a/www/views/amountNew.html b/www/views/amountNew.html index b9b6c08b2..9d44e9e8d 100644 --- a/www/views/amountNew.html +++ b/www/views/amountNew.html @@ -35,20 +35,24 @@
-
- - +
+ Available Funds: {{vm.availableFunds}} +
+
+
From 2492a405a1ae6f86f9d1098052134d55db2cab76 Mon Sep 17 00:00:00 2001 From: Sam Cheng Hung Date: Thu, 26 Jul 2018 14:29:53 +0800 Subject: [PATCH 063/256] Adds fee-summary bar, adds amount directive, adds support for fee-summary overlapping with content on scrollable small screens --- src/js/directives/amount.js | 21 +++++++++++++ src/sass/components/amount.scss | 24 ++++++++++++++ src/sass/components/components.scss | 2 ++ src/sass/components/fee-summary.scss | 33 +++++++++++++++++++ src/sass/components/ion-content.scss | 4 +++ src/sass/views/review.scss | 5 +++ www/css/main.css | 47 ++++++++++++++++++++++++++++ www/views/includes/amount.html | 6 ++++ www/views/review.html | 13 +++++++- 9 files changed, 154 insertions(+), 1 deletion(-) create mode 100644 src/js/directives/amount.js create mode 100644 src/sass/components/amount.scss create mode 100644 src/sass/components/fee-summary.scss create mode 100644 www/views/includes/amount.html diff --git a/src/js/directives/amount.js b/src/js/directives/amount.js new file mode 100644 index 000000000..e86bec2fe --- /dev/null +++ b/src/js/directives/amount.js @@ -0,0 +1,21 @@ +'use strict'; +angular.module('bitcoincom.directives') + .directive('amount', [ + '$timeout', + function($timeout) { + return { + restrict: 'E', + scope: { + value: '=', + currency: '=' + }, + templateUrl: 'views/includes/amount.html', + controller: ['$scope', function($scope) { + var valueFormatted = parseFloat($scope.value).toFixed(8); + $scope.start = valueFormatted.slice(0, -5); + $scope.middle = valueFormatted.slice(-5, -2); + $scope.end = valueFormatted.substr(valueFormatted.length - 2); + }] + }; + } +]); \ No newline at end of file diff --git a/src/sass/components/amount.scss b/src/sass/components/amount.scss new file mode 100644 index 000000000..eb0768f4f --- /dev/null +++ b/src/sass/components/amount.scss @@ -0,0 +1,24 @@ +.amount { + .start, + .middle, + .end, + .currency { + display: inline-block; + } + + .start { + font-size: 14px; + } + + .middle { + font-size: 11px; + } + + .end { + font-size: 11px; + } + + .currency { + font-size: 14px; + } +} \ No newline at end of file diff --git a/src/sass/components/components.scss b/src/sass/components/components.scss index 180279125..8d8346265 100644 --- a/src/sass/components/components.scss +++ b/src/sass/components/components.scss @@ -7,3 +7,5 @@ @import "address"; @import "action-minor"; @import "expand-content"; +@import "fee-summary"; +@import "amount"; diff --git a/src/sass/components/fee-summary.scss b/src/sass/components/fee-summary.scss new file mode 100644 index 000000000..5f5236d0c --- /dev/null +++ b/src/sass/components/fee-summary.scss @@ -0,0 +1,33 @@ +.fee-summary { + position: relative; + display: flex; + justify-content: space-between; + width: 100%; + padding: 5px 12px 15px; + box-sizing: border-box; + background-color: #F2F2F2; + + &:before { + content: ''; + position: absolute; + left: 0; + top: -15px; + width: 100%; + height: 15px; + background: linear-gradient(to bottom, rgba(242,242,242,0) 0%,rgba(242,242,242,1) 100%); + } + + .fee-fiat { + &.positive { + color: #70955F; + } + + &.negative { + color: #C24633; + } + } + + .fee-crypto { + color: #BCBCBC; + } +} \ No newline at end of file diff --git a/src/sass/components/ion-content.scss b/src/sass/components/ion-content.scss index 7be47c9ab..56f3960a0 100644 --- a/src/sass/components/ion-content.scss +++ b/src/sass/components/ion-content.scss @@ -10,4 +10,8 @@ ion-content { &.padded-bottom-cta { bottom: 92px; } + + &.padded-bottom-cta-with-summary { + bottom: 134px; + } } \ No newline at end of file diff --git a/src/sass/views/review.scss b/src/sass/views/review.scss index e1d4ebd07..67733fe22 100644 --- a/src/sass/views/review.scss +++ b/src/sass/views/review.scss @@ -5,4 +5,9 @@ margin-bottom: constant(safe-area-inset-bottom); /* iOS 11.0 */ margin-bottom: env(safe-area-inset-bottom); /* iOS 11.2 */ } + + .fee-summary { + position: absolute; + bottom: 92px; + } } \ No newline at end of file diff --git a/www/css/main.css b/www/css/main.css index df8779400..063f60ff7 100644 --- a/www/css/main.css +++ b/www/css/main.css @@ -15074,6 +15074,9 @@ log-options #check-bar .checkbox-icon { /* iOS 11.0 */ margin-bottom: env(safe-area-inset-bottom); /* iOS 11.2 */ } + #view-review .fee-summary { + position: absolute; + bottom: 92px; } .gravatar { border-radius: 3px; @@ -15127,6 +15130,9 @@ ion-content.bg-neutral { ion-content.padded-bottom-cta { bottom: 92px; } +ion-content.padded-bottom-cta-with-summary { + bottom: 134px; } + .card.card-gutter-compact { margin: 10px 12px; } @@ -15212,6 +15218,47 @@ ion-content.padded-bottom-cta { opacity: 1; transform: scale(1, 1); } +.fee-summary { + position: relative; + display: flex; + justify-content: space-between; + width: 100%; + padding: 5px 12px 15px; + box-sizing: border-box; + background-color: #F2F2F2; } + .fee-summary:before { + content: ''; + position: absolute; + left: 0; + top: -15px; + width: 100%; + height: 15px; + background: linear-gradient(to bottom, rgba(242, 242, 242, 0) 0%, #f2f2f2 100%); } + .fee-summary .fee-fiat.positive { + color: #70955F; } + .fee-summary .fee-fiat.negative { + color: #C24633; } + .fee-summary .fee-crypto { + color: #BCBCBC; } + +.amount .start, +.amount .middle, +.amount .end, +.amount .currency { + display: inline-block; } + +.amount .start { + font-size: 14px; } + +.amount .middle { + font-size: 11px; } + +.amount .end { + font-size: 11px; } + +.amount .currency { + font-size: 14px; } + /* This is for rules that don't yet have a home. * Our goal is to delete this file. Search the regex: /class=".*CLASS.*?"/ */ diff --git a/www/views/includes/amount.html b/www/views/includes/amount.html new file mode 100644 index 000000000..791983c06 --- /dev/null +++ b/www/views/includes/amount.html @@ -0,0 +1,6 @@ +
+ {{start}} + {{middle}} + {{end}} + {{currency}} +
\ No newline at end of file diff --git a/www/views/review.html b/www/views/review.html index 9de1a403e..4995d3d25 100644 --- a/www/views/review.html +++ b/www/views/review.html @@ -7,7 +7,7 @@ -
@@ -63,6 +63,17 @@
+ +
+
Fee: Less than 1 cent
+
+ +
+
+ Date: Thu, 26 Jul 2018 15:04:42 +0200 Subject: [PATCH 064/256] Wallet buttons max width + Receive in viewing wallet. --- src/js/controllers/tab-receive.js | 10 +++++++--- src/js/controllers/walletDetails.js | 11 +++++++++++ src/js/routes.js | 2 +- src/sass/views/tab-home.scss | 4 ++-- src/sass/views/walletDetails.scss | 4 ++-- www/views/walletDetails.html | 2 +- 6 files changed, 24 insertions(+), 9 deletions(-) diff --git a/src/js/controllers/tab-receive.js b/src/js/controllers/tab-receive.js index 8f25412ec..dcb2d1166 100644 --- a/src/js/controllers/tab-receive.js +++ b/src/js/controllers/tab-receive.js @@ -233,10 +233,14 @@ angular.module('copayApp.controllers').controller('tabReceiveController', functi if (!$scope.wallets[0]) return; - // select first wallet if no wallet selected previously - var selectedWallet = checkSelectedWallet($scope.wallet, $scope.wallets); + var selectedWallet = null; + if (data.stateParams.walletId) { // from walletDetails + selectedWallet = checkSelectedWallet(profileService.getWallet(data.stateParams.walletId), $scope.wallets); + } else { + // select first wallet if no wallet selected previously + selectedWallet = checkSelectedWallet($scope.wallet, $scope.wallets); + } $scope.onWalletSelect(selectedWallet); - $scope.showShareButton = platformInfo.isCordova ? (platformInfo.isIOS ? 'iOS' : 'Android') : null; listeners = [ diff --git a/src/js/controllers/walletDetails.js b/src/js/controllers/walletDetails.js index b3fea717e..2436da730 100644 --- a/src/js/controllers/walletDetails.js +++ b/src/js/controllers/walletDetails.js @@ -483,4 +483,15 @@ angular.module('copayApp.controllers').controller('walletDetailsController', fun function rgbToHex(r, g, b) { return "#" + componentToHex(r) + componentToHex(g) + componentToHex(b); } + + $scope.goToReceive = function() { + $state.go('tabs.home', { + walletId: $scope.wallet.id + }).then(function () { + $ionicHistory.clearHistory(); + $state.go('tabs.receive', { + walletId: $scope.wallet.id + }); + }); + }; }); diff --git a/src/js/routes.js b/src/js/routes.js index 8277314e5..f00679727 100644 --- a/src/js/routes.js +++ b/src/js/routes.js @@ -236,7 +236,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr } }) .state('tabs.receive', { - url: '/receive', + url: '/receive/:walletId', views: { 'tab-receive': { controller: 'tabReceiveController', diff --git a/src/sass/views/tab-home.scss b/src/sass/views/tab-home.scss index 69cdfde4d..680738a3b 100644 --- a/src/sass/views/tab-home.scss +++ b/src/sass/views/tab-home.scss @@ -70,8 +70,8 @@ } } .buttons { - margin-bottom: 0; - margin-top: 6px; + margin: 6px auto 0px; + max-width: 600px; >.col { padding: 5px 10px; margin-bottom: 0; diff --git a/src/sass/views/walletDetails.scss b/src/sass/views/walletDetails.scss index 6be9e6cf2..d03530cbb 100644 --- a/src/sass/views/walletDetails.scss +++ b/src/sass/views/walletDetails.scss @@ -192,8 +192,8 @@ } .buttons { - margin-bottom: 0; - margin-top: 30px; + max-width: 600px; + margin: 30px auto 0; >.col { padding: 5px 10px; margin-bottom: 0; diff --git a/www/views/walletDetails.html b/www/views/walletDetails.html index e2c0f7342..2da69fb6e 100644 --- a/www/views/walletDetails.html +++ b/www/views/walletDetails.html @@ -92,7 +92,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 065/256] 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 8fd0b76a44d5acaeeedae7261a2d073f87b292a9 Mon Sep 17 00:00:00 2001 From: Brendon Duncan Date: Thu, 26 Jul 2018 13:09:16 -0700 Subject: [PATCH 066/256] Change Currency button appearance. --- src/sass/views/amountNew.scss | 34 +++++++++++++++------ www/img/icon-alternative-currency-black.svg | 22 +++++++++++++ www/views/amountNew.html | 10 +++--- 3 files changed, 52 insertions(+), 14 deletions(-) create mode 100644 www/img/icon-alternative-currency-black.svg diff --git a/src/sass/views/amountNew.scss b/src/sass/views/amountNew.scss index 37de78665..5229f9b56 100644 --- a/src/sass/views/amountNew.scss +++ b/src/sass/views/amountNew.scss @@ -251,7 +251,7 @@ .warning { color: #b7664d; font-family: 'ProximaNova-Semibold'; - font-size: 12pt; + font-size: 12px; padding: 0 6px 6px 6px; text-align: center; } @@ -371,24 +371,38 @@ .send-amount-extras { display: flex; flex: 0 0 auto; + /* So that if only one item is present, it appears on the right. */ flex-direction: row-reverse; + font-size: 12px; align-items: center; justify-content: space-between; margin: 0 14px; - .extra { - display: inline-block; + .extra, + button.extra { + color: #000; + display: flex; flex: 0 1 auto; - font-size: 12pt; } - .button { - flex: 0 1 auto; - line-height: 1.2em; + button.extra { + background: none; + border: none; + font-family: 'ProximaNova'; + font-size: 14px; + line-height: normal; + min-height: auto; + min-width: auto; + padding: 0; + } - + .button { - margin-left: 10px; - } + .button .icon:before { + font-size: 14px; + line-height: normal; + } + + + .button { span { display: flex; diff --git a/www/img/icon-alternative-currency-black.svg b/www/img/icon-alternative-currency-black.svg new file mode 100644 index 000000000..e9b175256 --- /dev/null +++ b/www/img/icon-alternative-currency-black.svg @@ -0,0 +1,22 @@ + + + + 3A719124-019D-470F-908A-5D61F117A295 + Created with sketchtool. + + + + + + + + + + + + + + + + + diff --git a/www/views/amountNew.html b/www/views/amountNew.html index 9d44e9e8d..753074e54 100644 --- a/www/views/amountNew.html +++ b/www/views/amountNew.html @@ -35,18 +35,20 @@
+
-
Available Funds: {{vm.availableFunds}} -
- +
+ -
- Available Funds: {{vm.availableFunds}} +
+ Available Funds: {{vm.availableFunds}}
From 69b2fac8e576ff06116b05ffe72e0f531bd64209 Mon Sep 17 00:00:00 2001 From: Sam Cheng Hung Date: Fri, 27 Jul 2018 12:29:34 +0800 Subject: [PATCH 068/256] Updates amount font size --- src/sass/components/amount.scss | 8 ++++---- src/sass/components/fee-summary.scss | 2 +- www/css/main.css | 10 +++++----- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/sass/components/amount.scss b/src/sass/components/amount.scss index eb0768f4f..3280c0706 100644 --- a/src/sass/components/amount.scss +++ b/src/sass/components/amount.scss @@ -7,18 +7,18 @@ } .start { - font-size: 14px; + font-size: 1em; } .middle { - font-size: 11px; + font-size: 0.7857em; } .end { - font-size: 11px; + font-size: 0.7857em; } .currency { - font-size: 14px; + font-size: 1em; } } \ No newline at end of file diff --git a/src/sass/components/fee-summary.scss b/src/sass/components/fee-summary.scss index 5f5236d0c..404643a82 100644 --- a/src/sass/components/fee-summary.scss +++ b/src/sass/components/fee-summary.scss @@ -28,6 +28,6 @@ } .fee-crypto { - color: #BCBCBC; + color: #A7A7A7; } } \ No newline at end of file diff --git a/www/css/main.css b/www/css/main.css index 063f60ff7..7a064f812 100644 --- a/www/css/main.css +++ b/www/css/main.css @@ -15239,7 +15239,7 @@ ion-content.padded-bottom-cta-with-summary { .fee-summary .fee-fiat.negative { color: #C24633; } .fee-summary .fee-crypto { - color: #BCBCBC; } + color: #A7A7A7; } .amount .start, .amount .middle, @@ -15248,16 +15248,16 @@ ion-content.padded-bottom-cta-with-summary { display: inline-block; } .amount .start { - font-size: 14px; } + font-size: 1em; } .amount .middle { - font-size: 11px; } + font-size: 0.7857em; } .amount .end { - font-size: 11px; } + font-size: 0.7857em; } .amount .currency { - font-size: 14px; } + font-size: 1em; } /* This is for rules that don't yet have a home. * Our goal is to delete this file. Search the regex: /class=".*CLASS.*?"/ From 47de79cc64ec2ce6856960938a7b854a0679a0ab Mon Sep 17 00:00:00 2001 From: Sam Cheng Hung Date: Fri, 27 Jul 2018 17:03:09 +0800 Subject: [PATCH 069/256] Adds support for 0, 2, 3 and 8 decimal places and locale commas and decimals --- src/js/directives/amount.js | 89 ++++++++++++++++++++++++++------- src/sass/components/amount.scss | 3 ++ www/css/main.css | 9 ++-- www/views/includes/amount.html | 5 +- www/views/review.html | 4 +- 5 files changed, 84 insertions(+), 26 deletions(-) diff --git a/src/js/directives/amount.js b/src/js/directives/amount.js index e86bec2fe..ff61288b3 100644 --- a/src/js/directives/amount.js +++ b/src/js/directives/amount.js @@ -1,21 +1,76 @@ 'use strict'; + +/** + * @desc amount directive that can be used to display formatted financial values + * @example + */ angular.module('bitcoincom.directives') - .directive('amount', [ - '$timeout', - function($timeout) { - return { - restrict: 'E', - scope: { - value: '=', - currency: '=' - }, - templateUrl: 'views/includes/amount.html', - controller: ['$scope', function($scope) { - var valueFormatted = parseFloat($scope.value).toFixed(8); - $scope.start = valueFormatted.slice(0, -5); - $scope.middle = valueFormatted.slice(-5, -2); - $scope.end = valueFormatted.substr(valueFormatted.length - 2); - }] + .directive('amount', [ + '$timeout', + function($timeout) { + return { + restrict: 'E', + scope: { + value: '@', + currency: '@' + }, + templateUrl: 'views/includes/amount.html', + controller: ['$scope', function($scope) { + var decimalPlaces = { + '0': ['BIF', 'CLP', 'DJF', 'GNF', 'ILS', 'JPY', 'KMF', 'KRW', 'MGA', 'PYG', 'RWF', 'UGX', 'VND', 'VUV', 'XAF', 'XOF', 'XPF'], + '3': ['BHD', 'IQD', 'JOD', 'KWD', 'OMR', 'TND'], + '8': ['BCH', 'BTC'] }; - } + + var numberWithCommas = function(x) { + return parseFloat(x).toLocaleString(); + }; + + var buildAmount = function(start, middle, end) { + $scope.start = start; + $scope.middle = middle; + $scope.end = end; + }; + + var getDecimalPlaces = function(currency) { + if (decimalPlaces['0'].indexOf($scope.currency.toUpperCase()) > -1) return '0'; + if (decimalPlaces['3'].indexOf($scope.currency.toUpperCase()) > -1) return '3'; + if (decimalPlaces['8'].indexOf($scope.currency.toUpperCase()) > -1) return '8'; + return '2'; + }; + + switch (getDecimalPlaces($scope.currency)) { + case '0': + var valueFormatted = numberWithCommas(Math.round(parseFloat($scope.value))); + buildAmount(valueFormatted, '', ''); + break; + + case '2': + var valueProcessing = parseFloat(parseFloat($scope.value).toFixed(2)); + var valueFormatted = numberWithCommas(valueProcessing); + buildAmount(valueFormatted, '', ''); + break; + + case '3': + var valueProcessing = parseFloat(parseFloat($scope.value).toFixed(3)); + var valueFormatted = numberWithCommas(valueProcessing); + buildAmount(valueFormatted, '', ''); + break; + + case '8': + var valueFormatted = parseFloat($scope.value).toFixed(8); + if (parseFloat($scope.value) == 0) { + buildAmount('0', '', ''); + } else { + buildAmount(valueFormatted, '', ''); + var start = numberWithCommas(valueFormatted.slice(0, -5)); + var middle = valueFormatted.slice(-5, -2); + var end = valueFormatted.substr(valueFormatted.length - 2); + buildAmount(start, middle, end); + } + break; + } + }] + }; + } ]); \ No newline at end of file diff --git a/src/sass/components/amount.scss b/src/sass/components/amount.scss index 3280c0706..d8fe552a2 100644 --- a/src/sass/components/amount.scss +++ b/src/sass/components/amount.scss @@ -12,13 +12,16 @@ .middle { font-size: 0.7857em; + margin-left: 5px; } .end { font-size: 0.7857em; + margin-left: 5px; } .currency { font-size: 1em; + margin-left: 5px; } } \ No newline at end of file diff --git a/www/css/main.css b/www/css/main.css index 7a064f812..3b7ddca9d 100644 --- a/www/css/main.css +++ b/www/css/main.css @@ -15251,13 +15251,16 @@ ion-content.padded-bottom-cta-with-summary { font-size: 1em; } .amount .middle { - font-size: 0.7857em; } + font-size: 0.7857em; + margin-left: 5px; } .amount .end { - font-size: 0.7857em; } + font-size: 0.7857em; + margin-left: 5px; } .amount .currency { - font-size: 1em; } + font-size: 1em; + margin-left: 5px; } /* This is for rules that don't yet have a home. * Our goal is to delete this file. Search the regex: /class=".*CLASS.*?"/ diff --git a/www/views/includes/amount.html b/www/views/includes/amount.html index 791983c06..5d006fe46 100644 --- a/www/views/includes/amount.html +++ b/www/views/includes/amount.html @@ -1,6 +1,3 @@
- {{start}} - {{middle}} - {{end}} - {{currency}} + {{start}}{{middle}}{{end}}{{currency}}
\ No newline at end of file diff --git a/www/views/review.html b/www/views/review.html index 4995d3d25..64c256fd8 100644 --- a/www/views/review.html +++ b/www/views/review.html @@ -69,8 +69,8 @@
+ value="{{fee.value}}" + currency="{{fee.currency}}">
From 2b32fe9bdccb603cef9d85f5d4c1bf09197dcd07 Mon Sep 17 00:00:00 2001 From: Sam Cheng Hung Date: Fri, 27 Jul 2018 17:04:53 +0800 Subject: [PATCH 070/256] Changes amount directive scope values to bind to parent scope property --- src/js/directives/amount.js | 4 ++-- www/views/review.html | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/js/directives/amount.js b/src/js/directives/amount.js index ff61288b3..bf519c0d0 100644 --- a/src/js/directives/amount.js +++ b/src/js/directives/amount.js @@ -11,8 +11,8 @@ angular.module('bitcoincom.directives') return { restrict: 'E', scope: { - value: '@', - currency: '@' + value: '=', + currency: '=' }, templateUrl: 'views/includes/amount.html', controller: ['$scope', function($scope) { diff --git a/www/views/review.html b/www/views/review.html index 64c256fd8..4995d3d25 100644 --- a/www/views/review.html +++ b/www/views/review.html @@ -69,8 +69,8 @@
+ value="fee.value" + currency="fee.currency">
From 81e9f527ff05dbca5977c3bf7aff5c519cf6a6aa Mon Sep 17 00:00:00 2001 From: Brendon Duncan Date: Sat, 28 Jul 2018 13:04:04 -0700 Subject: [PATCH 071/256] Route for send amount. --- src/js/routes.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/js/routes.js b/src/js/routes.js index 5900b88da..5b0b59d77 100644 --- a/src/js/routes.js +++ b/src/js/routes.js @@ -292,7 +292,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr 'tab-send@tabs': { controller: 'amountController', controllerAs: 'vm', - templateUrl: 'views/amount.html' + templateUrl: 'views/amountNew.html' } } }) From 0ba1ea1f423435b7ce3e74a84750ca374dec2b03 Mon Sep 17 00:00:00 2001 From: Brendon Duncan Date: Sat, 28 Jul 2018 15:36:23 -0700 Subject: [PATCH 072/256] Use All Available Funds button. --- src/sass/variables.scss | 4 +++ src/sass/views/amountNew.scss | 60 +++++++++++++++++++++++------------ www/views/amountNew.html | 16 ++++++---- 3 files changed, 53 insertions(+), 27 deletions(-) diff --git a/src/sass/variables.scss b/src/sass/variables.scss index cb21c030a..c2ab16254 100644 --- a/src/sass/variables.scss +++ b/src/sass/variables.scss @@ -9,6 +9,7 @@ $v-font-family-light: "Roboto-Light", sans-serif- /* Colors */ $v-bitcoin-orange: #fab915 !default; +$v-off-black: #262424; $v-dark-gray: #445 !default; $v-mid-gray: #667 !default; $v-light-gray: #9b9bab !default; @@ -24,8 +25,11 @@ $v-text-accent-color: #647ce8 !default; $v-success-color: #13e5b6 !default; $v-warning-color: #ffa500 !default; +$v-warning-color-2: #b7664d; $v-error-color: #ef473a !default; +$v-background-under-card: #f2f2f2; + $v-wallet-color-map: ( 0: (color: #dd4b39, name: 'Cinnabar'), 1: (color: #f38f12, name: 'Carrot Orange'), diff --git a/src/sass/views/amountNew.scss b/src/sass/views/amountNew.scss index 5f27361b3..eb29d9ee4 100644 --- a/src/sass/views/amountNew.scss +++ b/src/sass/views/amountNew.scss @@ -249,7 +249,6 @@ min-height: 20px; .warning { - color: #b7664d; font-family: 'ProximaNova-Semibold'; font-size: 12px; padding: 0 6px 6px 6px; @@ -433,37 +432,59 @@ .keypad-container { position: relative; + font-size: 18px; + line-height: 2em; //flex: 0 1 196px; + @media (min-height: 667px) { + font-size: 24px; + } + + @media(max-height: 480px) { + font-size: 12px; + } + @media (min-height: 667px) { //flex: 0 1 224px; } + .sendmax { + background: $v-off-black; + + .button { + color: white; + background: black; + border: 1px solid $v-off-black; + border-radius: 0; + font-size: 0.8em; + line-height: 2em; + margin-bottom: 1.618em; + width: 100%; + + .available-funds-amount { + color: #C9C9C9; + } + + &:active { + background-color: $v-dark-gray; + } + } + } + .keypad { text-align: center; - font-size: 18px; font-weight: lighter; position: absolute; bottom: 0; width: 100%; color: $v-text-primary-color; - @media (min-height: 667px) { - font-size: 24px; - } + .row { padding: 0 !important; margin: 0 !important; } - - .col { - line-height: 38px; - - @media (min-height: 667px) { - line-height: 45px; - } - } .row { &:last-child { @@ -498,23 +519,22 @@ .digit{ cursor: pointer; background-color: #000; - border: 1px solid #262424; + border: 1px solid $v-off-black; transition: all 0.1s ease; - &:active { background-color: $v-dark-gray; } } - @media(max-height: 480px) { - font-size: 12px; - - } } } } - background: #f2f2f2; + + .warning { + color: $v-warning-color-2; + } + background: $v-background-under-card; ion-content { margin-bottom: constant(safe-area-inset-bottom); /* iOS 11.0 */ diff --git a/www/views/amountNew.html b/www/views/amountNew.html index 1b29f6e44..9449c361d 100644 --- a/www/views/amountNew.html +++ b/www/views/amountNew.html @@ -48,16 +48,18 @@ Available Funds: {{vm.availableFunds}}
- -
+
+ +
+
From 72a5b3cabd57396947d08fe329362ac59c3e690d Mon Sep 17 00:00:00 2001 From: Brendon Duncan Date: Sat, 28 Jul 2018 17:18:52 -0700 Subject: [PATCH 073/256] Primary ("Next") button. --- src/sass/variables.scss | 1 + src/sass/views/amountNew.scss | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/src/sass/variables.scss b/src/sass/variables.scss index c2ab16254..67d5a044b 100644 --- a/src/sass/variables.scss +++ b/src/sass/variables.scss @@ -81,6 +81,7 @@ $v-button-primary-active-bg: darken($v-accent-color, 10% $v-button-primary-active-border: transparent !default; $v-button-primary-clear-bg: none !default; $v-button-primary-clear-color: $v-accent-color !default; +$v-button-primary-disabled-bg: $v-mid-gray; $v-button-primary-outline-bg: transparent !default; $v-button-primary-outline-border: $v-accent-color !default; $v-button-primary-outline-color: $v-accent-color !default; diff --git a/src/sass/views/amountNew.scss b/src/sass/views/amountNew.scss index eb29d9ee4..bbca0f5a2 100644 --- a/src/sass/views/amountNew.scss +++ b/src/sass/views/amountNew.scss @@ -529,6 +529,16 @@ } } + + .button-primary { + background-color: $v-primary-color; + border-radius: 0; + font-family: 'ProximaNova-Semibold'; + } + + .button-primary[disabled] { + background-color: $v-button-primary-disabled-bg; + } } .warning { From 9781f90f2b21095d2ab34468c3336cf663bad3b4 Mon Sep 17 00:00:00 2001 From: Brendon Duncan Date: Sat, 28 Jul 2018 19:20:12 -0700 Subject: [PATCH 074/256] Warning colour for insufficient funds. --- src/js/controllers/amount.js | 1 + src/sass/views/amountNew.scss | 6 +++++- www/views/amountNew.html | 8 ++++---- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/js/controllers/amount.js b/src/js/controllers/amount.js index 1d4cb41f1..a4c8171a4 100644 --- a/src/js/controllers/amount.js +++ b/src/js/controllers/amount.js @@ -12,6 +12,7 @@ function amountController(configService, $filter, $ionicHistory, $ionicModal, $i vm.amountModel = { amount: 0 }; vm.availableFunds = '251.00 USD'; vm.fromWalletId = ''; + vm.fundsAreInsufficient = true; vm.globalResult = ''; vm.isRequestingSpecificAmount = false; vm.listComplete = false; diff --git a/src/sass/views/amountNew.scss b/src/sass/views/amountNew.scss index bbca0f5a2..9dad8b045 100644 --- a/src/sass/views/amountNew.scss +++ b/src/sass/views/amountNew.scss @@ -377,10 +377,14 @@ justify-content: space-between; margin: 0 14px; - .availableFunds { + .available-funds { color: #6F6F70; } + .warning { + color: $v-warning-color-2; + } + .extra, button.extra { display: flex; diff --git a/www/views/amountNew.html b/www/views/amountNew.html index 9449c361d..b23a34fbf 100644 --- a/www/views/amountNew.html +++ b/www/views/amountNew.html @@ -29,7 +29,7 @@
-
- -
- Available Funds: {{vm.availableFunds}} +
+ Available Funds:{{vm.availableFunds}}
From 7669ab247981245fbe611d59cb86bbd3372da2b4 Mon Sep 17 00:00:00 2001 From: Brendon Duncan Date: Mon, 30 Jul 2018 19:28:30 +1200 Subject: [PATCH 077/256] Transitioning from the Shapeshift screen. --- src/js/controllers/shapeshift.js | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/src/js/controllers/shapeshift.js b/src/js/controllers/shapeshift.js index a58fc20b6..5bc815d19 100644 --- a/src/js/controllers/shapeshift.js +++ b/src/js/controllers/shapeshift.js @@ -1,6 +1,9 @@ 'use strict'; angular.module('copayApp.controllers').controller('shapeshiftController', function($scope, $interval, profileService, walletService, popupService, lodash, $ionicNavBarDelegate) { + var vm = this; + + //vm.buyBitcion = buyBitcoin; var walletsBtc = []; var walletsBch = []; @@ -21,6 +24,12 @@ angular.module('copayApp.controllers').controller('shapeshiftController', functi $scope.singleToWallet = $scope.toWallets.length == 1; } + function buyBitcoin() { + console.log('buyBitcoin()'); + } + + $scope.buyBitcoin = buyBitcoin; + $scope.onFromWalletSelect = function(wallet) { $scope.fromWallet = wallet; showToWallets(); @@ -37,12 +46,24 @@ angular.module('copayApp.controllers').controller('shapeshiftController', functi } $scope.$on("$ionicView.beforeEnter", function(event, data) { + console.log('beforeEnter()'); walletsBtc = profileService.getWallets({coin: 'btc'}); walletsBch = profileService.getWallets({coin: 'bch'}); $scope.fromWallets = lodash.filter(walletsBtc.concat(walletsBch), function(w) { return w.status.balance.availableAmount > 0; }); - if ($scope.fromWallets.length == 0) return; + console.log('Checking wallets.'); + if ($scope.fromWallets.length == 0) { + // Need to go to new origin screen here, with parameters + var params = { + thirdParty: { + id: 'shapeshift' + } + }; + console.log('Asking for transition'); + $state.transitionTo('tabs.send', params); + return + } $scope.onFromWalletSelect($scope.fromWallets[0]); $scope.onToWalletSelect($scope.toWallets[0]); $scope.singleFromWallet = $scope.fromWallets.length == 1; From 3732d21728b92993771ab51aefc114b31a84d5bb Mon Sep 17 00:00:00 2001 From: Sebastiaan Pasma Date: Mon, 30 Jul 2018 09:37:14 +0200 Subject: [PATCH 078/256] 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 2b96293c80302181f52b0c4d6701b342fee974ab Mon Sep 17 00:00:00 2001 From: Sam Cheng Hung Date: Mon, 30 Jul 2018 16:40:16 +0800 Subject: [PATCH 079/256] Move amount directive to a separate branch --- src/js/directives/amount.js | 76 ----------------------------- src/sass/components/amount.scss | 27 ---------- src/sass/components/components.scss | 1 - www/css/main.css | 21 -------- 4 files changed, 125 deletions(-) delete mode 100644 src/js/directives/amount.js delete mode 100644 src/sass/components/amount.scss diff --git a/src/js/directives/amount.js b/src/js/directives/amount.js deleted file mode 100644 index bf519c0d0..000000000 --- a/src/js/directives/amount.js +++ /dev/null @@ -1,76 +0,0 @@ -'use strict'; - -/** - * @desc amount directive that can be used to display formatted financial values - * @example - */ -angular.module('bitcoincom.directives') - .directive('amount', [ - '$timeout', - function($timeout) { - return { - restrict: 'E', - scope: { - value: '=', - currency: '=' - }, - templateUrl: 'views/includes/amount.html', - controller: ['$scope', function($scope) { - var decimalPlaces = { - '0': ['BIF', 'CLP', 'DJF', 'GNF', 'ILS', 'JPY', 'KMF', 'KRW', 'MGA', 'PYG', 'RWF', 'UGX', 'VND', 'VUV', 'XAF', 'XOF', 'XPF'], - '3': ['BHD', 'IQD', 'JOD', 'KWD', 'OMR', 'TND'], - '8': ['BCH', 'BTC'] - }; - - var numberWithCommas = function(x) { - return parseFloat(x).toLocaleString(); - }; - - var buildAmount = function(start, middle, end) { - $scope.start = start; - $scope.middle = middle; - $scope.end = end; - }; - - var getDecimalPlaces = function(currency) { - if (decimalPlaces['0'].indexOf($scope.currency.toUpperCase()) > -1) return '0'; - if (decimalPlaces['3'].indexOf($scope.currency.toUpperCase()) > -1) return '3'; - if (decimalPlaces['8'].indexOf($scope.currency.toUpperCase()) > -1) return '8'; - return '2'; - }; - - switch (getDecimalPlaces($scope.currency)) { - case '0': - var valueFormatted = numberWithCommas(Math.round(parseFloat($scope.value))); - buildAmount(valueFormatted, '', ''); - break; - - case '2': - var valueProcessing = parseFloat(parseFloat($scope.value).toFixed(2)); - var valueFormatted = numberWithCommas(valueProcessing); - buildAmount(valueFormatted, '', ''); - break; - - case '3': - var valueProcessing = parseFloat(parseFloat($scope.value).toFixed(3)); - var valueFormatted = numberWithCommas(valueProcessing); - buildAmount(valueFormatted, '', ''); - break; - - case '8': - var valueFormatted = parseFloat($scope.value).toFixed(8); - if (parseFloat($scope.value) == 0) { - buildAmount('0', '', ''); - } else { - buildAmount(valueFormatted, '', ''); - var start = numberWithCommas(valueFormatted.slice(0, -5)); - var middle = valueFormatted.slice(-5, -2); - var end = valueFormatted.substr(valueFormatted.length - 2); - buildAmount(start, middle, end); - } - break; - } - }] - }; - } -]); \ No newline at end of file diff --git a/src/sass/components/amount.scss b/src/sass/components/amount.scss deleted file mode 100644 index d8fe552a2..000000000 --- a/src/sass/components/amount.scss +++ /dev/null @@ -1,27 +0,0 @@ -.amount { - .start, - .middle, - .end, - .currency { - display: inline-block; - } - - .start { - font-size: 1em; - } - - .middle { - font-size: 0.7857em; - margin-left: 5px; - } - - .end { - font-size: 0.7857em; - margin-left: 5px; - } - - .currency { - font-size: 1em; - margin-left: 5px; - } -} \ No newline at end of file diff --git a/src/sass/components/components.scss b/src/sass/components/components.scss index 8d8346265..a689138bf 100644 --- a/src/sass/components/components.scss +++ b/src/sass/components/components.scss @@ -8,4 +8,3 @@ @import "action-minor"; @import "expand-content"; @import "fee-summary"; -@import "amount"; diff --git a/www/css/main.css b/www/css/main.css index 3b7ddca9d..f059eeaac 100644 --- a/www/css/main.css +++ b/www/css/main.css @@ -15241,27 +15241,6 @@ ion-content.padded-bottom-cta-with-summary { .fee-summary .fee-crypto { color: #A7A7A7; } -.amount .start, -.amount .middle, -.amount .end, -.amount .currency { - display: inline-block; } - -.amount .start { - font-size: 1em; } - -.amount .middle { - font-size: 0.7857em; - margin-left: 5px; } - -.amount .end { - font-size: 0.7857em; - margin-left: 5px; } - -.amount .currency { - font-size: 1em; - margin-left: 5px; } - /* This is for rules that don't yet have a home. * Our goal is to delete this file. Search the regex: /class=".*CLASS.*?"/ */ From e1d65bc5572818d19f22acfc494f14636f2cfc15 Mon Sep 17 00:00:00 2001 From: Sam Cheng Hung Date: Mon, 30 Jul 2018 16:49:57 +0800 Subject: [PATCH 080/256] Adds amount directive --- src/js/directives/amount.js | 76 ++ src/sass/components/amount.scss | 27 + src/sass/components/components.scss | 1 + src/sass/main.scss | 1 + www/css/main.css | 1183 ++++++++++++++------------- www/index.html | 7 +- 6 files changed, 734 insertions(+), 561 deletions(-) create mode 100644 src/js/directives/amount.js create mode 100644 src/sass/components/amount.scss create mode 100644 src/sass/components/components.scss diff --git a/src/js/directives/amount.js b/src/js/directives/amount.js new file mode 100644 index 000000000..bf519c0d0 --- /dev/null +++ b/src/js/directives/amount.js @@ -0,0 +1,76 @@ +'use strict'; + +/** + * @desc amount directive that can be used to display formatted financial values + * @example + */ +angular.module('bitcoincom.directives') + .directive('amount', [ + '$timeout', + function($timeout) { + return { + restrict: 'E', + scope: { + value: '=', + currency: '=' + }, + templateUrl: 'views/includes/amount.html', + controller: ['$scope', function($scope) { + var decimalPlaces = { + '0': ['BIF', 'CLP', 'DJF', 'GNF', 'ILS', 'JPY', 'KMF', 'KRW', 'MGA', 'PYG', 'RWF', 'UGX', 'VND', 'VUV', 'XAF', 'XOF', 'XPF'], + '3': ['BHD', 'IQD', 'JOD', 'KWD', 'OMR', 'TND'], + '8': ['BCH', 'BTC'] + }; + + var numberWithCommas = function(x) { + return parseFloat(x).toLocaleString(); + }; + + var buildAmount = function(start, middle, end) { + $scope.start = start; + $scope.middle = middle; + $scope.end = end; + }; + + var getDecimalPlaces = function(currency) { + if (decimalPlaces['0'].indexOf($scope.currency.toUpperCase()) > -1) return '0'; + if (decimalPlaces['3'].indexOf($scope.currency.toUpperCase()) > -1) return '3'; + if (decimalPlaces['8'].indexOf($scope.currency.toUpperCase()) > -1) return '8'; + return '2'; + }; + + switch (getDecimalPlaces($scope.currency)) { + case '0': + var valueFormatted = numberWithCommas(Math.round(parseFloat($scope.value))); + buildAmount(valueFormatted, '', ''); + break; + + case '2': + var valueProcessing = parseFloat(parseFloat($scope.value).toFixed(2)); + var valueFormatted = numberWithCommas(valueProcessing); + buildAmount(valueFormatted, '', ''); + break; + + case '3': + var valueProcessing = parseFloat(parseFloat($scope.value).toFixed(3)); + var valueFormatted = numberWithCommas(valueProcessing); + buildAmount(valueFormatted, '', ''); + break; + + case '8': + var valueFormatted = parseFloat($scope.value).toFixed(8); + if (parseFloat($scope.value) == 0) { + buildAmount('0', '', ''); + } else { + buildAmount(valueFormatted, '', ''); + var start = numberWithCommas(valueFormatted.slice(0, -5)); + var middle = valueFormatted.slice(-5, -2); + var end = valueFormatted.substr(valueFormatted.length - 2); + buildAmount(start, middle, end); + } + break; + } + }] + }; + } +]); \ No newline at end of file diff --git a/src/sass/components/amount.scss b/src/sass/components/amount.scss new file mode 100644 index 000000000..d8fe552a2 --- /dev/null +++ b/src/sass/components/amount.scss @@ -0,0 +1,27 @@ +.amount { + .start, + .middle, + .end, + .currency { + display: inline-block; + } + + .start { + font-size: 1em; + } + + .middle { + font-size: 0.7857em; + margin-left: 5px; + } + + .end { + font-size: 0.7857em; + margin-left: 5px; + } + + .currency { + font-size: 1em; + margin-left: 5px; + } +} \ No newline at end of file diff --git a/src/sass/components/components.scss b/src/sass/components/components.scss new file mode 100644 index 000000000..def6289fa --- /dev/null +++ b/src/sass/components/components.scss @@ -0,0 +1 @@ +@import "amount.scss"; diff --git a/src/sass/main.scss b/src/sass/main.scss index 7b3e46291..516656449 100644 --- a/src/sass/main.scss +++ b/src/sass/main.scss @@ -9,4 +9,5 @@ @import "mixins/mixins"; @import "views/views"; @import "directives/directives"; +@import "components/components"; @import "shame"; diff --git a/www/css/main.css b/www/css/main.css index b4e67edac..d30a89142 100644 --- a/www/css/main.css +++ b/www/css/main.css @@ -9970,7 +9970,7 @@ ion-nav-bar.hide { .card { margin: 20px 14px; } -ion-view.deflash-blue:before, ion-view#view-amount:before, ion-view#view-confirm:before, ion-view#copayers-invitation:before, ion-view#tab-home:before, ion-view#tab-receive:before, ion-view#tab-send:before, ion-view.settings:before, ion-view#bitpayCard:before, ion-view#bitpayCard-intro:before, ion-view#view-address-book:before, ion-view#addresses:before, ion-view#send-feedback:before, ion-view#choose-fee-level:before, ion-view#txp-details:before, ion-view#coinbase:before, ion-view#glidera:before, ion-view#amazon:before, ion-view#mercadolibre:before, ion-view#custom-amount:before { +ion-view.deflash-blue:before, ion-view#view-amount:before, ion-view#view-confirm:before, ion-view#copayers-invitation:before, ion-view#tab-home:before, ion-view#tab-receive:before, ion-view#tab-send:before, ion-view.settings:before, ion-view#bitpayCard:before, ion-view#bitpayCard-intro:before, ion-view#view-address-book:before, ion-view#addresses:before, ion-view#choose-fee-level:before, ion-view#txp-details:before, ion-view#coinbase:before, ion-view#glidera:before, ion-view#amazon:before, ion-view#mercadolibre:before, ion-view#custom-amount:before { content: " "; display: block; position: absolute; @@ -9980,7 +9980,7 @@ ion-view.deflash-blue:before, ion-view#view-amount:before, ion-view#view-confirm height: 44px; background-color: #fab915; } -.platform-ios.platform-cordova:not(.fullscreen) ion-view.deflash-blue:before, .platform-ios.platform-cordova:not(.fullscreen) ion-view#view-amount:before, .platform-ios.platform-cordova:not(.fullscreen) ion-view#view-confirm:before, .platform-ios.platform-cordova:not(.fullscreen) ion-view#copayers-invitation:before, .platform-ios.platform-cordova:not(.fullscreen) ion-view#tab-home:before, .platform-ios.platform-cordova:not(.fullscreen) ion-view#tab-receive:before, .platform-ios.platform-cordova:not(.fullscreen) ion-view#tab-send:before, .platform-ios.platform-cordova:not(.fullscreen) ion-view.settings:before, .platform-ios.platform-cordova:not(.fullscreen) ion-view#bitpayCard:before, .platform-ios.platform-cordova:not(.fullscreen) ion-view#bitpayCard-intro:before, .platform-ios.platform-cordova:not(.fullscreen) ion-view#view-address-book:before, .platform-ios.platform-cordova:not(.fullscreen) ion-view#addresses:before, .platform-ios.platform-cordova:not(.fullscreen) ion-view#send-feedback:before, .platform-ios.platform-cordova:not(.fullscreen) ion-view#choose-fee-level:before, .platform-ios.platform-cordova:not(.fullscreen) ion-view#txp-details:before, .platform-ios.platform-cordova:not(.fullscreen) ion-view#coinbase:before, .platform-ios.platform-cordova:not(.fullscreen) ion-view#glidera:before, .platform-ios.platform-cordova:not(.fullscreen) ion-view#amazon:before, .platform-ios.platform-cordova:not(.fullscreen) ion-view#mercadolibre:before, .platform-ios.platform-cordova:not(.fullscreen) ion-view#custom-amount:before { +.platform-ios.platform-cordova:not(.fullscreen) ion-view.deflash-blue:before, .platform-ios.platform-cordova:not(.fullscreen) ion-view#view-amount:before, .platform-ios.platform-cordova:not(.fullscreen) ion-view#view-confirm:before, .platform-ios.platform-cordova:not(.fullscreen) ion-view#copayers-invitation:before, .platform-ios.platform-cordova:not(.fullscreen) ion-view#tab-home:before, .platform-ios.platform-cordova:not(.fullscreen) ion-view#tab-receive:before, .platform-ios.platform-cordova:not(.fullscreen) ion-view#tab-send:before, .platform-ios.platform-cordova:not(.fullscreen) ion-view.settings:before, .platform-ios.platform-cordova:not(.fullscreen) ion-view#bitpayCard:before, .platform-ios.platform-cordova:not(.fullscreen) ion-view#bitpayCard-intro:before, .platform-ios.platform-cordova:not(.fullscreen) ion-view#view-address-book:before, .platform-ios.platform-cordova:not(.fullscreen) ion-view#addresses:before, .platform-ios.platform-cordova:not(.fullscreen) ion-view#choose-fee-level:before, .platform-ios.platform-cordova:not(.fullscreen) ion-view#txp-details:before, .platform-ios.platform-cordova:not(.fullscreen) ion-view#coinbase:before, .platform-ios.platform-cordova:not(.fullscreen) ion-view#glidera:before, .platform-ios.platform-cordova:not(.fullscreen) ion-view#amazon:before, .platform-ios.platform-cordova:not(.fullscreen) ion-view#mercadolibre:before, .platform-ios.platform-cordova:not(.fullscreen) ion-view#custom-amount:before { height: 64px; } .just-a-hint, .icon.bp-arrow-right, .icon.bp-arrow-down, .icon.bp-arrow-up { @@ -10071,10 +10071,12 @@ ion-view.deflash-blue:before, ion-view#view-amount:before, ion-view#view-confirm .loading .spinner svg { margin-top: 0; } -.button.button-primary.button-standard, .button.button-secondary.button-standard, .button.button-light.button-standard, .button.button-assertive.button-standard, +.button.button-primary.button-standard, .button.button-secondary.button-standard, .button.button-light.button-standard, .button.button-white.button-standard, .button.button-green.button-standard, .button.button-assertive.button-standard, .onboarding .button.button-primary.button-standard, .onboarding .button.button-secondary.button-standard, .onboarding .button.button-light.button-standard, +.onboarding .button.button-white.button-standard, +.onboarding .button.button-green.button-standard, .onboarding .button.button-assertive.button-standard { width: 85%; max-width: 300px; @@ -10118,10 +10120,12 @@ ion-view.deflash-blue:before, ion-view#view-amount:before, ion-view#view-confirm box-shadow: none; color: #fff; } -.button.button-primary.button-standard + .button-standard, .button.button-secondary.button-standard + .button-standard, .button.button-light.button-standard + .button-standard, .button.button-assertive.button-standard + .button-standard, +.button.button-primary.button-standard + .button-standard, .button.button-secondary.button-standard + .button-standard, .button.button-light.button-standard + .button-standard, .button.button-white.button-standard + .button-standard, .button.button-green.button-standard + .button-standard, .button.button-assertive.button-standard + .button-standard, .onboarding .button.button-primary.button-standard + .button-standard, .onboarding .button.button-secondary.button-standard + .button-standard, .onboarding .button.button-light.button-standard + .button-standard, +.onboarding .button.button-white.button-standard + .button-standard, +.onboarding .button.button-green.button-standard + .button-standard, .onboarding .button.button-assertive.button-standard + .button-standard { margin-top: 1rem; } @@ -10183,8 +10187,67 @@ ion-view.deflash-blue:before, ion-view#view-amount:before, ion-view#view-confirm font-size: 0.7em !important; display: inline !important; } -.button.button-full { - display: block; } +.button { + border-radius: 6px; } + .button.button-full { + display: block; } + .button-green { + border-color: #FFF; + background-color: #719561; + color: #FFF; + border: 0px; + box-shadow: 0 2px 11px 0 #C1C1C1; } + .button-green:hover { + color: #FFF; + text-decoration: none; } + .button-green.active, .button-green.activated { + border-color: #FFF; + background-color: #606060; } + .button-green.button-clear { + border-color: transparent; + background: none; + box-shadow: none; + color: #FFF; } + .button-green.button-icon { + border-color: transparent; + background: none; } + .button-green.button-outline { + border-color: #C1C1C1; + background: transparent; + color: #C1C1C1; } + .button-green.button-outline.active, .button-green.button-outline.activated { + background-color: #C1C1C1; + box-shadow: none; + color: #fff; } + .button-white { + border-color: #C1C1C1; + background-color: #FFF; + color: #606060; + box-shadow: 0 2px 11px 0 #C1C1C1; } + .button-white:hover { + color: #606060; + text-decoration: none; } + .button-white.active, .button-white.activated { + border-color: #FFF; + background-color: #C1C1C1; } + .button-white.button-clear { + border-color: transparent; + background: none; + box-shadow: none; + color: #FFF; } + .button-white.button-icon { + border-color: transparent; + background: none; } + .button-white.button-outline { + border-color: #C1C1C1; + background: transparent; + color: #C1C1C1; } + .button-white.button-outline.active, .button-white.button-outline.activated { + background-color: #C1C1C1; + box-shadow: none; + color: #fff; } + .button-white.activated { + color: #FFF; } .button-clear { background: none !important; } @@ -10197,6 +10260,22 @@ textarea.d-block { display: block; width: 100%; } +qrcode { + position: relative; } + qrcode.qr-overlay::before { + content: ""; + background-size: 100% 100%; + display: block; + left: 88px; + margin-top: 88px; + width: 44px; + height: 44px; + position: absolute; } + qrcode.qr-overlay--bch::before { + background-image: url("../img/qr-overlay-bch.png"); } + qrcode.qr-overlay--btc::before { + background-image: url("../img/qr-overlay-btc.png"); } + .center-block { float: none; margin: 0 auto; } @@ -10237,6 +10316,10 @@ textarea.d-block { font-weight: 700; } #tab-home .card > .item-heading .icon, #tab-home .list > .item-heading .icon, #tab-send .card > .item-heading .icon, #tab-send .list > .item-heading .icon { color: #667; } + #tab-home .card > .item-heading .subtitle, #tab-home .list > .item-heading .subtitle, #tab-send .card > .item-heading .subtitle, #tab-send .list > .item-heading .subtitle { + color: #667; + font-size: 12px; + font-weight: 300; } #view-add .item { margin-bottom: 10px; @@ -10260,349 +10343,345 @@ textarea.d-block { #view-add .bg.join { padding: 10px; } -#view-amount .recipient-label { - font-size: 14px; - padding-bottom: 0; - color: #667; } - -#view-amount .item-no-bottom-border + .item { - border-top: 0; } - -#view-amount .icon-bitpay-card { - background-image: url("../img/icon-bitpay.svg"); } - -#view-amount .icon-amazon { - background-image: url("../img/icon-amazon.svg"); } - -@media (max-width: 480px) { - #view-amount .bitcoin-address { - font-size: 13px; - padding-left: 48px; } - #view-amount .bitcoin-address .icon { - left: 8px; - font-size: 24px; } - #view-amount .bitcoin-address .big-icon-svg { - left: 5px; } - #view-amount .bitcoin-address .big-icon-svg > .bg { - width: 30px; - height: 30px; - box-shadow: none; } } - -@media (max-width: 320px) { - #view-amount .bitcoin-address > span:last-child { - margin-left: -2px; } } - -#view-amount .send-gravatar { - left: 11px; - position: absolute; - top: 10px; } - -#view-amount .amount span input { - display: inline; - width: 120px; } - -#view-amount .amount-pane-recipient { - position: absolute; - top: 95px; - bottom: 0; - width: 100%; - background-color: #fff; - padding: 0 16px; } - #view-amount .amount-pane-recipient .amount-bar { - padding: 24px 0; - font-size: 18px; } - @media (max-height: 480px) { - #view-amount .amount-pane-recipient .amount-bar { - padding: 0px; } } - @media (max-width: 320px) { - #view-amount .amount-pane-recipient .amount-bar { - padding: 0px; } } - #view-amount .amount-pane-recipient .amount-bar .title { - float: left; - padding-top: 10px; - color: #445; - font-weight: bold; } +#view-amount { + background: #494949; } + #view-amount .recipient-label { + font-size: 14px; + padding-bottom: 0; + color: #667; } + #view-amount .item-no-bottom-border + .item { + border-top: 0; } + #view-amount .icon-bitpay-card { + background-image: url("../img/icon-bitpay.svg"); } + #view-amount .icon-amazon { + background-image: url("../img/icon-amazon.svg"); } + @media (max-width: 480px) { + #view-amount .bitcoin-address { + font-size: 13px; + padding-left: 48px; } + #view-amount .bitcoin-address .icon { + left: 8px; + font-size: 24px; } + #view-amount .bitcoin-address .big-icon-svg { + left: 5px; } + #view-amount .bitcoin-address .big-icon-svg > .bg { + width: 30px; + height: 30px; + box-shadow: none; } } + @media (max-width: 320px) { + #view-amount .bitcoin-address > span:last-child { + margin-left: -2px; } } + #view-amount .send-gravatar { + left: 11px; + position: absolute; + top: 10px; } + #view-amount .amount span input { + display: inline; + width: 120px; } + #view-amount .amount-pane-recipient { + position: absolute; + top: 95px; + bottom: 0; + width: 100%; + background-color: #fff; + padding: 0 16px; } + #view-amount .amount-pane-recipient .amount-bar { + padding: 24px 0; + font-size: 18px; } @media (max-height: 480px) { - #view-amount .amount-pane-recipient .amount-bar .title { + #view-amount .amount-pane-recipient .amount-bar { padding: 0px; } } - @media (max-height: 480px) { - #view-amount .amount-pane-recipient .amount-bar { - padding-top: 3px; } } - #view-amount .amount-pane-recipient .amount { - display: flex; - flex-direction: column; - justify-content: center; - flex-grow: 1; - position: absolute; - bottom: 254px; - top: 66px; } - #view-amount .amount-pane-recipient .amount .light { - color: #9b9bab; } - @media (max-height: 480px) { - #view-amount .amount-pane-recipient .amount { - top: 45px; } } - @media (max-width: 320px) { - #view-amount .amount-pane-recipient .amount { - bottom: 276px; - top: 60px; } - #view-amount .amount-pane-recipient .amount > div { - display: inline-block; } - #view-amount .amount-pane-recipient .amount > div:first-child { - display: inherit; } } - -#view-amount .amount-pane-no-recipient { - position: absolute; - top: 0; - bottom: 0; - width: 100%; - background-color: #fff; - padding: 0 16px; } - #view-amount .amount-pane-no-recipient .amount-bar { - padding: 24px 0; - font-size: 18px; } - #view-amount .amount-pane-no-recipient .amount-bar .title { - padding-top: 10px; - color: #445; - font-weight: bold; } - #view-amount .amount-pane-no-recipient .amount-bar .title .limits { - margin-top: 10px; - color: #9b9bab; - font-size: 12px; } - #view-amount .amount-pane-no-recipient .amount-bar .title .select { - margin: 10px 1px; } - #view-amount .amount-pane-no-recipient .amount { - display: flex; - flex-direction: column; - justify-content: center; - flex-grow: 1; - position: absolute; - bottom: 254px; - top: 66px; } - #view-amount .amount-pane-no-recipient .amount .light { - color: #9b9bab; } - -#view-amount .amount { - padding-top: 10px; - padding-bottom: 10px; } - #view-amount .amount .icon-toggle { - font-size: 1.2em; - width: auto; - margin: 0.8em auto; - border: 1px solid #f2f2f2; - color: #445; - border-radius: 3px; - padding: 0 10px; - cursor: pointer; } - @media (max-height: 280px) { - #view-amount .amount .icon-toggle { - margin: 0.1em auto; } } - #view-amount .amount__editable--minimize { - font-size: 22px; } - #view-amount .amount__editable--standard { - font-size: 42px; } - @media (max-height: 480px) { - #view-amount .amount__editable--standard { - font-size: 26px; - padding-top: 10px; } } - #view-amount .amount__editable--placeholder { - color: #9b9bab; } - #view-amount .amount__number { - color: #445; } - #view-amount .amount__currency-toggle { - border: 1px solid #f2f2f2; - color: #445; - border-radius: 3px; - padding: 0 10px; - cursor: pointer; - font-size: .6em; - position: relative; - top: -3px; - line-height: 1; } - @media (max-width: 320px) { - #view-amount .amount__currency-toggle { - line-height: 30px; - height: 30px; } } - #view-amount .amount__currency-toggle-mobile { - border: 1px solid #f2f2f2; - color: #445; - border-radius: 3px; - cursor: pointer; - position: relative; - line-height: 1; } - @media (max-width: 320px) { - #view-amount .amount__currency-toggle-mobile { - line-height: 30px; - height: 30px; } } - #view-amount .amount__results--minimize { - font-size: 12px; } - #view-amount .amount__results--standard { - font-size: 18px; - padding: 10px 0; } - #view-amount .amount__results--placeholder { - color: #9b9bab; } - #view-amount .amount__result { - color: #9b9bab; - font-size: .9em; - line-height: 1; } - @media (max-height: 480px) { - #view-amount .amount__result { - margin-bottom: 0; } } - #view-amount .amount__result-equiv { - color: #667; - font-size: 1.2em; } - @media (max-height: 480px) { - #view-amount .amount__result-equiv { - margin-top: 0; - font-size: 16px; } } - -#view-amount .scroll-content { - display: flex; - flex-direction: column; } - #view-amount .scroll-content .send-amount { - flex: 1 1 auto; - display: flex; - flex-direction: column; - justify-content: center; } - #view-amount .scroll-content .send-amount .send-amount-tool { - flex: 0 1 auto; } - #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input { - text-align: center; - position: relative; - padding: 10px 30px; } - #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .text-selectable { - -webkit-user-select: text; - -moz-user-select: text; - -ms-user-select: text; - user-select: text; } - #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount input, #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount .unit, #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount .primary-amount-display { - font-size: 1.8em; } - @media (min-width: 375px) { - #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount input, #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount .unit, #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount .primary-amount-display { - font-size: 2.1em; } } - @media (min-width: 414px) { - #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount input, #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount .unit, #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount .primary-amount-display { - font-size: 2.4em; } } - #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount.long input, #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount.long .unit, #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount.long .primary-amount-display { - font-size: 1.6em; } - @media (min-width: 375px) { - #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount.long input, #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount.long .unit, #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount.long .primary-amount-display { - font-size: 1.8em; } } - @media (min-width: 414px) { - #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount.long input, #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount.long .unit, #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount.long .primary-amount-display { - font-size: 2em; } } - #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount.very-long input, #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount.very-long .unit, #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount.very-long .primary-amount-display { - font-size: 0.9em; } - @media (min-width: 375px) { - #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount.very-long input, #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount.very-long .unit, #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount.very-long .primary-amount-display { - font-size: 1.3em; } } - @media (min-width: 414px) { - #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount.very-long input, #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount.very-long .unit, #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount.very-long .primary-amount-display { - font-size: 1.4em; } } - #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount input { - border: 0; - padding: 0; - white-space: normal; - background: none; - line-height: 1; - box-sizing: content-box; - display: inline-block; - vertical-align: middle; - margin: 0; - height: 1em; - margin-right: 5px; - font-family: 'ProximaNova'; } - #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount .unit, - #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount .primary-amount-display { - display: inline-block; - vertical-align: middle; - line-height: 1em; } - #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount .unit { - font-weight: bold; } - #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount .primary-amount-display { - margin-right: 5px; - word-break: break-all; } - #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .switch-currencies { - position: absolute; - right: 0; - top: 50%; - transform: translate(0, -50%); - padding: 15px; } - #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .switch-currencies img { - width: 18px; } - #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-actions { - margin-top: 15px; - display: flex; - align-items: center; - justify-content: center; } - #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-actions .button { - flex: 1 1 auto; - line-height: 1.2em; } - #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-actions .button + .button { - margin-left: 10px; } - #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-actions .button span { - display: flex; - align-items: center; - justify-content: center; } - #view-amount .scroll-content .button.no-margin { - margin: 0; } - #view-amount .scroll-content .notification-warning { - display: block; - padding: .75rem 1.25rem; - color: #856404; - background-color: #fff3cd; - border: 1px solid #ffeeba; - line-height: 1.4em; - margin-bottom: 20px; } - #view-amount .scroll-content .keypad-container { - position: relative; } - #view-amount .scroll-content .keypad-container .keypad { - text-align: center; - font-size: 18px; - font-weight: lighter; - position: absolute; - bottom: 0; - width: 100%; - color: #667; } - @media (min-height: 667px) { - #view-amount .scroll-content .keypad-container .keypad { - font-size: 24px; } } - #view-amount .scroll-content .keypad-container .keypad .row { - padding: 0 !important; - margin: 0 !important; } - #view-amount .scroll-content .keypad-container .keypad .col { - line-height: 38px; } - @media (min-height: 667px) { - #view-amount .scroll-content .keypad-container .keypad .col { - line-height: 45px; } } - #view-amount .scroll-content .keypad-container .keypad .row:last-child .col { - padding-bottom: 10px; } - #view-amount .scroll-content .keypad-container .keypad .operator { - background-color: #f2f2f2; - font-weight: normal; - cursor: pointer; } - #view-amount .scroll-content .keypad-container .keypad .operator:active { - background-color: #9b9bab; } - #view-amount .scroll-content .keypad-container .keypad .operator-send { - font-weight: bolder; - color: #fff; - background-color: #494949; - font-size: 36px; - cursor: pointer; } - #view-amount .scroll-content .keypad-container .keypad .operator-send:active { - background-color: #eaeaea; } - #view-amount .scroll-content .keypad-container .keypad .digit { - cursor: pointer; - border-top: 1px solid #f2f2f2; - border-left: 1px solid #f2f2f2; - transition: all 0.1s ease; } - #view-amount .scroll-content .keypad-container .keypad .digit:active { - background-color: #f2f2f2; } + @media (max-width: 320px) { + #view-amount .amount-pane-recipient .amount-bar { + padding: 0px; } } + #view-amount .amount-pane-recipient .amount-bar .title { + float: left; + padding-top: 10px; + color: #445; + font-weight: bold; } + @media (max-height: 480px) { + #view-amount .amount-pane-recipient .amount-bar .title { + padding: 0px; } } @media (max-height: 480px) { - #view-amount .scroll-content .keypad-container .keypad { - font-size: 12px; } } + #view-amount .amount-pane-recipient .amount-bar { + padding-top: 3px; } } + #view-amount .amount-pane-recipient .amount { + display: flex; + flex-direction: column; + justify-content: center; + flex-grow: 1; + position: absolute; + bottom: 254px; + top: 66px; } + #view-amount .amount-pane-recipient .amount .light { + color: #9b9bab; } + @media (max-height: 480px) { + #view-amount .amount-pane-recipient .amount { + top: 45px; } } + @media (max-width: 320px) { + #view-amount .amount-pane-recipient .amount { + bottom: 276px; + top: 60px; } + #view-amount .amount-pane-recipient .amount > div { + display: inline-block; } + #view-amount .amount-pane-recipient .amount > div:first-child { + display: inherit; } } + #view-amount .amount-pane-no-recipient { + position: absolute; + top: 0; + bottom: 0; + width: 100%; + background-color: #fff; + padding: 0 16px; } + #view-amount .amount-pane-no-recipient .amount-bar { + padding: 24px 0; + font-size: 18px; } + #view-amount .amount-pane-no-recipient .amount-bar .title { + padding-top: 10px; + color: #445; + font-weight: bold; } + #view-amount .amount-pane-no-recipient .amount-bar .title .limits { + margin-top: 10px; + color: #9b9bab; + font-size: 12px; } + #view-amount .amount-pane-no-recipient .amount-bar .title .select { + margin: 10px 1px; } + #view-amount .amount-pane-no-recipient .amount { + display: flex; + flex-direction: column; + justify-content: center; + flex-grow: 1; + position: absolute; + bottom: 254px; + top: 66px; } + #view-amount .amount-pane-no-recipient .amount .light { + color: #9b9bab; } + #view-amount .amount { + padding-top: 10px; + padding-bottom: 10px; } + #view-amount .amount .icon-toggle { + font-size: 1.2em; + width: auto; + margin: 0.8em auto; + border: 1px solid #f2f2f2; + color: #445; + border-radius: 3px; + padding: 0 10px; + cursor: pointer; } + @media (max-height: 280px) { + #view-amount .amount .icon-toggle { + margin: 0.1em auto; } } + #view-amount .amount__editable--minimize { + font-size: 22px; } + #view-amount .amount__editable--standard { + font-size: 42px; } + @media (max-height: 480px) { + #view-amount .amount__editable--standard { + font-size: 26px; + padding-top: 10px; } } + #view-amount .amount__editable--placeholder { + color: #9b9bab; } + #view-amount .amount__number { + color: #445; } + #view-amount .amount__currency-toggle { + border: 1px solid #f2f2f2; + color: #445; + border-radius: 3px; + padding: 0 10px; + cursor: pointer; + font-size: .6em; + position: relative; + top: -3px; + line-height: 1; } + @media (max-width: 320px) { + #view-amount .amount__currency-toggle { + line-height: 30px; + height: 30px; } } + #view-amount .amount__currency-toggle-mobile { + border: 1px solid #f2f2f2; + color: #445; + border-radius: 3px; + cursor: pointer; + position: relative; + line-height: 1; } + @media (max-width: 320px) { + #view-amount .amount__currency-toggle-mobile { + line-height: 30px; + height: 30px; } } + #view-amount .amount__results--minimize { + font-size: 12px; } + #view-amount .amount__results--standard { + font-size: 18px; + padding: 10px 0; } + #view-amount .amount__results--placeholder { + color: #9b9bab; } + #view-amount .amount__result { + color: #9b9bab; + font-size: .9em; + line-height: 1; } + @media (max-height: 480px) { + #view-amount .amount__result { + margin-bottom: 0; } } + #view-amount .amount__result-equiv { + color: #667; + font-size: 1.2em; } + @media (max-height: 480px) { + #view-amount .amount__result-equiv { + margin-top: 0; + font-size: 16px; } } + #view-amount .scroll-content { + display: flex; + flex-direction: column; } + #view-amount .scroll-content .send-amount { + flex: 1 1 auto; + display: flex; + flex-direction: column; + justify-content: center; } + #view-amount .scroll-content .send-amount .send-amount-tool { + flex: 0 1 auto; } + #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input { + text-align: center; + position: relative; + padding: 10px 30px; } + #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .text-selectable { + -webkit-user-select: text; + -moz-user-select: text; + -ms-user-select: text; + user-select: text; } + #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount input, #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount .unit, #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount .primary-amount-display { + font-size: 1.8em; } + @media (min-width: 375px) { + #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount input, #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount .unit, #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount .primary-amount-display { + font-size: 2.1em; } } + @media (min-width: 414px) { + #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount input, #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount .unit, #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount .primary-amount-display { + font-size: 2.4em; } } + #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount.long input, #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount.long .unit, #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount.long .primary-amount-display { + font-size: 1.6em; } + @media (min-width: 375px) { + #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount.long input, #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount.long .unit, #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount.long .primary-amount-display { + font-size: 1.8em; } } + @media (min-width: 414px) { + #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount.long input, #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount.long .unit, #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount.long .primary-amount-display { + font-size: 2em; } } + #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount.very-long input, #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount.very-long .unit, #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount.very-long .primary-amount-display { + font-size: 0.9em; } + @media (min-width: 375px) { + #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount.very-long input, #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount.very-long .unit, #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount.very-long .primary-amount-display { + font-size: 1.3em; } } + @media (min-width: 414px) { + #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount.very-long input, #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount.very-long .unit, #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount.very-long .primary-amount-display { + font-size: 1.4em; } } + #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount input { + border: 0; + padding: 0; + white-space: normal; + background: none; + line-height: 1; + box-sizing: content-box; + display: inline-block; + vertical-align: middle; + margin: 0; + height: 1em; + margin-right: 5px; + font-family: 'ProximaNova'; } + #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount .unit, + #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount .primary-amount-display { + display: inline-block; + vertical-align: middle; + line-height: 1em; } + #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount .unit { + font-weight: bold; } + #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount .primary-amount-display { + margin-right: 5px; + word-break: break-all; } + #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .switch-currencies { + position: absolute; + right: 0; + top: 50%; + transform: translate(0, -50%); + padding: 15px; } + #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .switch-currencies img { + width: 18px; } + #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-actions { + margin-top: 15px; + display: flex; + align-items: center; + justify-content: center; } + #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-actions .button { + flex: 1 1 auto; + line-height: 1.2em; } + #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-actions .button + .button { + margin-left: 10px; } + #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-actions .button span { + display: flex; + align-items: center; + justify-content: center; } + #view-amount .scroll-content .button.no-margin { + margin: 0; } + #view-amount .scroll-content .notification-warning { + display: block; + padding: .75rem 1.25rem; + color: #856404; + background-color: #fff3cd; + border: 1px solid #ffeeba; + line-height: 1.4em; + margin-bottom: 20px; } + #view-amount .scroll-content .keypad-container { + position: relative; } + #view-amount .scroll-content .keypad-container .keypad { + text-align: center; + font-size: 18px; + font-weight: lighter; + position: absolute; + bottom: 0; + width: 100%; + color: #667; } + @media (min-height: 667px) { + #view-amount .scroll-content .keypad-container .keypad { + font-size: 24px; } } + #view-amount .scroll-content .keypad-container .keypad .row { + padding: 0 !important; + margin: 0 !important; } + #view-amount .scroll-content .keypad-container .keypad .col { + line-height: 38px; } + @media (min-height: 667px) { + #view-amount .scroll-content .keypad-container .keypad .col { + line-height: 45px; } } + #view-amount .scroll-content .keypad-container .keypad .row:last-child .col { + padding-bottom: 10px; } + #view-amount .scroll-content .keypad-container .keypad .operator { + background-color: #f2f2f2; + font-weight: normal; + cursor: pointer; } + #view-amount .scroll-content .keypad-container .keypad .operator:active { + background-color: #9b9bab; } + #view-amount .scroll-content .keypad-container .keypad .operator-send { + font-weight: bolder; + color: #fff; + background-color: #494949; + font-size: 36px; + cursor: pointer; } + #view-amount .scroll-content .keypad-container .keypad .operator-send:active { + background-color: #eaeaea; } + #view-amount .scroll-content .keypad-container .keypad .digit { + cursor: pointer; + border-top: 1px solid #f2f2f2; + border-left: 1px solid #f2f2f2; + transition: all 0.1s ease; } + #view-amount .scroll-content .keypad-container .keypad .digit:active { + background-color: #f2f2f2; } + @media (max-height: 480px) { + #view-amount .scroll-content .keypad-container .keypad { + font-size: 12px; } } + #view-amount ion-content { + margin-bottom: constant(safe-area-inset-bottom); + /* iOS 11.0 */ + margin-bottom: env(safe-area-inset-bottom); + /* iOS 11.2 */ } #view-confirm { - background-color: #ffffff; } + background-color: #494949; } #view-confirm .item-note { float: none; } #view-confirm .item-note .fee-rate { @@ -10622,6 +10701,13 @@ textarea.d-block { margin-top: -3px; } #view-confirm .toggle { cursor: pointer; } + #view-confirm ion-content { + background-color: #ffffff; } + #view-confirm slide-to-accept, #view-confirm slide-to-accept-success { + margin-bottom: constant(safe-area-inset-bottom); + /* iOS 11.0 */ + margin-bottom: env(safe-area-inset-bottom); + /* iOS 11.2 */ } #copayers-invitation .button-share { color: #fff; @@ -10728,6 +10814,8 @@ textarea.d-block { #tab-home .card-banner { padding: 0; } + #tab-home .card-banner svg { + margin: 40px auto 40px; } #tab-home .card-banner__img { width: 100%; display: block; } @@ -10951,123 +11039,154 @@ textarea.d-block { #cordova-plugin-qrscanner-still, #cordova-plugin-qrscanner-video-preview { background-color: #fab915 !important; } -#tab-send .input input { - width: 100%; - height: auto; } +#tab-send-header { + height: 300px; + width: 100%; } -#tab-send .input.item { - height: 55px; } +#tab-send-contacts { + height: calc(100vh - 300px - 50px - 44px); + /* screen size - button container - bottom-tab-menu - header top */ + overflow: scroll; } + #tab-send-contacts.ios { + height: calc(100vh - 300px - 50px - 44px - 18px); } -#tab-send .input i.left { - padding-left: 15px; } +#tab-send .input { + width: 100%; } + #tab-send .input input { + width: 100%; + height: 57px; + background: #FFF; + border: 1px #D9D9D9 solid; } + #tab-send .input input::placeholder { + color: #DCDCDC; } + #tab-send .input i.left { + padding-left: 15px; } + #tab-send .input i.qr { + cursor: pointer; + cursor: hand; + padding-right: 5px; } -#tab-send .input i.qr { - cursor: pointer; - cursor: hand; - padding-right: 5px; } - -#tab-send .qr-scan-icon { - cursor: pointer; - cursor: hand; - border-left: 1px solid #e4e4e4; - padding-left: 10px; } - -#tab-send .qr-icon { - line-height: 20px; } - -#tab-send .zero-state-cta { - padding-bottom: 3vh; - left: 0; } - -#tab-send .send-heading { - font-size: 14px; - font-weight: bold; - padding: 0 0 16px 0; - border: none; } - -#tab-send .send-header-wrapper { - padding: 10px; - background-color: white; - box-shadow: 0px 5px 10px 0px #cccccc; } - -#tab-send .search-wrapper { +#tab-send .send-wrapper { + padding: 18px 9px 9px 9px; background-color: #f2f2f2; border-radius: 3px; border: none; } - #tab-send .search-wrapper .svg#Bitcoin_Symbol { - width: 14px; } - #tab-send .search-wrapper .svg#Bitcoin_Symbol .st0 { - fill: #cccccc; } - #tab-send .search-wrapper.focus { - background: none; } - #tab-send .search-wrapper.focus .svg#Bitcoin_Symbol { - display: none; } - #tab-send .search-wrapper.focus .search-input { - padding-left: 30px; } - #tab-send .search-wrapper.focus .search-input:focus::-webkit-input-placeholder { - opacity: 0; } - -#tab-send .abs-v-center { - position: absolute; - top: 50%; - transform: translateY(-50%); } + #tab-send .send-wrapper:after { + display: block; + position: relative; + height: 1px; + background: #DEDEDE; + bottom: 0; + content: ''; + margin: 10px 6px 0px; } + #tab-send .send-wrapper.focus .search-input { + padding-left: 30px; } + #tab-send .send-wrapper.focus .search-input:focus::-webkit-input-placeholder { + opacity: 0; } + #tab-send .send-wrapper .buttons { + margin: auto; + margin-top: 18px; } + #tab-send .send-wrapper .buttons .button { + height: 60px; + line-height: 16px; + margin-right: 0px; + width: 95%; + max-width: none; + padding: 2px; } + #tab-send .send-wrapper .buttons .button-clipboard-paste { + margin-left: 0; } + #tab-send .send-wrapper .buttons .button-clipboard-paste .address { + display: none; } + #tab-send .send-wrapper .buttons .button-clipboard-paste .icon { + background: url(../img/icon-clipboard-paste.svg); + width: 15px; + height: 19px; + display: inline-block; + margin-bottom: 4px; } + #tab-send .send-wrapper .buttons .button-clipboard-paste.contains-address, #tab-send .send-wrapper .buttons .button-clipboard-paste.contains-content { + background: #FAB915; + color: #FFF !important; + border: 0; + box-shadow: 0 2px 11px 0 #C1C1C1; } + #tab-send .send-wrapper .buttons .button-clipboard-paste.contains-address .address, #tab-send .send-wrapper .buttons .button-clipboard-paste.contains-content .address { + display: none; } + #tab-send .send-wrapper .buttons .button-clipboard-paste.contains-address .icon, #tab-send .send-wrapper .buttons .button-clipboard-paste.contains-content .icon { + background: url(../img/icon-clipboard-paste-white.svg); } + #tab-send .send-wrapper .buttons .button-clipboard-paste.contains-address.contains-address .address, #tab-send .send-wrapper .buttons .button-clipboard-paste.contains-content.contains-address .address { + display: inline; } + #tab-send .send-wrapper .buttons .button-clipboard-paste.contains-address.contains-address .non-address, #tab-send .send-wrapper .buttons .button-clipboard-paste.contains-content.contains-address .non-address { + display: none; } + #tab-send .send-wrapper .buttons .button span { + font-size: 14px; } + #tab-send .send-wrapper .buttons .button img { + height: 16px; + width: auto; + margin: 2px 0 4px; } + #tab-send .send-wrapper .buttons .button-qr { + font-weight: bold; + max-width: none; + width: 100%; + height: 95px; + margin-top: 20px; } + #tab-send .send-wrapper .buttons .button-qr img { + vertical-align: middle; + margin-right: 12px; + width: 43px; + height: 43px; } + #tab-send .send-wrapper .buttons .button-qr span { + font-size: 19px; } #tab-send .search-input { background-color: transparent; padding-left: 30px; } -#tab-send .separator-left { - border-left: 1px solid #d9d9df; - padding-left: 10px; - height: 70%; } - -#tab-send .bitcoin-address { - border-top: none; - padding-bottom: .5rem; } - @media (max-width: 480px) { - #tab-send .bitcoin-address input { - font-size: 14px; } } - #tab-send .bitcoin-address .icon { - line-height: 31px; - padding-top: 2px; - padding-bottom: 1px; } - -#tab-send .show-more { - text-align: center; - padding: 20px; - font-size: 16px; - color: #387ef5; - font-weight: bold; } - #tab-send .sendTip { + padding-top: 5vh; text-align: center; } - #tab-send .sendTip > .item-heading { - margin-top: 10px; - background: 0 none; } - #tab-send .sendTip img { - content: url("../img/app/tab-icons/ico-send-selected.svg"); } #tab-send .sendTip .item { border-style: none; } #tab-send .sendTip > .title { font-size: 20px; - font-weight: bold; color: #445; margin: 20px 10px; } #tab-send .sendTip > .subtitle { font-size: 1rem; line-height: 1.5em; font-weight: 300; - color: #445; + color: #6F6F70; margin: 20px 1em 2.5em; } #tab-send .sendTip .big-icon-svg .bg.green { padding: 0 10px; box-shadow: none; } + #tab-send .sendTip .buttons { + margin-top: 18px; } + #tab-send .sendTip .buttons .button { + font-weight: bold; + font-size: 19px; } + #tab-send .sendTip .button-first-contact img { + height: 19px; + width: 19px; + margin-right: 6px; + vertical-align: sub; } + +#tab-send .item-heading { + line-height: 16px; + font-size: 14px; + font-weight: bold; } + #tab-send .item-heading .subtitle { + color: #B5B2B2; + font-size: 12px; + font-weight: 300; } #tab-send .list .item { + font-weight: 600; color: #444; - border-top: none; - padding-top: 1.5rem; - padding-bottom: 1.5rem; } + padding-top: 0.6rem; + padding-bottom: 0.6rem; } + #tab-send .list .item p { + font-weight: normal; } + #tab-send .list .item.item-icon-left { + padding-left: 64px; } #tab-send .list .item .big-icon-svg { left: 5px; } #tab-send .list .item .big-icon-svg > .bg { @@ -11077,7 +11196,7 @@ textarea.d-block { #tab-send .list .item:before { display: block; position: absolute; - width: 80%; + width: 100%; height: 1px; background: rgba(221, 221, 221, 0.3); top: 0; @@ -11096,6 +11215,28 @@ textarea.d-block { #tab-send .scroll { height: 100%; } +#tab-send .card.contacts { + margin: 4px 4px 16px 4px; + border-radius: 6px; + box-shadow: 0px 2px 1px 0 #C1C1C1; } + #tab-send .card.contacts .gravatar { + border-radius: 30px; + height: 40px; + width: 40px; } + +@media only screen and (min-device-width: 320px) and (max-device-width: 568px) { + #tab-send .send-wrapper .buttons .button-qr { + height: 60px; } + #tab-send .send-wrapper .buttons .button-qr span { + font-size: 16px; } + #tab-send #tab-send-header { + height: 270px; } + #tab-send #tab-send-contacts { + height: calc(100vh - 270px - 50px - 44px); + /* screen size - button container - bottom-tab-menu - header top */ } + #tab-send #tab-send-contacts.ios { + height: calc(100vh - 270px - 50px - 44px - 18px); } } + .settings .icon-bitpay { background-image: url("../img/icon-bitpay.svg"); } @@ -11604,7 +11745,8 @@ textarea.d-block { fill: white; } #walletDetails .bp-content { position: relative; - height: 100%; } + height: 100%; + height: calc(100% - env(safe-area-inset-bottom) * 2); } #walletDetails .bp-content.status-bar { margin-top: 20px; } #walletDetails .bar-header { @@ -11618,7 +11760,8 @@ textarea.d-block { background-color: inherit !important; } #walletDetails ion-content { padding-top: 0; - top: 0; } + top: 0; + margin-bottom: 16px; } #walletDetails ion-content.collapsible { margin-top: 210px; } #walletDetails ion-content .scroll { @@ -12211,7 +12354,6 @@ a.item { position: relative; height: 70px; border-color: #fab915; - background-color: #fab915; padding-top: 20px; margin-bottom: 50px; text-align: center; } @@ -13013,74 +13155,13 @@ a.item { .onboarding-illustration-backup-warning { background-image: url(../img/app/backup-warning.svg); } -#rate-card .item-heading { - font-weight: 700; } - -#rate-card .row { - border: none; } - -#rate-card .item-icon-right { - margin: 0; } - -#rate-card .feedback-flow-button { - margin-bottom: 20px; } - -#rate-card .icon-svg > img { - height: 1.8rem; - margin-bottom: 5px; } - -#send-feedback { - background-color: #ffffff; } - #send-feedback .row { - border: none; } - #send-feedback .skip { - color: rgba(255, 255, 255, 0.3); } - #send-feedback .feedback-heading { - padding-top: 20px; } - #send-feedback .feedback-title { - padding-left: 10px; - font-size: 20px; - font-weight: bold; - color: #445; } - #send-feedback .rating { - text-align: right; - padding-right: 15px; } - #send-feedback .comment { - padding: 0 20px 20px; - font-size: 1rem; - line-height: 1.5em; - font-weight: 300; - color: #445; } - #send-feedback .user-feedback { - border-top: 1px solid #f2f2f2; - border-bottom: 1px solid #f2f2f2; - padding: 20px; - width: 100%; - margin-bottom: 20px; - -webkit-appearance: none; } - #send-feedback .send-feedback-star { - height: 1rem; - margin-left: 5px; } - #send-feedback .form-fade-in { - opacity: 0; - animation-name: fadeIn; - animation-duration: .5s; - animation-fill-mode: forwards; - animation-timing-function: ease-in; } - -@keyframes fadeIn { - from { - opacity: 0; } - to { - opacity: 1; } } - -#complete { +#share-app { background-color: #fff; } - #complete .complete-layout { + #share-app .share-app-layout { display: flex; flex-direction: column; height: 100%; } - #complete .complete-layout__expand { + #share-app .share-app-layout__expand { display: flex; flex-direction: column; flex-grow: 1; @@ -13089,36 +13170,27 @@ a.item { text-align: center; opacity: 0; transition: opacity .3s; } - #complete .complete-layout__expand.fade-in { + #share-app .share-app-layout__expand.fade-in { opacity: 1; } - #complete .share-the-love-illustration { + #share-app .share-the-love-illustration { width: 5rem; margin: 1rem; } - #complete .send-feedback-illustration { - height: 16rem; - margin: 1rem; } - #complete .feedback-title { - font-size: 20px; - font-weight: bold; - color: #445; - margin: 20px 10px; - text-align: center; } - #complete .subtitle { + #share-app .subtitle { padding: 10px 30px 20px; text-align: center; color: #667; } - #complete .icon-svg > img { + #share-app .icon-svg > img { height: 16rem; width: 16rem; margin: 10px; } - #complete .socialsharing-icon { + #share-app .socialsharing-icon { display: inline-block; width: 60px; } - #complete .addressbook-icon-svg { + #share-app .addressbook-icon-svg { display: inline-block; width: 50px; height: 50px; } - #complete .share-buttons { + #share-app .share-buttons { padding: 50px 10px 30px; background-color: #f2f2f2; text-align: center; @@ -13130,7 +13202,7 @@ a.item { animation-fill-mode: forwards; animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1); animation-delay: .2s; } - #complete .share-buttons__action { + #share-app .share-buttons__action { display: inline-block; color: #667; font-size: .9rem; @@ -13148,38 +13220,6 @@ a.item { transform: translateY(0); opacity: 1; } } -#rate-app { - background-color: #ffffff; - text-align: center; } - #rate-app .skip-rating { - color: #445; - position: absolute; - top: 5px; - right: 10px; - padding: 15px; } - #rate-app .icon-svg > img { - width: 80px; - height: 80px; - margin-top: 15px; } - #rate-app .feedback-title { - font-size: 20px; - font-weight: bold; - color: #445; - margin: 80px 50px 10px; - text-align: center; } - #rate-app .share-the-love-illustration { - width: 5rem; - margin: 1rem; } - #rate-app .subtitle { - padding: 10px 30px 20px 40px; - color: #667; } - #rate-app .rate-buttons { - bottom: 0; - width: 100%; - position: absolute; - background-color: #f2f2f2; - padding: 30px 0 15px; } - action-sheet .bp-action-sheet__sheet { background: #fff; width: calc(100% + 1px); @@ -13800,7 +13840,11 @@ slide-to-accept-success { transform: translateY(5rem); opacity: 0; transition: transform 400ms ease, opacity 400ms ease; - transition-delay: 250ms; } + transition-delay: 250ms; + margin-bottom: constant(safe-area-inset-bottom); + /* iOS 11.0 */ + margin-bottom: env(safe-area-inset-bottom); + /* iOS 11.2 */ } slide-to-accept-success .slide-success__footer.reveal { -webkit-transform: translateY(0); transform: translateY(0); @@ -13858,16 +13902,16 @@ slide-to-accept-success { line-height: 30px; } #txp-details .head .amount-label .amount, #view-confirm .head .amount-label .amount { - font-size: 38px; - margin-bottom: .5rem; } - #txp-details .head .amount-label .amount > .unit, - #view-confirm .head .amount-label .amount > .unit { - font-family: "Roboto-Light"; } + font-size: 16px; + color: #9B9B9B; + font-family: "Roboto-Light"; } #txp-details .head .amount-label .alternative, #view-confirm .head .amount-label .alternative { - font-size: 16px; - font-family: "Roboto-Light"; - color: #9B9B9B; } + font-size: 38px; + margin-bottom: .5rem; } + #txp-details .head .amount-label .alternative > .unit, + #view-confirm .head .amount-label .alternative > .unit { + font-family: "Roboto-Light"; } #txp-details .item, #view-confirm .item { border-color: #EFEFEF; } @@ -14155,6 +14199,10 @@ wallet-selector .subheader { font-weight: bold; padding-bottom: 10px; border-bottom: 1px solid #EFEFEF; } + wallet-selector .subheader .subtitle { + color: #667; + font-size: 12px; + font-weight: 300; } wallet-selector .subheader .wallet-coin-logo { vertical-align: middle; margin-right: 5px; } @@ -15018,6 +15066,27 @@ log-options #check-bar .checkbox-icon { border-radius: 3px; display: inline-block; } +.amount .start, +.amount .middle, +.amount .end, +.amount .currency { + display: inline-block; } + +.amount .start { + font-size: 1em; } + +.amount .middle { + font-size: 0.7857em; + margin-left: 5px; } + +.amount .end { + font-size: 0.7857em; + margin-left: 5px; } + +.amount .currency { + font-size: 1em; + margin-left: 5px; } + /* This is for rules that don't yet have a home. * Our goal is to delete this file. Search the regex: /class=".*CLASS.*?"/ */ 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 7fb2792a1a93cc02534177f5218f7bba8cd6ee3c Mon Sep 17 00:00:00 2001 From: Sam Cheng Hung Date: Mon, 30 Jul 2018 16:56:27 +0800 Subject: [PATCH 081/256] Adds size-equal class to amount directive --- src/sass/components/amount.scss | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/sass/components/amount.scss b/src/sass/components/amount.scss index d8fe552a2..b22604181 100644 --- a/src/sass/components/amount.scss +++ b/src/sass/components/amount.scss @@ -20,6 +20,13 @@ margin-left: 5px; } + &.size-equal { + .middle, + .end { + font-size: 1em; + } + } + .currency { font-size: 1em; margin-left: 5px; From f4b0b4606781afabbbe68c5ff5dbca5c6df248bb Mon Sep 17 00:00:00 2001 From: Sam Cheng Hung Date: Mon, 30 Jul 2018 17:33:38 +0800 Subject: [PATCH 082/256] Adds size-equal and capitalizes currency text --- src/js/directives/amount.js | 13 +++++++++++-- src/sass/components/amount.scss | 1 + www/css/main.css | 7 ++++++- www/views/includes/amount.html | 4 ++++ 4 files changed, 22 insertions(+), 3 deletions(-) create mode 100644 www/views/includes/amount.html diff --git a/src/js/directives/amount.js b/src/js/directives/amount.js index bf519c0d0..98d6ac59f 100644 --- a/src/js/directives/amount.js +++ b/src/js/directives/amount.js @@ -2,7 +2,13 @@ /** * @desc amount directive that can be used to display formatted financial values - * @example + * size-equal attribute is optional, defaults to false. + * @example fee = { + * value: 12.49382901, + * currency: 'BCH' + * } + * @example + * @example */ angular.module('bitcoincom.directives') .directive('amount', [ @@ -12,10 +18,13 @@ angular.module('bitcoincom.directives') restrict: 'E', scope: { value: '=', - currency: '=' + currency: '=', + sizeEqual: '=' }, templateUrl: 'views/includes/amount.html', controller: ['$scope', function($scope) { + if (typeof $scope.sizeEqual != 'undefined') $scope.sizeEqual = false; + var decimalPlaces = { '0': ['BIF', 'CLP', 'DJF', 'GNF', 'ILS', 'JPY', 'KMF', 'KRW', 'MGA', 'PYG', 'RWF', 'UGX', 'VND', 'VUV', 'XAF', 'XOF', 'XPF'], '3': ['BHD', 'IQD', 'JOD', 'KWD', 'OMR', 'TND'], diff --git a/src/sass/components/amount.scss b/src/sass/components/amount.scss index b22604181..363d38a20 100644 --- a/src/sass/components/amount.scss +++ b/src/sass/components/amount.scss @@ -30,5 +30,6 @@ .currency { font-size: 1em; margin-left: 5px; + text-transform: uppercase; } } \ No newline at end of file diff --git a/www/css/main.css b/www/css/main.css index d30a89142..1798f4b98 100644 --- a/www/css/main.css +++ b/www/css/main.css @@ -15083,9 +15083,14 @@ log-options #check-bar .checkbox-icon { font-size: 0.7857em; margin-left: 5px; } +.amount.size-equal .middle, +.amount.size-equal .end { + font-size: 1em; } + .amount .currency { font-size: 1em; - margin-left: 5px; } + margin-left: 5px; + text-transform: uppercase; } /* This is for rules that don't yet have a home. * Our goal is to delete this file. Search the regex: /class=".*CLASS.*?"/ diff --git a/www/views/includes/amount.html b/www/views/includes/amount.html new file mode 100644 index 000000000..4cf2807ad --- /dev/null +++ b/www/views/includes/amount.html @@ -0,0 +1,4 @@ +
+ {{start}}{{middle}}{{end}}{{currency}} +
\ No newline at end of file From 5c4890fac48c60f6428e3acc73bcc96fdf6873f4 Mon Sep 17 00:00:00 2001 From: Sam Cheng Hung Date: Mon, 30 Jul 2018 17:34:20 +0800 Subject: [PATCH 083/256] Removes amount directive template --- www/views/includes/amount.html | 3 --- 1 file changed, 3 deletions(-) delete mode 100644 www/views/includes/amount.html diff --git a/www/views/includes/amount.html b/www/views/includes/amount.html deleted file mode 100644 index 5d006fe46..000000000 --- a/www/views/includes/amount.html +++ /dev/null @@ -1,3 +0,0 @@ -
- {{start}}{{middle}}{{end}}{{currency}} -
\ No newline at end of file From da536a3f5b035fe7524f96825bf4957f08a4422f Mon Sep 17 00:00:00 2001 From: Sam Cheng Hung Date: Mon, 30 Jul 2018 17:45:26 +0800 Subject: [PATCH 084/256] Fixes default value of size-equal --- src/js/directives/amount.js | 2 +- www/views/tab-home.html | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/src/js/directives/amount.js b/src/js/directives/amount.js index 98d6ac59f..a23069157 100644 --- a/src/js/directives/amount.js +++ b/src/js/directives/amount.js @@ -23,7 +23,7 @@ angular.module('bitcoincom.directives') }, templateUrl: 'views/includes/amount.html', controller: ['$scope', function($scope) { - if (typeof $scope.sizeEqual != 'undefined') $scope.sizeEqual = false; + if (typeof $scope.sizeEqual == 'undefined') $scope.sizeEqual = false; var decimalPlaces = { '0': ['BIF', 'CLP', 'DJF', 'GNF', 'ILS', 'JPY', 'KMF', 'KRW', 'MGA', 'PYG', 'RWF', 'UGX', 'VND', 'VUV', 'XAF', 'XOF', 'XPF'], diff --git a/www/views/tab-home.html b/www/views/tab-home.html index 8df176a56..459618996 100644 --- a/www/views/tab-home.html +++ b/www/views/tab-home.html @@ -22,6 +22,21 @@
+
+ + + +
+
From 51bd97012173e0487a11a3224a6100bf648b5897 Mon Sep 17 00:00:00 2001 From: Sam Cheng Hung Date: Mon, 30 Jul 2018 17:46:00 +0800 Subject: [PATCH 085/256] Merges amount directive From e0ef42b09a23ec7fe098a009dce87c244b2ac645 Mon Sep 17 00:00:00 2001 From: Sam Cheng Hung Date: Mon, 30 Jul 2018 17:47:05 +0800 Subject: [PATCH 086/256] Removes dummy text --- www/views/tab-home.html | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/www/views/tab-home.html b/www/views/tab-home.html index 459618996..8df176a56 100644 --- a/www/views/tab-home.html +++ b/www/views/tab-home.html @@ -22,21 +22,6 @@
-
- - - -
-
From 734153ec5b76cd4f8a5c130d4e534bbdcf62ba72 Mon Sep 17 00:00:00 2001 From: Sebastiaan Pasma Date: Mon, 30 Jul 2018 15:17:15 +0200 Subject: [PATCH 087/256] 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 088/256] 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 @@
From 0fdd478ae4969e8258e53f70c6d7810dcfd3e0bc Mon Sep 17 00:00:00 2001 From: Brendon Duncan Date: Tue, 31 Jul 2018 12:47:03 +1200 Subject: [PATCH 089/256] Fixed up bold fonts. --- src/sass/views/amountNew.scss | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/sass/views/amountNew.scss b/src/sass/views/amountNew.scss index 0e1d183b6..c0ce94c7a 100644 --- a/src/sass/views/amountNew.scss +++ b/src/sass/views/amountNew.scss @@ -273,7 +273,7 @@ .primary-amount { color: #333; - font-family: 'ProximaNova-Semibold'; + font-weight: bold; input, .unit, .primary-amount-display { font-size: 1.8em; @@ -537,11 +537,12 @@ .button-primary { background-color: $v-primary-color; border-radius: 0; - font-family: 'ProximaNova-Semibold'; + font-weight: bold; } .button-primary[disabled] { background-color: $v-button-primary-disabled-bg; + opacity: 1; } } From 71a31ce39954c1ec1d245f612ec0420196a5a649 Mon Sep 17 00:00:00 2001 From: Brendon Duncan Date: Tue, 31 Jul 2018 13:25:56 +1200 Subject: [PATCH 090/256] Available funds now accurately reflects the primary currency choice. --- src/js/controllers/amount.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/js/controllers/amount.js b/src/js/controllers/amount.js index 3cf93b4c9..070dc5e9b 100644 --- a/src/js/controllers/amount.js +++ b/src/js/controllers/amount.js @@ -671,21 +671,21 @@ function amountController(configService, $filter, $ionicHistory, $ionicModal, $i }; function updateAvailableFundsStringIfNeeded() { - console.log('updateAvailableFundsStringIfNeeded()'); if (vm.fromWalletId && availableSatoshis !== null) { - console.log('updating'); availableFundsInFiat = ''; vm.availableFunds = availableFundsInCrypto; var coin = availableUnits[altUnitIndex].isFiat ? availableUnits[unitIndex].id : availableUnits[altUnitIndex].id; txFormatService.formatAlternativeStr(coin, availableSatoshis, function formatCallback(formatted){ - console.log('txFormatService returned'); if (formatted) { availableFundsInFiat = formatted; - if (availableUnits[unitIndex].isFiat) { - vm.availableFunds = availableFundsInFiat; - } else { - vm.availableFunds = availableFundsInCrypto; - } + + $scope.$apply(function() { + if (availableUnits[unitIndex].isFiat) { + vm.availableFunds = availableFundsInFiat; + } else { + vm.availableFunds = availableFundsInCrypto; + } + }); } }); } From 2353109adfbacad28f9ab8f1e0c1e158dd4b75e4 Mon Sep 17 00:00:00 2001 From: Brendon Duncan Date: Tue, 31 Jul 2018 17:59:26 +1200 Subject: [PATCH 091/256] Bugfix for font for insufficient funds warning. --- src/sass/views/amountNew.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sass/views/amountNew.scss b/src/sass/views/amountNew.scss index c0ce94c7a..8c8e771f7 100644 --- a/src/sass/views/amountNew.scss +++ b/src/sass/views/amountNew.scss @@ -249,7 +249,7 @@ min-height: 20px; .warning { - font-family: 'ProximaNova-Semibold'; + font-weight: bold; font-size: 12px; padding: 0 6px 6px 6px; text-align: center; From 778cbfbab0a9877be520b05226f093a8edf12a66 Mon Sep 17 00:00:00 2001 From: Brendon Duncan Date: Tue, 31 Jul 2018 19:16:11 +1200 Subject: [PATCH 092/256] Should have been part of merge for amount directive. --- src/sass/main.scss | 1 + 1 file changed, 1 insertion(+) diff --git a/src/sass/main.scss b/src/sass/main.scss index 7b3e46291..516656449 100644 --- a/src/sass/main.scss +++ b/src/sass/main.scss @@ -9,4 +9,5 @@ @import "mixins/mixins"; @import "views/views"; @import "directives/directives"; +@import "components/components"; @import "shame"; From 5a0c1417d47b1e38f8a479254e07a69caa29c903 Mon Sep 17 00:00:00 2001 From: Sam Cheng Hung Date: Tue, 31 Jul 2018 15:44:59 +0800 Subject: [PATCH 093/256] Prevents reassignment of bound attribute size-equal --- src/js/directives/amount.js | 2 +- www/views/includes/amount.html | 2 +- www/views/tab-home.html | 6 ++++++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/js/directives/amount.js b/src/js/directives/amount.js index a23069157..f991f0a28 100644 --- a/src/js/directives/amount.js +++ b/src/js/directives/amount.js @@ -23,7 +23,7 @@ angular.module('bitcoincom.directives') }, templateUrl: 'views/includes/amount.html', controller: ['$scope', function($scope) { - if (typeof $scope.sizeEqual == 'undefined') $scope.sizeEqual = false; + $scope.displaySizeEqual = typeof $scope.sizeEqual == 'undefined' ? false : true; var decimalPlaces = { '0': ['BIF', 'CLP', 'DJF', 'GNF', 'ILS', 'JPY', 'KMF', 'KRW', 'MGA', 'PYG', 'RWF', 'UGX', 'VND', 'VUV', 'XAF', 'XOF', 'XPF'], diff --git a/www/views/includes/amount.html b/www/views/includes/amount.html index 4cf2807ad..361dededc 100644 --- a/www/views/includes/amount.html +++ b/www/views/includes/amount.html @@ -1,4 +1,4 @@
+ ng-class="{ 'size-equal': displaySizeEqual }"> {{start}}{{middle}}{{end}}{{currency}}
\ No newline at end of file diff --git a/www/views/tab-home.html b/www/views/tab-home.html index 8df176a56..77ecbfefe 100644 --- a/www/views/tab-home.html +++ b/www/views/tab-home.html @@ -21,6 +21,12 @@ Download
+
+ +
From 8dc1e060481e01d92f319bf66ac948b342273ff2 Mon Sep 17 00:00:00 2001 From: Sam Cheng Hung Date: Tue, 31 Jul 2018 15:46:12 +0800 Subject: [PATCH 094/256] Removes dummy values on home tab --- www/views/tab-home.html | 6 ------ 1 file changed, 6 deletions(-) diff --git a/www/views/tab-home.html b/www/views/tab-home.html index 77ecbfefe..8df176a56 100644 --- a/www/views/tab-home.html +++ b/www/views/tab-home.html @@ -21,12 +21,6 @@ Download
-
- -
From 02f7bcc2812f323fcf39363328e8f77c2d7a4087 Mon Sep 17 00:00:00 2001 From: Brendon Duncan Date: Tue, 31 Jul 2018 20:18:27 +1200 Subject: [PATCH 095/256] Not using amount directive. Removed safety area below All Available Funds button. --- src/js/controllers/amount.js | 49 ++++++++++++++++++----------------- src/sass/views/amountNew.scss | 1 - www/views/amountNew.html | 4 +-- 3 files changed, 27 insertions(+), 27 deletions(-) diff --git a/src/js/controllers/amount.js b/src/js/controllers/amount.js index 070dc5e9b..c50a949a0 100644 --- a/src/js/controllers/amount.js +++ b/src/js/controllers/amount.js @@ -9,13 +9,14 @@ function amountController(configService, $filter, $ionicHistory, $ionicModal, $i vm.altCurrencyList = []; vm.alternativeAmount = ''; vm.alternativeUnit = ''; - vm.amountModel = { amount: 0 }; + vm.amount = '0'; vm.availableFunds = ''; vm.fromWalletId = ''; // Use insufficient for logic, as when the amount is invalid, funds being // either sufficent or insufficient doesn't make sense. vm.fundsAreInsufficient = false; vm.globalResult = ''; + vm.hello = 'hi'; vm.isRequestingSpecificAmount = false; vm.listComplete = false; vm.lastUsedPopularList = []; @@ -77,9 +78,9 @@ function amountController(configService, $filter, $ionicHistory, $ionicModal, $i } function onBeforeEnter(event, data) { - + initCurrencies(); - + vm.hello = 'greetings'; if (data.stateParams.shapeshiftOrderId && data.stateParams.shapeshiftOrderId.length > 0) { vm.minShapeshiftAmount = parseFloat(data.stateParams.minShapeshiftAmount); vm.maxShapeshiftAmount = parseFloat(data.stateParams.maxShapeshiftAmount); @@ -159,7 +160,7 @@ function amountController(configService, $filter, $ionicHistory, $ionicModal, $i // in SAT ALWAYS if ($stateParams.toAmount) { - vm.amountModel.amount = (($stateParams.toAmount) * satToUnit).toFixed(unitDecimals); + vm.amount = (($stateParams.toAmount) * satToUnit).toFixed(unitDecimals); } processAmount(); @@ -271,7 +272,7 @@ function amountController(configService, $filter, $ionicHistory, $ionicModal, $i } function paste(value) { - vm.amountModel.amount = value; + vm.amount = value; processAmount(); $timeout(function() { $scope.$apply(); @@ -299,7 +300,7 @@ function amountController(configService, $filter, $ionicHistory, $ionicModal, $i function changeUnit() { - vm.amountModel.amount = '0'; + vm.amount = '0'; if (fixedUnit) return; @@ -321,32 +322,32 @@ function amountController(configService, $filter, $ionicHistory, $ionicModal, $i }; function pushDigit(digit) { - if (vm.amountModel.amount && digit != '.') { - var amountSplitByComma = vm.amountModel.amount.split('.'); + if (vm.amount && digit != '.') { + var amountSplitByComma = vm.amount.split('.'); if (amountSplitByComma.length > 1 && amountSplitByComma[1].length >= LENGTH_AFTER_COMMA_EXPRESSION_LIMIT) return; if (amountSplitByComma.length == 1 && amountSplitByComma[0].length >= LENGTH_BEFORE_COMMA_EXPRESSION_LIMIT) return; } - if (vm.amountModel.amount && vm.amountModel.amount.length >= LENGTH_EXPRESSION_LIMIT) return; - if (vm.amountModel.amount.indexOf('.') > -1 && digit == '.') return; - if (vm.amountModel.amount == '0' && digit == '0') return; - if (availableUnits[unitIndex].isFiat && vm.amountModel.amount.indexOf('.') > -1 && vm.amountModel.amount[vm.amountModel.amount.indexOf('.') + 2]) return; + if (vm.amount && vm.amount.length >= LENGTH_EXPRESSION_LIMIT) return; + if (vm.amount.indexOf('.') > -1 && digit == '.') return; + if (vm.amount == '0' && digit == '0') return; + if (availableUnits[unitIndex].isFiat && vm.amount.indexOf('.') > -1 && vm.amount[vm.amount.indexOf('.') + 2]) return; - if (vm.amountModel.amount == '0' && digit != '.') { - vm.amountModel.amount = ''; + if (vm.amount == '0' && digit != '.') { + vm.amount = ''; } - if (vm.amountModel.amount == '' && digit == '.') { - vm.amountModel.amount = '0'; + if (vm.amount == '' && digit == '.') { + vm.amount = '0'; } - vm.amountModel.amount = (vm.amountModel.amount + digit).replace('..', '.'); + vm.amount = (vm.amount + digit).replace('..', '.'); processAmount(); }; function pushOperator(operator) { - if (!vm.amountModel.amount || vm.amountModel.amount.length == 0) return; - vm.amountModel.amount = pushOperator(vm.amountModel.amount); + if (!vm.amount || vm.amount.length == 0) return; + vm.amount = pushOperator(vm.amount); function pushOperator(val) { if (!isOperator(lodash.last(val))) { @@ -368,12 +369,12 @@ function amountController(configService, $filter, $ionicHistory, $ionicModal, $i }; function removeDigit() { - vm.amountModel.amount = (vm.amountModel.amount).toString().slice(0, -1); + vm.amount = (vm.amount).toString().slice(0, -1); processAmount(); } function resetAmount() { - vm.amountModel.amount = vm.alternativeAmount = vm.globalResult = ''; + vm.amount = vm.alternativeAmount = vm.globalResult = '0'; vm.allowSend = false; } @@ -393,11 +394,11 @@ function amountController(configService, $filter, $ionicHistory, $ionicModal, $i }; function processAmount() { - var formatedValue = format(vm.amountModel.amount); + var formatedValue = format(vm.amount); var result = evaluate(formatedValue); if (lodash.isNumber(result)) { - vm.globalResult = isExpression(vm.amountModel.amount) ? '= ' + processResult(result) : ''; + vm.globalResult = isExpression(vm.amount) ? '= ' + processResult(result) : ''; if (availableUnits[unitIndex].isFiat) { @@ -481,7 +482,7 @@ function amountController(configService, $filter, $ionicHistory, $ionicModal, $i function finish() { var unit = availableUnits[unitIndex]; - var _amount = evaluate(format(vm.amountModel.amount)); + var _amount = evaluate(format(vm.amount)); var coin = unit.id; if (unit.isFiat) { coin = availableUnits[altUnitIndex].id; diff --git a/src/sass/views/amountNew.scss b/src/sass/views/amountNew.scss index 8c8e771f7..24338fe99 100644 --- a/src/sass/views/amountNew.scss +++ b/src/sass/views/amountNew.scss @@ -462,7 +462,6 @@ border-radius: 0; font-size: 0.8em; line-height: 2em; - margin-bottom: 1.618em; width: 100%; .available-funds-amount { diff --git a/www/views/amountNew.html b/www/views/amountNew.html index b67757f5e..e0296219a 100644 --- a/www/views/amountNew.html +++ b/www/views/amountNew.html @@ -19,8 +19,8 @@
- {{ vm.amountModel.amount || 0 }}{{vm.unit}} + ng-class="{long: vm.amount.length > 5, 'very-long': vm.amount.length > 10}"> + {{vm.amount}} {{vm.unit}}
{{vm.globalResult}} {{vm.unit}}
From 1895e0dbeb3fbee50bb2e7141d1d2b26edabd260 Mon Sep 17 00:00:00 2001 From: Sam Cheng Hung Date: Tue, 31 Jul 2018 16:23:45 +0800 Subject: [PATCH 096/256] Adds watcher for changes to value or currency scope variables --- src/js/directives/amount.js | 65 ++++++++++++++++++++----------------- 1 file changed, 36 insertions(+), 29 deletions(-) diff --git a/src/js/directives/amount.js b/src/js/directives/amount.js index f991f0a28..9622ca09d 100644 --- a/src/js/directives/amount.js +++ b/src/js/directives/amount.js @@ -48,37 +48,44 @@ angular.module('bitcoincom.directives') return '2'; }; - switch (getDecimalPlaces($scope.currency)) { - case '0': - var valueFormatted = numberWithCommas(Math.round(parseFloat($scope.value))); - buildAmount(valueFormatted, '', ''); - break; - - case '2': - var valueProcessing = parseFloat(parseFloat($scope.value).toFixed(2)); - var valueFormatted = numberWithCommas(valueProcessing); - buildAmount(valueFormatted, '', ''); - break; - - case '3': - var valueProcessing = parseFloat(parseFloat($scope.value).toFixed(3)); - var valueFormatted = numberWithCommas(valueProcessing); - buildAmount(valueFormatted, '', ''); - break; - - case '8': - var valueFormatted = parseFloat($scope.value).toFixed(8); - if (parseFloat($scope.value) == 0) { - buildAmount('0', '', ''); - } else { + var formatNumbers = function(currency, value) { + switch (getDecimalPlaces(currency)) { + case '0': + var valueFormatted = numberWithCommas(Math.round(parseFloat(value))); buildAmount(valueFormatted, '', ''); - var start = numberWithCommas(valueFormatted.slice(0, -5)); - var middle = valueFormatted.slice(-5, -2); - var end = valueFormatted.substr(valueFormatted.length - 2); - buildAmount(start, middle, end); - } - break; + break; + + case '2': + var valueProcessing = parseFloat(parseFloat(value).toFixed(2)); + var valueFormatted = numberWithCommas(valueProcessing); + buildAmount(valueFormatted, '', ''); + break; + + case '3': + var valueProcessing = parseFloat(parseFloat(value).toFixed(3)); + var valueFormatted = numberWithCommas(valueProcessing); + buildAmount(valueFormatted, '', ''); + break; + + case '8': + var valueFormatted = parseFloat(value).toFixed(8); + if (parseFloat(value) == 0) { + buildAmount('0', '', ''); + } else { + buildAmount(valueFormatted, '', ''); + var start = numberWithCommas(valueFormatted.slice(0, -5)); + var middle = valueFormatted.slice(-5, -2); + var end = valueFormatted.substr(valueFormatted.length - 2); + buildAmount(start, middle, end); + } + break; + } } + + formatNumbers($scope.currency, $scope.value); + $scope.$watchGroup(['currency', 'value'], function() { + formatNumbers($scope.currency, $scope.value); + }); }] }; } From 0cba978d6539574e9a75098b6a94b2c596e36462 Mon Sep 17 00:00:00 2001 From: Brendon Duncan Date: Tue, 31 Jul 2018 20:25:21 +1200 Subject: [PATCH 097/256] Replaced old amount screen. --- src/js/routes.js | 4 +- src/sass/views/amount.scss | 158 +++++++--- src/sass/views/amountNew.scss | 557 ---------------------------------- src/sass/views/views.scss | 1 - www/views/amount.html | 63 ++-- www/views/amountNew.html | 102 ------- 6 files changed, 158 insertions(+), 727 deletions(-) delete mode 100644 src/sass/views/amountNew.scss delete mode 100644 www/views/amountNew.html diff --git a/src/js/routes.js b/src/js/routes.js index 5b0b59d77..286b27ab1 100644 --- a/src/js/routes.js +++ b/src/js/routes.js @@ -292,7 +292,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr 'tab-send@tabs': { controller: 'amountController', controllerAs: 'vm', - templateUrl: 'views/amountNew.html' + templateUrl: 'views/amount.html' } } }) @@ -701,7 +701,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr 'tab-receive@tabs': { controller: 'amountController', controllerAs: 'vm', - templateUrl: 'views/amountNew.html' + templateUrl: 'views/amount.html' } } }) diff --git a/src/sass/views/amount.scss b/src/sass/views/amount.scss index c712d85e5..daf6cf4fe 100644 --- a/src/sass/views/amount.scss +++ b/src/sass/views/amount.scss @@ -244,6 +244,18 @@ flex-direction: column; justify-content: center; + .send-amount-header-footer { + flex: 1 1 auto; + min-height: 20px; + + .warning { + font-weight: bold; + font-size: 12px; + padding: 0 6px 6px 6px; + text-align: center; + } + } + .send-amount-tool { flex: 0 1 auto; @@ -260,6 +272,8 @@ } .primary-amount { + color: #333; + font-weight: bold; input, .unit, .primary-amount-display { font-size: 1.8em; @@ -329,16 +343,15 @@ line-height: 1em; } - .unit { - font-weight: bold; - } - .primary-amount-display { margin-right: 5px; word-break: break-all; } } + .alternative-amount { + color: #6F6F70; + } .switch-currencies { position: absolute; right: 0; @@ -351,27 +364,56 @@ } } } + } + } - .send-amount-actions { - margin-top: 15px; + .send-amount-extras { + display: flex; + flex: 0 0 auto; + /* So that if only one item is present, it appears on the right. */ + flex-direction: row-reverse; + font-size: 12px; + align-items: center; + justify-content: space-between; + margin: 0 14px; + + .available-funds { + color: #6F6F70; + } + + .warning { + color: $v-warning-color-2; + } + + .extra, + button.extra { + /*display: flex;*/ + flex: 0 1 auto; + } + + button.extra { + background: none; + border: none; + color: #000; + font-family: 'ProximaNova'; + font-size: 14px; + line-height: normal; + min-height: auto; + min-width: auto; + padding: 0; + } + + .button .icon:before { + font-size: 14px; + line-height: normal; + } + + + .button { + span { display: flex; align-items: center; justify-content: center; - - .button { - flex: 1 1 auto; - line-height: 1.2em; - - + .button { - margin-left: 10px; - } - - span { - display: flex; - align-items: center; - justify-content: center; - } - } } } } @@ -394,37 +436,58 @@ .keypad-container { position: relative; + font-size: 18px; + line-height: 2em; //flex: 0 1 196px; + @media (min-height: 667px) { + font-size: 24px; + } + + @media(max-height: 480px) { + font-size: 12px; + } + @media (min-height: 667px) { //flex: 0 1 224px; } + .sendmax { + background: $v-off-black; + + .button { + color: white; + background: black; + border: 1px solid $v-off-black; + border-radius: 0; + font-size: 0.8em; + line-height: 2em; + width: 100%; + + .available-funds-amount { + color: #C9C9C9; + } + + &:active { + background-color: $v-dark-gray; + } + } + } + .keypad { text-align: center; - font-size: 18px; font-weight: lighter; position: absolute; bottom: 0; width: 100%; - color: $v-mid-gray; + color: $v-text-primary-color; + - @media (min-height: 667px) { - font-size: 24px; - } .row { padding: 0 !important; margin: 0 !important; } - - .col { - line-height: 38px; - - @media (min-height: 667px) { - line-height: 45px; - } - } .row { &:last-child { @@ -458,23 +521,34 @@ .digit{ cursor: pointer; - border-top: 1px solid $v-subtle-gray; - border-left: 1px solid $v-subtle-gray; + background-color: #000; + border: 1px solid $v-off-black; transition: all 0.1s ease; &:active { - background-color: $v-subtle-gray; + background-color: $v-dark-gray; } } - @media(max-height: 480px) { - font-size: 12px; - - } } } + + .button-primary { + background-color: $v-primary-color; + border-radius: 0; + font-weight: bold; + } + + .button-primary[disabled] { + background-color: $v-button-primary-disabled-bg; + opacity: 1; + } } - background: #494949; + + .warning { + color: $v-warning-color-2; + } + background: $v-background-under-card; ion-content { margin-bottom: constant(safe-area-inset-bottom); /* iOS 11.0 */ diff --git a/src/sass/views/amountNew.scss b/src/sass/views/amountNew.scss deleted file mode 100644 index 24338fe99..000000000 --- a/src/sass/views/amountNew.scss +++ /dev/null @@ -1,557 +0,0 @@ -#view-amount-new { - @extend .deflash-blue; - .recipient-label { - font-size: 14px; - padding-bottom: 0; - color: $v-mid-gray; - } - .item-no-bottom-border + .item { - border-top: 0; - } - .icon-bitpay-card { - background-image: url("../img/icon-bitpay.svg"); - } - .icon-amazon { - background-image: url("../img/icon-amazon.svg"); - } - @media(max-width: 480px) { - .bitcoin-address { - .icon { - left: 8px; - font-size: 24px; - } - .big-icon-svg { - left:5px; - & > .bg{ - width:30px; - height:30px; - box-shadow: none; - } - } - font-size: 13px; - padding-left: 48px; - } - } - @media(max-width: 320px) { - .bitcoin-address { - & > span:last-child { - margin-left: -2px; - } - } - } - .send-gravatar { - left: 11px; - position: absolute; - top: 10px; - } - .amount span input { - display: inline; - width: 120px; - } - .amount-pane-recipient { - position: absolute; - top: 95px; - bottom: 0; - width: 100%; - background-color: #fff; - padding: 0 16px; - - .amount-bar { - padding: 24px 0; - font-size: 18px; - @media(max-height: 480px) { - padding: 0px; - } - @media(max-width: 320px) { - padding: 0px; - } - .title { - float: left; - padding-top: 10px; - color: $v-dark-gray; - font-weight: bold; - @media(max-height: 480px) { - padding: 0px; - } - } - @media(max-height: 480px) { - padding-top: 3px; - } - } - .amount { - display: flex; - flex-direction: column; - justify-content: center; - flex-grow: 1; - position: absolute; - bottom: 254px; - top: 66px; - .light { - color: $v-light-gray; - } - @media(max-height: 480px) { - top: 45px; - } - @media(max-width: 320px) { - bottom: 276px; - top: 60px; - & > div { - display: inline-block; - } - & > div:first-child { - display: inherit; - } - } - } - } - .amount-pane-no-recipient { - position: absolute; - top: 0; - bottom: 0; - width: 100%; - background-color: #fff; - padding: 0 16px; - - .amount-bar { - padding: 24px 0; - font-size: 18px; - .title { - padding-top: 10px; - color: $v-dark-gray; - font-weight: bold; - .limits { - margin-top: 10px; - color: $v-light-gray; - font-size: 12px; - } - .select { - margin: 10px 1px; - } - } - } - .amount { - display: flex; - flex-direction: column; - justify-content: center; - flex-grow: 1; - position: absolute; - bottom: 254px; - top: 66px; - .light { - color: $v-light-gray; - } - } - } - .amount { - padding-top: 10px; - padding-bottom: 10px; - .icon-toggle { - font-size: 1.2em; - width: auto; - margin: 0.8em auto; - border: 1px solid $v-subtle-gray; - color: $v-dark-gray; - border-radius: 3px; - padding: 0 10px; - cursor: pointer; - @media(max-height: 280px) { - margin: 0.1em auto; - } - } - &__editable { - &--minimize { - font-size: 22px; - } - &--standard { - font-size: 42px; - @media(max-height: 480px) { - font-size: 26px; - padding-top: 10px; - } - } - &--placeholder { - color: $v-light-gray; - } - } - &__number { - color: $v-dark-gray; - } - &__currency-toggle { - border: 1px solid $v-subtle-gray; - color: $v-dark-gray; - border-radius: 3px; - padding: 0 10px; - cursor: pointer; - font-size: .6em; - position: relative; - top: -3px; - line-height: 1; - @media(max-width: 320px) { - line-height: 30px; - height: 30px; - } - } - &__currency-toggle-mobile { - border: 1px solid $v-subtle-gray; - color: $v-dark-gray; - border-radius: 3px; - cursor: pointer; - position: relative; - line-height: 1; - @media(max-width: 320px) { - line-height: 30px; - height: 30px; - } - } - &__results { - &--minimize { - font-size: 12px; - } - &--standard { - font-size: 18px; - padding: 10px 0; - } - &--placeholder { - color: $v-light-gray; - } - } - &__result { - color: $v-light-gray; - font-size: .9em; - //margin-bottom: -.9em; TODO matias - line-height: 1; - @media(max-height: 480px) { - margin-bottom: 0; - } - } - &__result-equiv { - color: $v-mid-gray; - font-size: 1.2em; - @media(max-height: 480px) { - margin-top: 0; - font-size: 16px; - } - } - } - - .scroll-content { - display: flex; - flex-direction: column; - - .send-amount { - flex: 1 1 auto; - display: flex; - flex-direction: column; - justify-content: center; - - .send-amount-header-footer { - flex: 1 1 auto; - min-height: 20px; - - .warning { - font-weight: bold; - font-size: 12px; - padding: 0 6px 6px 6px; - text-align: center; - } - } - - .send-amount-tool { - flex: 0 1 auto; - - .send-amount-tool-input { - text-align: center; - position: relative; - padding: 10px 30px; - - .text-selectable { - -webkit-user-select: text; - -moz-user-select: text; - -ms-user-select: text; - user-select: text; - } - - .primary-amount { - color: #333; - font-weight: bold; - input, .unit, .primary-amount-display { - font-size: 1.8em; - - @media (min-width: 375px) { - font-size: 2.1em; - } - - @media (min-width: 414px) { - font-size: 2.4em; - } - } - - &.long { - input, .unit, .primary-amount-display { - font-size: 1.6em; - - @media (min-width: 375px) { - font-size: 1.8em; - } - - @media (min-width: 414px) { - font-size: 2em; - } - } - } - - &.very-long { - input, .unit, .primary-amount-display { - font-size: 0.9em; - - @media (min-width: 375px) { - font-size: 1.3em; - } - - @media (min-width: 414px) { - font-size: 1.4em; - } - } - } - - - input { - border:0; - padding:0; - white-space:normal; - background:none; - line-height:1; - box-sizing:content-box; - display: inline-block; - vertical-align: middle; - margin: 0; - height: 1em; - margin-right: 5px; - font-family: 'ProximaNova'; - - @media (min-width: 375px) { - } - - @media (min-width: 414px) { - } - } - - .unit, - .primary-amount-display { - display: inline-block; - vertical-align: middle; - line-height: 1em; - } - - .primary-amount-display { - margin-right: 5px; - word-break: break-all; - } - } - - .alternative-amount { - color: #6F6F70; - } - .switch-currencies { - position: absolute; - right: 0; - top: 50%; - transform: translate(0, -50%); - padding: 15px; - - img { - width: 18px; - } - } - } - } - } - - .send-amount-extras { - display: flex; - flex: 0 0 auto; - /* So that if only one item is present, it appears on the right. */ - flex-direction: row-reverse; - font-size: 12px; - align-items: center; - justify-content: space-between; - margin: 0 14px; - - .available-funds { - color: #6F6F70; - } - - .warning { - color: $v-warning-color-2; - } - - .extra, - button.extra { - /*display: flex;*/ - flex: 0 1 auto; - } - - button.extra { - background: none; - border: none; - color: #000; - font-family: 'ProximaNova'; - font-size: 14px; - line-height: normal; - min-height: auto; - min-width: auto; - padding: 0; - } - - .button .icon:before { - font-size: 14px; - line-height: normal; - } - - - .button { - span { - display: flex; - align-items: center; - justify-content: center; - } - } - } - - .button { - &.no-margin { - margin: 0; - } - } - - .notification-warning { - display: block; - padding: .75rem 1.25rem; - color: #856404; - background-color: #fff3cd; - border: 1px solid #ffeeba; - line-height: 1.4em; - margin-bottom: 20px; - } - - .keypad-container { - position: relative; - font-size: 18px; - line-height: 2em; - //flex: 0 1 196px; - - @media (min-height: 667px) { - font-size: 24px; - } - - @media(max-height: 480px) { - font-size: 12px; - } - - @media (min-height: 667px) { - //flex: 0 1 224px; - } - - .sendmax { - background: $v-off-black; - - .button { - color: white; - background: black; - border: 1px solid $v-off-black; - border-radius: 0; - font-size: 0.8em; - line-height: 2em; - width: 100%; - - .available-funds-amount { - color: #C9C9C9; - } - - &:active { - background-color: $v-dark-gray; - } - } - } - - .keypad { - text-align: center; - font-weight: lighter; - position: absolute; - bottom: 0; - width: 100%; - color: $v-text-primary-color; - - - - .row { - padding: 0 !important; - margin: 0 !important; - } - - .row { - &:last-child { - .col { - padding-bottom: 10px; - } - } - } - - .operator { - background-color: $v-subtle-gray; - font-weight: normal; - cursor: pointer; - - &:active { - background-color: $v-light-gray; - } - } - - .operator-send { - font-weight: bolder; - color: #fff; - background-color: $positive; - font-size: 36px; - cursor: pointer; - - &:active { - background-color: #eaeaea; - } - } - - .digit{ - cursor: pointer; - background-color: #000; - border: 1px solid $v-off-black; - transition: all 0.1s ease; - - &:active { - background-color: $v-dark-gray; - } - } - - } - } - - .button-primary { - background-color: $v-primary-color; - border-radius: 0; - font-weight: bold; - } - - .button-primary[disabled] { - background-color: $v-button-primary-disabled-bg; - opacity: 1; - } - } - - .warning { - color: $v-warning-color-2; - } - background: $v-background-under-card; - - ion-content { - margin-bottom: constant(safe-area-inset-bottom); /* iOS 11.0 */ - margin-bottom: env(safe-area-inset-bottom); /* iOS 11.2 */ - } -} \ No newline at end of file diff --git a/src/sass/views/views.scss b/src/sass/views/views.scss index 387b68597..d4ed735ed 100644 --- a/src/sass/views/views.scss +++ b/src/sass/views/views.scss @@ -1,7 +1,6 @@ @import "tabs"; @import "add"; @import "amount"; -@import "amountNew"; @import "confirm"; @import "copayers"; @import "starting"; diff --git a/www/views/amount.html b/www/views/amount.html index 90187ef59..77c52f96c 100644 --- a/www/views/amount.html +++ b/www/views/amount.html @@ -1,24 +1,26 @@ - {{'Enter amount' | translate}} + {{'Enter Amount' | translate}} - +
-
-
- Minimum amount: {{vm.minShapeshiftAmount}}
- Maximum amount: {{vm.maxShapeshiftAmount}}
+
+
- {{ vm.amountModel.amount || 0 }}{{vm.unit}} + ng-class="{long: vm.amount.length > 5, 'very-long': vm.amount.length > 10}"> + {{vm.amount}} {{vm.unit}}
{{vm.globalResult}} {{vm.unit}}
@@ -26,26 +28,41 @@
-
- - + -
+
+
+ +
+ +
+ Available Funds:{{vm.availableFunds}} +
-
+
+ +
+ +
7
diff --git a/www/views/amountNew.html b/www/views/amountNew.html deleted file mode 100644 index e0296219a..000000000 --- a/www/views/amountNew.html +++ /dev/null @@ -1,102 +0,0 @@ - - - - {{'Enter Amount' | translate}} - - - - - -
- -
- -
-
-
- {{vm.amount}} {{vm.unit}} -
- {{vm.globalResult}} {{vm.unit}} -
- {{vm.alternativeAmount || '0.00'}} {{vm.alternativeUnit}} -
-
-
- -
-
- -
- -
- Available Funds:{{vm.availableFunds}} -
-
-
- -
-
- -
- -
- -
-
7
-
8
-
9
-
- -
-
4
-
5
-
6
-
- -
-
1
-
2
-
3
-
- -
-
.
-
0
-
-
-
-
- - -
-
\ No newline at end of file From 281b969fc325f97e7ed287086960338fbc1ada07 Mon Sep 17 00:00:00 2001 From: Sebastiaan Pasma Date: Tue, 31 Jul 2018 15:03:20 +0200 Subject: [PATCH 098/256] Shapeshift refactor / Empty case / CSS --- i18n/po/template.pot | 4 + src/js/controllers/shapeshift.js | 102 +++++---- ...troller.js => walletSelectorController.js} | 2 +- src/js/routes.js | 6 +- src/sass/mixins/layout.scss | 39 ++++ src/sass/views/shapeshift.scss | 14 ++ src/sass/views/tab-send.scss | 37 +--- src/sass/views/views.scss | 1 + www/views/shapeshift.html | 206 ++++++++++-------- 9 files changed, 230 insertions(+), 181 deletions(-) rename src/js/controllers/{sendFlowController.js => walletSelectorController.js} (94%) create mode 100644 src/sass/views/shapeshift.scss diff --git a/i18n/po/template.pot b/i18n/po/template.pot index df01cecec..10656ae42 100644 --- a/i18n/po/template.pot +++ b/i18n/po/template.pot @@ -3112,6 +3112,10 @@ msgstr "" msgid "Top up {{amountStr}} to debit card ({{cardLastNumber}})" msgstr "" +#: www/views/shapeshift.html:30 +msgid "Start ShapeShift" +msgstr "" + #: www/views/buyAmazon.html:61 #: www/views/buyMercadoLibre.html:60 #: www/views/modals/wallet-balance.html:23 diff --git a/src/js/controllers/shapeshift.js b/src/js/controllers/shapeshift.js index 5bc815d19..8e991c5b4 100644 --- a/src/js/controllers/shapeshift.js +++ b/src/js/controllers/shapeshift.js @@ -1,10 +1,6 @@ 'use strict'; -angular.module('copayApp.controllers').controller('shapeshiftController', function($scope, $interval, profileService, walletService, popupService, lodash, $ionicNavBarDelegate) { - var vm = this; - - //vm.buyBitcion = buyBitcoin; - +angular.module('copayApp.controllers').controller('shapeshiftController', function($scope, $state, $interval, profileService, walletService, popupService, lodash, $ionicNavBarDelegate) { var walletsBtc = []; var walletsBch = []; @@ -19,59 +15,51 @@ angular.module('copayApp.controllers').controller('shapeshiftController', functi } function showToWallets() { - $scope.toWallets = $scope.fromWallet.coin == 'btc' ? walletsBch : walletsBtc; + $scope.toWallets = $scope.fromWallet.coin === 'btc' ? walletsBch : walletsBtc; $scope.onToWalletSelect($scope.toWallets[0]); - $scope.singleToWallet = $scope.toWallets.length == 1; + $scope.singleToWallet = $scope.toWallets.length === 1; } - function buyBitcoin() { - console.log('buyBitcoin()'); - } - - $scope.buyBitcoin = buyBitcoin; - - $scope.onFromWalletSelect = function(wallet) { - $scope.fromWallet = wallet; - showToWallets(); - generateAddress(wallet, function(addr) { - $scope.fromWalletAddress = addr; - }); - }; - - $scope.onToWalletSelect = function(wallet) { - $scope.toWallet = wallet; - generateAddress(wallet, function(addr) { - $scope.toWalletAddress = addr; - }); - } + // $scope.onFromWalletSelect = function(wallet) { + // $scope.fromWallet = wallet; + // showToWallets(); + // generateAddress(wallet, function(addr) { + // $scope.fromWalletAddress = addr; + // }); + // }; + // + // $scope.onToWalletSelect = function(wallet) { + // $scope.toWallet = wallet; + // generateAddress(wallet, function(addr) { + // $scope.toWalletAddress = addr; + // }); + // }; $scope.$on("$ionicView.beforeEnter", function(event, data) { - console.log('beforeEnter()'); walletsBtc = profileService.getWallets({coin: 'btc'}); walletsBch = profileService.getWallets({coin: 'bch'}); $scope.fromWallets = lodash.filter(walletsBtc.concat(walletsBch), function(w) { return w.status.balance.availableAmount > 0; }); - console.log('Checking wallets.'); - if ($scope.fromWallets.length == 0) { - // Need to go to new origin screen here, with parameters - var params = { - thirdParty: { - id: 'shapeshift' - } - }; - console.log('Asking for transition'); - $state.transitionTo('tabs.send', params); - return - } - $scope.onFromWalletSelect($scope.fromWallets[0]); - $scope.onToWalletSelect($scope.toWallets[0]); - $scope.singleFromWallet = $scope.fromWallets.length == 1; - $scope.singleToWallet = $scope.toWallets.length == 1; + + if ($scope.fromWallets.length === 0) { + // return + // } else { + // $scope.onFromWalletSelect($scope.fromWallets[0]); + } + + // $scope.onToWalletSelect($scope.toWallets[0]); + + $scope.singleFromWallet = $scope.fromWallets.length === 1; + // $scope.singleToWallet = $scope.toWallets.length == 1; $scope.fromWalletSelectorTitle = 'From'; $scope.toWalletSelectorTitle = 'To'; $scope.showFromWallets = false; $scope.showToWallets = false; + $scope.walletsWithFunds = profileService.getWallets({onlyComplete: true, hasFunds: true}); + console.log($scope.walletsWithFunds); + $scope.wallets = profileService.getWallets({onlyComplete: true}); + $scope.hasWallets = !lodash.isEmpty($scope.wallets); }); $scope.$on("$ionicView.enter", function(event, data) { @@ -80,9 +68,33 @@ angular.module('copayApp.controllers').controller('shapeshiftController', functi $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() { + $state.go('tabs.add.create-personal'); + }); + }; + + $scope.buyBitcoin = function() { + $state.go('tabs.home').then(function() { + $state.go('tabs.buyandsell'); + }); + }; + + $scope.shapeshift = function() { + var params = { + thirdParty: { + id: 'shapeshift' + } + }; + $state.go('tabs.home').then(function() { + $state.transitionTo('tabs.send', params); + }); } }); diff --git a/src/js/controllers/sendFlowController.js b/src/js/controllers/walletSelectorController.js similarity index 94% rename from src/js/controllers/sendFlowController.js rename to src/js/controllers/walletSelectorController.js index a6965bd96..7f5519452 100644 --- a/src/js/controllers/sendFlowController.js +++ b/src/js/controllers/walletSelectorController.js @@ -1,6 +1,6 @@ 'use strict'; -angular.module('copayApp.controllers').controller('sendFlowController', function($scope, $rootScope, $state, $stateParams, $log, $ionicHistory, configService, gettextCatalog, profileService) { +angular.module('copayApp.controllers').controller('walletSelectorController', function($scope, $rootScope, $state, $stateParams, $log, $ionicHistory, configService, gettextCatalog, profileService) { $scope.$on("$ionicView.beforeEnter", function(event, data) { var config = configService.getSync().wallet.settings; diff --git a/src/js/routes.js b/src/js/routes.js index 0fa92750e..f7641b545 100644 --- a/src/js/routes.js +++ b/src/js/routes.js @@ -299,7 +299,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr url: '/wallet-to-wallet', views: { 'tab-send@tabs': { - controller: 'sendFlowController', + controller: 'walletSelectorController', templateUrl: 'views/wallet-origin-destination.html' } } @@ -308,7 +308,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr url: '/origin/:thirdParty/:amount/:toAddress/:toWalletId/:coin', views: { 'tab-send@tabs': { - controller: 'sendFlowController', + controller: 'walletSelectorController', templateUrl: 'views/wallet-origin-destination.html', } } @@ -317,7 +317,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr url: '/destination/:thirdParty/:amount/:fromWalletId', views: { 'tab-send@tabs': { - controller: 'sendFlowController', + controller: 'walletSelectorController', templateUrl: 'views/wallet-origin-destination.html', } } diff --git a/src/sass/mixins/layout.scss b/src/sass/mixins/layout.scss index b03d53800..e03a735fa 100644 --- a/src/sass/mixins/layout.scss +++ b/src/sass/mixins/layout.scss @@ -18,3 +18,42 @@ .absolute-center{ @include absolute-center(); } + +@mixin empty-case() { + padding-top: 5vh; + text-align: center; + .item { + border-style: none; + } + & > .title { + font-size: 20px; + color: $v-dark-gray; + margin: 20px 10px; + } + & > .subtitle { + font-size: 1rem; + line-height: 1.5em; + font-weight: 300; + color: #6F6F70; + margin: 20px 1em 2.5em; + } + .big-icon-svg { + .bg.green { + padding: 0 10px; + box-shadow: none; + } + } + .buttons { + margin-top: 18px; + .button { + font-weight: bold; + font-size: 19px; + } + } + .button-first-contact img { + height: 19px; + width: 19px; + margin-right: 6px; + vertical-align: sub; + } +} \ No newline at end of file diff --git a/src/sass/views/shapeshift.scss b/src/sass/views/shapeshift.scss new file mode 100644 index 000000000..8b4b941ab --- /dev/null +++ b/src/sass/views/shapeshift.scss @@ -0,0 +1,14 @@ +#shapeshift { + .empty-case { + @include empty-case(); + } + .button-shapeshift { + @extend %button-standard; + + @include button-style(#243F5D, #FFF, #606060, #FFF, #FFF); + @include button-clear(#FFF); + @include button-outline(#C1C1C1); + border: 0px; + @include button-shadow(); + } +} \ No newline at end of file diff --git a/src/sass/views/tab-send.scss b/src/sass/views/tab-send.scss index a4025156f..4fbe8e531 100644 --- a/src/sass/views/tab-send.scss +++ b/src/sass/views/tab-send.scss @@ -133,42 +133,7 @@ padding-left: 30px; } .sendTip { - padding-top: 5vh; - text-align: center; - .item { - border-style: none; - } - & > .title { - font-size: 20px; - color: $v-dark-gray; - margin: 20px 10px; - } - & > .subtitle { - font-size: 1rem; - line-height: 1.5em; - font-weight: 300; - color: #6F6F70; - margin: 20px 1em 2.5em; - } - .big-icon-svg { - .bg.green { - padding: 0 10px; - box-shadow: none; - } - } - .buttons { - margin-top: 18px; - .button { - font-weight: bold; - font-size: 19px; - } - } - .button-first-contact img { - height: 19px; - width: 19px; - margin-right: 6px; - vertical-align: sub; - } + @include empty-case(); } .item-heading { line-height: 16px; diff --git a/src/sass/views/views.scss b/src/sass/views/views.scss index e1a122dbb..700a45b62 100644 --- a/src/sass/views/views.scss +++ b/src/sass/views/views.scss @@ -14,6 +14,7 @@ @import "walletBalance"; @import "walletDetails"; @import "advancedSettings"; +@import "shapeshift"; @import "bitpayCard"; @import "bitpayCardIntro"; @import "buyandsell"; diff --git a/www/views/shapeshift.html b/www/views/shapeshift.html index 48664ebba..6a0a0e4e2 100644 --- a/www/views/shapeshift.html +++ b/www/views/shapeshift.html @@ -1,4 +1,4 @@ - + {{'Shapeshift'|translate}} @@ -10,107 +10,121 @@
-
-
- No available wallets to convert between. - - +
+
+ Your Bitcoin wallet is empty +
+
+
+

Before exchanging your BTC to BCH, you will need to add funds to your wallet.

+

You can receive Bitcoin from any wallet or service.

+
+
+

Using Shapeshift will allow you to exchange your BTC for BCH.

+

The process is fast and you will receive the exchanged amount in your wallet.

+
+
To get started, you'll need to create a bitcoin wallet and get some bitcoin.
+
+ + + +
- - + + + + + + + + + + + + + + - - -
- - - - - -
+ + + + + + + + + + + + + + + + + + + + + + + + + - - + + + + + + + + - - - + + + + + + + + + From 42d77903e1dd02fe66d10bba16bc1dd2e433a14f Mon Sep 17 00:00:00 2001 From: Sebastiaan Pasma Date: Tue, 31 Jul 2018 17:21:56 +0200 Subject: [PATCH 099/256] Third Party Service integration (Shapeshift) (CSS + translations + wallet selector + routes) --- i18n/po/template.pot | 4 + src/js/controllers/shapeshift.js | 31 +--- .../controllers/walletSelectorController.js | 29 +++- src/js/routes.js | 8 +- src/js/services/incomingData.js | 33 ++-- src/sass/mixins/layout.scss | 11 ++ www/views/header-thirdparty.html | 3 + www/views/shapeshift.html | 148 +++++++++--------- ...n-destination.html => walletSelector.html} | 5 +- 9 files changed, 143 insertions(+), 129 deletions(-) create mode 100644 www/views/header-thirdparty.html rename www/views/{wallet-origin-destination.html => walletSelector.html} (90%) diff --git a/i18n/po/template.pot b/i18n/po/template.pot index 10656ae42..4a53f4b7b 100644 --- a/i18n/po/template.pot +++ b/i18n/po/template.pot @@ -3116,6 +3116,10 @@ msgstr "" msgid "Start ShapeShift" msgstr "" +#: www/views/shapeshift.html:34 +msgid "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." +msgstr "" + #: www/views/buyAmazon.html:61 #: www/views/buyMercadoLibre.html:60 #: www/views/modals/wallet-balance.html:23 diff --git a/src/js/controllers/shapeshift.js b/src/js/controllers/shapeshift.js index 8e991c5b4..ade7afb5b 100644 --- a/src/js/controllers/shapeshift.js +++ b/src/js/controllers/shapeshift.js @@ -20,21 +20,6 @@ angular.module('copayApp.controllers').controller('shapeshiftController', functi $scope.singleToWallet = $scope.toWallets.length === 1; } - // $scope.onFromWalletSelect = function(wallet) { - // $scope.fromWallet = wallet; - // showToWallets(); - // generateAddress(wallet, function(addr) { - // $scope.fromWalletAddress = addr; - // }); - // }; - // - // $scope.onToWalletSelect = function(wallet) { - // $scope.toWallet = wallet; - // generateAddress(wallet, function(addr) { - // $scope.toWalletAddress = addr; - // }); - // }; - $scope.$on("$ionicView.beforeEnter", function(event, data) { walletsBtc = profileService.getWallets({coin: 'btc'}); walletsBch = profileService.getWallets({coin: 'bch'}); @@ -42,22 +27,12 @@ angular.module('copayApp.controllers').controller('shapeshiftController', functi return w.status.balance.availableAmount > 0; }); - if ($scope.fromWallets.length === 0) { - // return - // } else { - // $scope.onFromWalletSelect($scope.fromWallets[0]); - } - - // $scope.onToWalletSelect($scope.toWallets[0]); - $scope.singleFromWallet = $scope.fromWallets.length === 1; - // $scope.singleToWallet = $scope.toWallets.length == 1; $scope.fromWalletSelectorTitle = 'From'; $scope.toWalletSelectorTitle = 'To'; $scope.showFromWallets = false; $scope.showToWallets = false; $scope.walletsWithFunds = profileService.getWallets({onlyComplete: true, hasFunds: true}); - console.log($scope.walletsWithFunds); $scope.wallets = profileService.getWallets({onlyComplete: true}); $scope.hasWallets = !lodash.isEmpty($scope.wallets); }); @@ -89,12 +64,10 @@ angular.module('copayApp.controllers').controller('shapeshiftController', functi $scope.shapeshift = function() { var params = { - thirdParty: { - id: 'shapeshift' - } + thirdParty: JSON.stringify({id: 'shapeshift'}) }; $state.go('tabs.home').then(function() { - $state.transitionTo('tabs.send', params); + $state.transitionTo('tabs.send.origin', params); }); } }); diff --git a/src/js/controllers/walletSelectorController.js b/src/js/controllers/walletSelectorController.js index 7f5519452..4f0533084 100644 --- a/src/js/controllers/walletSelectorController.js +++ b/src/js/controllers/walletSelectorController.js @@ -1,16 +1,16 @@ 'use strict'; -angular.module('copayApp.controllers').controller('walletSelectorController', function($scope, $rootScope, $state, $stateParams, $log, $ionicHistory, configService, gettextCatalog, profileService) { +angular.module('copayApp.controllers').controller('walletSelectorController', function($scope, $rootScope, $state, $log, $ionicHistory, configService, gettextCatalog, profileService) { $scope.$on("$ionicView.beforeEnter", function(event, data) { var config = configService.getSync().wallet.settings; - $scope.sendFlowTitle = ""; + $scope.sendFlowTitle = ""; if ($state.current.name === 'tabs.send.wallet-to-wallet') { $scope.sendFlowTitle = gettextCatalog.getString('Wallet to Wallet Transfer'); } - $scope.params = $stateParams; + $scope.params = $state.params; $scope.coin = false; // Wallets to show (for destination screen or contacts) $scope.type = data.stateParams && data.stateParams['fromWalletId'] ? 'destination' : 'origin'; // origin || destination @@ -21,14 +21,11 @@ angular.module('copayApp.controllers').controller('walletSelectorController', fu if ($scope.params.amount) { // There is an amount, so presume that it a payment request $scope.sendFlowTitle = gettextCatalog.getString('Payment request'); $scope.specificAmount = $scope.specificAlternativeAmount = ''; - $scope.requestAmount = (($stateParams.amount) * (1 / config.unitToSatoshi)).toFixed(config.unitDecimals); + $scope.requestAmount = (($state.params.amount) * (1 / config.unitToSatoshi)).toFixed(config.unitDecimals); $scope.isPaymentRequest = true; } if ($scope.params.thirdParty) { - // Third Party Service - if ($scope.params.thirdParty.id === 'shapeshift') { - - } + $scope.thirdParty = JSON.parse($scope.params.thirdParty); // Parse stringified JSON-object } }); @@ -48,6 +45,19 @@ angular.module('copayApp.controllers').controller('walletSelectorController', fu $scope.headerTitle = gettextCatalog.getString('Choose a wallet to send to'); } + if ($scope.thirdParty) { + + // Third party services specific logic + + if ($scope.thirdParty.id === 'shapeshift' && $scope.type === 'destination') { // Shapeshift wants to know the + if ($scope.coin === 'bch') { + $scope.coin = 'btc'; + } else { + $scope.coin = 'bch'; + } + } + } + if (!$scope.coin || $scope.coin === 'bch') { // if no specific coin is set or coin is set to bch $scope.walletsBch = profileService.getWallets({coin: 'bch', hasFunds: $scope.type==='origin'}); } @@ -57,6 +67,9 @@ angular.module('copayApp.controllers').controller('walletSelectorController', fu }); function getNextStep() { + if ($scope.thirdParty) { + $scope.params.thirdParty = JSON.stringify($scope.thirdParty) // re-stringify JSON-object + } if (!$scope.params.toWalletId && !$scope.params.toAddress) { // If we have no toAddress or fromWallet return 'tabs.send.destination'; } else if (!$scope.params.amount) { // If we have no amount diff --git a/src/js/routes.js b/src/js/routes.js index f7641b545..54f481783 100644 --- a/src/js/routes.js +++ b/src/js/routes.js @@ -300,7 +300,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr views: { 'tab-send@tabs': { controller: 'walletSelectorController', - templateUrl: 'views/wallet-origin-destination.html' + templateUrl: 'views/walletSelector.html' } } }) @@ -309,7 +309,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr views: { 'tab-send@tabs': { controller: 'walletSelectorController', - templateUrl: 'views/wallet-origin-destination.html', + templateUrl: 'views/walletSelector.html', } } }) @@ -318,7 +318,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr views: { 'tab-send@tabs': { controller: 'walletSelectorController', - templateUrl: 'views/wallet-origin-destination.html', + templateUrl: 'views/walletSelector.html', } } }) @@ -995,7 +995,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr /* Shapeshift */ .state('tabs.shapeshift', { - url: '/shapeshift', + url: '/shapeshift/:fromWalletId/:toWalletId', views: { 'tab-home@tabs': { controller: 'shapeshiftController', diff --git a/src/js/services/incomingData.js b/src/js/services/incomingData.js index e12cc2255..7a9e67fe7 100644 --- a/src/js/services/incomingData.js +++ b/src/js/services/incomingData.js @@ -8,7 +8,7 @@ angular.module('copayApp.services').factory('incomingData', function($log, $stat $rootScope.$broadcast('incomingDataMenu.showMenu', data); }; - root.redir = function(data, shapeshiftData) { + root.redir = function(data, serviceId, serviceData) { var originalAddress = null; var noPrefixInAddress = 0; @@ -75,7 +75,7 @@ angular.module('copayApp.services').factory('incomingData', function($log, $stat return true; } - function goSend(addr, amount, message, coin, shapeshiftData) { + function goSend(addr, amount, message, coin, serviceId, serviceData) { $state.go('tabs.send', {}, { 'reload': true, 'notify': $state.current.name == 'tabs.send' ? false : true @@ -97,11 +97,18 @@ angular.module('copayApp.services').factory('incomingData', function($log, $stat displayAddress: originalAddress ? originalAddress : addr, noPrefix: noPrefixInAddress }; - if (shapeshiftData) { - params['fromWalletId'] = shapeshiftData.fromWalletId; - params['minShapeshiftAmount'] = shapeshiftData.minAmount; - params['maxShapeshiftAmount'] = shapeshiftData.maxAmount; - params['shapeshiftOrderId'] = shapeshiftData.orderId; + if (serviceId) { + if (!params['thirdParty']) { + params['thirdParty'] = []; + } + params['thirdParty']['id'] = serviceId; + } + + if (serviceData) { + params['thirdParty']['data'] = serviceData; + // params['thirdParty']['minShapeshiftAmount'] = serviceData.minAmount; + // params['thirdParty']['maxShapeshiftAmount'] = serviceData.maxAmount; + // params['thirdParty']['shapeshiftOrderId'] = serviceData.orderId; $state.transitionTo('tabs.send.amount', params); } else { $state.transitionTo('tabs.send.origin', params); @@ -148,12 +155,12 @@ angular.module('copayApp.services').factory('incomingData', function($log, $stat if (parsed.r) { payproService.getPayProDetails(parsed.r, coin, function(err, details) { if (err) { - if (addr && amount) goSend(addr, amount, message, coin, shapeshiftData); + if (addr && amount) goSend(addr, amount, message, coin, serviceId, serviceData); else popupService.showAlert(gettextCatalog.getString('Error'), err); } else handlePayPro(details, coin); }); } else { - goSend(addr, amount, message, coin, shapeshiftData); + goSend(addr, amount, message, coin, serviceId, serviceData); } return true; // Cash URI @@ -171,14 +178,14 @@ angular.module('copayApp.services').factory('incomingData', function($log, $stat payproService.getPayProDetails(parsed.r, coin, function(err, details) { if (err) { if (addr && amount) - goSend(addr, amount, message, coin, shapeshiftData); + goSend(addr, amount, message, coin, serviceId, serviceData); else popupService.showAlert(gettextCatalog.getString('Error'), err); } handlePayPro(details, coin); }); } else { - goSend(addr, amount, message, coin, shapeshiftData); + goSend(addr, amount, message, coin, serviceId, serviceData); } return true; @@ -214,14 +221,14 @@ angular.module('copayApp.services').factory('incomingData', function($log, $stat payproService.getPayProDetails(parsed.r, coin, function(err, details) { if (err) { if (addr && amount) - goSend(addr, amount, message, coin, shapeshiftData); + goSend(addr, amount, message, coin, serviceId, serviceData); else popupService.showAlert(gettextCatalog.getString('Error'), err); } handlePayPro(details, coin); }); } else { - goSend(addr, amount, message, coin, shapeshiftData); + goSend(addr, amount, message, coin, serviceId, serviceData); } } ); diff --git a/src/sass/mixins/layout.scss b/src/sass/mixins/layout.scss index e03a735fa..269a50320 100644 --- a/src/sass/mixins/layout.scss +++ b/src/sass/mixins/layout.scss @@ -19,6 +19,17 @@ @include absolute-center(); } +.third-party-notice { + font-size: 12px; + margin: 0px 14px; + font-weight: 600; + color: #6F6F70; + + @media (min-width: 768px) { + text-align: center; + } +} + @mixin empty-case() { padding-top: 5vh; text-align: center; diff --git a/www/views/header-thirdparty.html b/www/views/header-thirdparty.html new file mode 100644 index 000000000..7a6750a22 --- /dev/null +++ b/www/views/header-thirdparty.html @@ -0,0 +1,3 @@ +
+ +
\ No newline at end of file diff --git a/www/views/shapeshift.html b/www/views/shapeshift.html index 6a0a0e4e2..9f5a98423 100644 --- a/www/views/shapeshift.html +++ b/www/views/shapeshift.html @@ -31,83 +31,85 @@
- - - - - - - - - - - - - +
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.
- - - - - - - - - - + +
+ + + +
+ + + + + + diff --git a/www/views/wallet-origin-destination.html b/www/views/walletSelector.html similarity index 90% rename from www/views/wallet-origin-destination.html rename to www/views/walletSelector.html index 4bdbde22b..a4cc4db81 100644 --- a/www/views/wallet-origin-destination.html +++ b/www/views/walletSelector.html @@ -4,6 +4,7 @@ +
Paying
$... USD
@@ -14,7 +15,7 @@ {{headerTitle}}
-
+
Bitcoin Cash (BCH)
Instant transactions with low fees
@@ -35,7 +36,7 @@ From f3a350f6645ddcdfd03b2f926e8af2b67dd93110 Mon Sep 17 00:00:00 2001 From: Brendon Duncan Date: Wed, 1 Aug 2018 11:33:24 +1200 Subject: [PATCH 100/256] Redirecting to new Review screen when sending max. --- src/js/controllers/amount.js | 2 +- src/js/controllers/review.controller.js | 9 +++++++++ src/js/controllers/review.js | 5 ----- src/js/routes.js | 1 + 4 files changed, 11 insertions(+), 6 deletions(-) create mode 100644 src/js/controllers/review.controller.js delete mode 100644 src/js/controllers/review.js diff --git a/src/js/controllers/amount.js b/src/js/controllers/amount.js index 52695e829..399acde49 100644 --- a/src/js/controllers/amount.js +++ b/src/js/controllers/amount.js @@ -508,7 +508,7 @@ angular.module('copayApp.controllers').controller('amountController', function($ } } - $state.transitionTo('tabs.send.confirm', confirmData); + $state.transitionTo('tabs.send.review', confirmData); } $scope.useSendMax = null; } diff --git a/src/js/controllers/review.controller.js b/src/js/controllers/review.controller.js new file mode 100644 index 000000000..217e15b00 --- /dev/null +++ b/src/js/controllers/review.controller.js @@ -0,0 +1,9 @@ +'use strict'; + +angular + .module('copayApp.controllers') + .controller('reviewController', reviewController); + +function reviewController() { + var vm = this; +} diff --git a/src/js/controllers/review.js b/src/js/controllers/review.js deleted file mode 100644 index 1effff0ba..000000000 --- a/src/js/controllers/review.js +++ /dev/null @@ -1,5 +0,0 @@ -'use strict'; - -angular.module('copayApp.controllers').controller('reviewController', 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) { - -}); diff --git a/src/js/routes.js b/src/js/routes.js index 79b88e2f7..99513c278 100644 --- a/src/js/routes.js +++ b/src/js/routes.js @@ -321,6 +321,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr views: { 'tab-send@tabs': { controller: 'reviewController', + controllerAs: 'vm', templateUrl: 'views/review.html' } }, From 52f1e93e5b7688364a5fc7a73442731a6325c55b Mon Sep 17 00:00:00 2001 From: Brendon Duncan Date: Wed, 1 Aug 2018 11:36:25 +1200 Subject: [PATCH 101/256] Header text. --- i18n/po/template.pot | 4 ++++ www/views/review.html | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/i18n/po/template.pot b/i18n/po/template.pot index a23e5dbae..caa984046 100644 --- a/i18n/po/template.pot +++ b/i18n/po/template.pot @@ -3699,3 +3699,7 @@ msgstr "" #: www/views/includes/walletInfo.html:18 msgid "{{wallet.m}}-of-{{wallet.n}}" msgstr "" + +#: www/views/review.html:4 +msgid "Review Transaction" +msgstr "" \ No newline at end of file diff --git a/www/views/review.html b/www/views/review.html index 4995d3d25..35fb6a51a 100644 --- a/www/views/review.html +++ b/www/views/review.html @@ -1,7 +1,7 @@ - {{'Review'|translate}} + {{'Review Transaction' | translate}} From d6176e0f3ee97514017195d0a2bea83d45ae0b57 Mon Sep 17 00:00:00 2001 From: Brendon Duncan Date: Wed, 1 Aug 2018 14:28:26 +1200 Subject: [PATCH 102/256] Getting crypto value. --- src/js/controllers/review.controller.js | 46 ++++++++++++++++++++++++- src/js/routes.js | 2 +- 2 files changed, 46 insertions(+), 2 deletions(-) diff --git a/src/js/controllers/review.controller.js b/src/js/controllers/review.controller.js index 217e15b00..937790d9c 100644 --- a/src/js/controllers/review.controller.js +++ b/src/js/controllers/review.controller.js @@ -4,6 +4,50 @@ angular .module('copayApp.controllers') .controller('reviewController', reviewController); -function reviewController() { +function reviewController(configService, $log, $scope,) { var vm = this; + + vm.primaryAmount = '0'; + vm.primaryCurrency = ''; + + vm.secondaryAmount = ''; + vm.secondaryCurrency = ''; + + var config; + var amount = { + crypto: { + quantity: 0, + currency: '' + }, + fiat: null + }; + var priceDisplayIsFiat = true; + + $scope.$on("$ionicView.beforeEnter", onBeforeEnter); + + + function onBeforeEnter(event, data) { + + amount.crypto.quantity = data.stateParams.toAmount; + amount.crypto.currency = data.stateParams.coin.toUpperCase(); + console.log('cryptoAmount', cryptoAmount); + //vm.amount = cryptoAmount.toFixed(8); + console.log('vm.amount:', vm.amount); + + vm.secondaryAmount = amount.crypto.quantity; + vm.secondaryCurrency = amount.crypto.currency; + + configService.get(function onConfig(err, configCache) { + if (err) { + $log.err('Error getting config.', err); + return; + } else { + console.log('Got config.'); + config = configCache; + // Use this later if have time + priceDisplayIsFiat = config.wallet.settings.priceDisplay === 'fiat'; + } + }); + } + } diff --git a/src/js/routes.js b/src/js/routes.js index 99513c278..92193090a 100644 --- a/src/js/routes.js +++ b/src/js/routes.js @@ -317,7 +317,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr } }) .state('tabs.send.review', { - url: '/review', + url: '/review/:coin/:fromWalletId/:toAmount/:useSendMax', views: { 'tab-send@tabs': { controller: 'reviewController', From 38c3f2fb70f97f16029c1ea7482025c2d2658b49 Mon Sep 17 00:00:00 2001 From: Brendon Duncan Date: Wed, 1 Aug 2018 17:17:34 +1200 Subject: [PATCH 103/256] Displaying the amount. --- src/js/controllers/review.controller.js | 55 +++++++++++++++++++------ src/js/routes.js | 2 +- www/views/review.html | 4 +- 3 files changed, 45 insertions(+), 16 deletions(-) diff --git a/src/js/controllers/review.controller.js b/src/js/controllers/review.controller.js index 937790d9c..4995e9dc2 100644 --- a/src/js/controllers/review.controller.js +++ b/src/js/controllers/review.controller.js @@ -4,33 +4,37 @@ angular .module('copayApp.controllers') .controller('reviewController', reviewController); -function reviewController(configService, $log, $scope,) { +function reviewController(configService, $log, $scope, txFormatService) { var vm = this; - vm.primaryAmount = '0'; + vm.primaryAmount = ''; vm.primaryCurrency = ''; vm.secondaryAmount = ''; vm.secondaryCurrency = ''; - var config; - var amount = { - crypto: { - quantity: 0, - currency: '' - }, - fiat: null - }; - var priceDisplayIsFiat = true; + + var coin = ''; + //var config = null; + var satoshis = null; + + //var priceDisplayIsFiat = true; $scope.$on("$ionicView.beforeEnter", onBeforeEnter); function onBeforeEnter(event, data) { - amount.crypto.quantity = data.stateParams.toAmount; + satoshis = parseInt(data.stateParams.amount, 10); + coin = data.stateParams.coin; + + updateAmount(); + + + /* + //amount.crypto.quantity = ; amount.crypto.currency = data.stateParams.coin.toUpperCase(); - console.log('cryptoAmount', cryptoAmount); + console.log('crypto:', JSON.stringify(amount.crypto)); //vm.amount = cryptoAmount.toFixed(8); console.log('vm.amount:', vm.amount); @@ -48,6 +52,31 @@ function reviewController(configService, $log, $scope,) { priceDisplayIsFiat = config.wallet.settings.priceDisplay === 'fiat'; } }); + */ } + function updateAmount() { + if (typeof satoshis !== 'number') { + return; + } + + var amountStr = txFormatService.formatAmountStr(coin, satoshis); + var amountParts = amountStr.split(' '); + vm.primaryAmount = amountParts[0]; + vm.primaryCurrency = amountParts[1]; + txFormatService.formatAlternativeStr(coin, satoshis, function(v) { + if (!v) { + vm.secondaryAmount = ''; + vm.secondaryCurrency = ''; + return; + } + vm.secondaryAmount = vm.primaryAmount; + vm.secondaryCurrency = vm.primaryCurrency; + + var fiatParts = v.split(' '); + vm.primaryAmount = fiatParts[0]; + vm.primaryCurrency = fiatParts[1]; + }); + } + } diff --git a/src/js/routes.js b/src/js/routes.js index 92193090a..d38e0e0de 100644 --- a/src/js/routes.js +++ b/src/js/routes.js @@ -317,7 +317,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr } }) .state('tabs.send.review', { - url: '/review/:coin/:fromWalletId/:toAmount/:useSendMax', + url: '/review/:coin/:fromWalletId/:amount/:useSendMax', views: { 'tab-send@tabs': { controller: 'reviewController', diff --git a/www/views/review.html b/www/views/review.html index 35fb6a51a..ebec1581b 100644 --- a/www/views/review.html +++ b/www/views/review.html @@ -11,8 +11,8 @@ ng-init="memoExpanded = false">
-

13.98 USD

-

0.014 BCH

+

+

From 18e00e5fcadbb6243b3c00bf87e57f5f0bb56240 Mon Sep 17 00:00:00 2001 From: Sam Cheng Hung Date: Wed, 1 Aug 2018 16:59:13 +0800 Subject: [PATCH 104/256] Renames amount directive to formatted-amount, fixes formatting for crypto --- src/js/directives/amount.js | 92 ------------------ src/js/directives/formattedAmount.js | 96 +++++++++++++++++++ .../{amount.html => formatted-amount.html} | 0 3 files changed, 96 insertions(+), 92 deletions(-) delete mode 100644 src/js/directives/amount.js create mode 100644 src/js/directives/formattedAmount.js rename www/views/includes/{amount.html => formatted-amount.html} (100%) diff --git a/src/js/directives/amount.js b/src/js/directives/amount.js deleted file mode 100644 index 9622ca09d..000000000 --- a/src/js/directives/amount.js +++ /dev/null @@ -1,92 +0,0 @@ -'use strict'; - -/** - * @desc amount directive that can be used to display formatted financial values - * size-equal attribute is optional, defaults to false. - * @example fee = { - * value: 12.49382901, - * currency: 'BCH' - * } - * @example - * @example - */ -angular.module('bitcoincom.directives') - .directive('amount', [ - '$timeout', - function($timeout) { - return { - restrict: 'E', - scope: { - value: '=', - currency: '=', - sizeEqual: '=' - }, - templateUrl: 'views/includes/amount.html', - controller: ['$scope', function($scope) { - $scope.displaySizeEqual = typeof $scope.sizeEqual == 'undefined' ? false : true; - - var decimalPlaces = { - '0': ['BIF', 'CLP', 'DJF', 'GNF', 'ILS', 'JPY', 'KMF', 'KRW', 'MGA', 'PYG', 'RWF', 'UGX', 'VND', 'VUV', 'XAF', 'XOF', 'XPF'], - '3': ['BHD', 'IQD', 'JOD', 'KWD', 'OMR', 'TND'], - '8': ['BCH', 'BTC'] - }; - - var numberWithCommas = function(x) { - return parseFloat(x).toLocaleString(); - }; - - var buildAmount = function(start, middle, end) { - $scope.start = start; - $scope.middle = middle; - $scope.end = end; - }; - - var getDecimalPlaces = function(currency) { - if (decimalPlaces['0'].indexOf($scope.currency.toUpperCase()) > -1) return '0'; - if (decimalPlaces['3'].indexOf($scope.currency.toUpperCase()) > -1) return '3'; - if (decimalPlaces['8'].indexOf($scope.currency.toUpperCase()) > -1) return '8'; - return '2'; - }; - - var formatNumbers = function(currency, value) { - switch (getDecimalPlaces(currency)) { - case '0': - var valueFormatted = numberWithCommas(Math.round(parseFloat(value))); - buildAmount(valueFormatted, '', ''); - break; - - case '2': - var valueProcessing = parseFloat(parseFloat(value).toFixed(2)); - var valueFormatted = numberWithCommas(valueProcessing); - buildAmount(valueFormatted, '', ''); - break; - - case '3': - var valueProcessing = parseFloat(parseFloat(value).toFixed(3)); - var valueFormatted = numberWithCommas(valueProcessing); - buildAmount(valueFormatted, '', ''); - break; - - case '8': - var valueFormatted = parseFloat(value).toFixed(8); - if (parseFloat(value) == 0) { - buildAmount('0', '', ''); - } else { - buildAmount(valueFormatted, '', ''); - var start = numberWithCommas(valueFormatted.slice(0, -5)); - var middle = valueFormatted.slice(-5, -2); - var end = valueFormatted.substr(valueFormatted.length - 2); - buildAmount(start, middle, end); - } - break; - } - } - - formatNumbers($scope.currency, $scope.value); - $scope.$watchGroup(['currency', 'value'], function() { - formatNumbers($scope.currency, $scope.value); - }); - }] - }; - } -]); \ No newline at end of file diff --git a/src/js/directives/formattedAmount.js b/src/js/directives/formattedAmount.js new file mode 100644 index 000000000..ac74afd2b --- /dev/null +++ b/src/js/directives/formattedAmount.js @@ -0,0 +1,96 @@ +'use strict'; + +/** + * @desc amount directive that can be used to display formatted financial values + * size-equal attribute is optional, defaults to false. + * @example fee = { + * value: 12.49382901, + * currency: 'BCH' + * } + * @example + * @example + */ +angular.module('bitcoincom.directives') + .directive('formattedAmount', function(configService, uxLanguage) { + return { + restrict: 'E', + scope: { + value: '=', + currency: '=', + sizeEqual: '=' + }, + templateUrl: 'views/includes/formatted-amount.html', + controller: function($scope, $timeout) { + $scope.displaySizeEqual = !!$scope.sizeEqual; + + configService.whenAvailable(function(config) { + $timeout(function() { + var decimalPlaces = { + '0': ['BIF', 'CLP', 'DJF', 'GNF', 'ILS', 'JPY', 'KMF', 'KRW', 'MGA', 'PYG', 'RWF', 'UGX', 'VND', 'VUV', 'XAF', 'XOF', 'XPF'], + '3': ['BHD', 'IQD', 'JOD', 'KWD', 'OMR', 'TND'], + '8': ['BCH', 'BTC'] + }; + var localizeNumbers = function(x, minimumFractionDigits = 0, useGrouping = true) { + return parseFloat(x).toLocaleString(uxLanguage.getCurrentLanguage(), { + minimumFractionDigits: minimumFractionDigits, + useGrouping: useGrouping + }); + }; + + var buildAmount = function(start, middle, end) { + $scope.start = start; + $scope.middle = middle; + $scope.end = end; + }; + + var getDecimalPlaces = function(currency) { + if (decimalPlaces['0'].indexOf($scope.currency.toUpperCase()) > -1) return '0'; + if (decimalPlaces['3'].indexOf($scope.currency.toUpperCase()) > -1) return '3'; + if (decimalPlaces['8'].indexOf($scope.currency.toUpperCase()) > -1) return '8'; + return '2'; + }; + + var formatNumbers = function(currency, value) { + switch (getDecimalPlaces(currency)) { + case '0': + var valueFormatted = localizeNumbers(Math.round(parseFloat(value))); + buildAmount(valueFormatted, '', ''); + break; + + case '3': + var valueProcessing = parseFloat(parseFloat(value).toFixed(3)); + var valueFormatted = localizeNumbers(valueProcessing); + buildAmount(valueFormatted, '', ''); + break; + + case '8': + var valueFormatted = parseFloat(value).toFixed(8); + if (parseFloat(value) == 0) { + buildAmount('0', '', ''); + } else { + var valueFormatted = localizeNumbers(valueFormatted, 8); + var start = valueFormatted.slice(0, -5); + var middle = valueFormatted.slice(-5, -2); + var end = valueFormatted.substr(valueFormatted.length - 2); + buildAmount(start, middle, end); + } + break; + + default: + var valueProcessing = parseFloat(parseFloat(value).toFixed(2)); + var valueFormatted = localizeNumbers(valueProcessing); + buildAmount(valueFormatted, '', ''); + break; + } + } + + formatNumbers($scope.currency, $scope.value); + $scope.$watchGroup(['currency', 'value'], function() { + formatNumbers($scope.currency, $scope.value); + }); + }); + }); + } + }; + } +); \ No newline at end of file diff --git a/www/views/includes/amount.html b/www/views/includes/formatted-amount.html similarity index 100% rename from www/views/includes/amount.html rename to www/views/includes/formatted-amount.html From 31d33ba65628e1cb14e10011b15a86e61617e7a2 Mon Sep 17 00:00:00 2001 From: Sebastiaan Pasma Date: Wed, 1 Aug 2018 11:53:58 +0200 Subject: [PATCH 105/256] Shape shift track --- www/views/shapeshift.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/www/views/shapeshift.html b/www/views/shapeshift.html index 9f5a98423..2382f9897 100644 --- a/www/views/shapeshift.html +++ b/www/views/shapeshift.html @@ -27,7 +27,7 @@
- +
From 0caa3fb92afbdc9e5c918612b5945b009da2ff4d Mon Sep 17 00:00:00 2001 From: Brendon Duncan Date: Thu, 2 Aug 2018 09:48:12 +1200 Subject: [PATCH 106/256] From wallet details. --- src/js/controllers/review.controller.js | 118 ++++++++++++++++++------ www/views/review.html | 14 +-- 2 files changed, 96 insertions(+), 36 deletions(-) diff --git a/src/js/controllers/review.controller.js b/src/js/controllers/review.controller.js index 4995e9dc2..a38084b91 100644 --- a/src/js/controllers/review.controller.js +++ b/src/js/controllers/review.controller.js @@ -4,68 +4,116 @@ angular .module('copayApp.controllers') .controller('reviewController', reviewController); -function reviewController(configService, $log, $scope, txFormatService) { +function reviewController(configService, gettextCatalog, profileService, $scope, txFormatService) { var vm = this; + vm.origin = { + balanceAmount: '', + balanceCurrency: '', + color: '', + currency: '', + name: '', + }; vm.primaryAmount = ''; vm.primaryCurrency = ''; - vm.secondaryAmount = ''; vm.secondaryCurrency = ''; - var coin = ''; - //var config = null; + var originWalletId = ''; + var priceDisplayIsFiat = true; var satoshis = null; + var toAddress = ''; + var toWalletId = ''; - //var priceDisplayIsFiat = true; + + $scope.$on("$ionicView.beforeEnter", onBeforeEnter); function onBeforeEnter(event, data) { - satoshis = parseInt(data.stateParams.amount, 10); coin = data.stateParams.coin; - - updateAmount(); - - - /* - //amount.crypto.quantity = ; - amount.crypto.currency = data.stateParams.coin.toUpperCase(); - console.log('crypto:', JSON.stringify(amount.crypto)); - //vm.amount = cryptoAmount.toFixed(8); - console.log('vm.amount:', vm.amount); - - vm.secondaryAmount = amount.crypto.quantity; - vm.secondaryCurrency = amount.crypto.currency; + originWalletId = data.stateParams.fromWalletId; + satoshis = parseInt(data.stateParams.amount, 10); + toAddress = data.stateParams.toAddress; + + var originWallet = profileService.getWallet(originWalletId); + vm.origin.currency = originWallet.coin.toUpperCase(); + vm.origin.color = originWallet.color; + vm.origin.name = originWallet.name; configService.get(function onConfig(err, configCache) { if (err) { $log.err('Error getting config.', err); - return; } else { console.log('Got config.'); - config = configCache; + //config = configCache; // Use this later if have time - priceDisplayIsFiat = config.wallet.settings.priceDisplay === 'fiat'; + priceDisplayIsFiat = configCache.wallet.settings.priceDisplay === 'fiat'; } + updateSendAmounts(); + getOriginWalletBalance(originWallet); }); - */ } - function updateAmount() { + function getOriginWalletBalance(originWallet) { + console.log('origin wallet error:', originWallet.error); + var balanceCryptoAmount = ''; + var balanceCryptoCurrencyCode = ''; + var balanceFiatAmount = ''; + var balanceFiatCurrency = '' + + var originWalletStatus = null; + if (originWallet.status.isValid) { + originWalletStatus = originWallet.status; + } else if (originWallet.cachedStatus.isValid) { + originWalletStatus = originWallet.cachedStatus; + } else { + vm.origin.balanceAmount = ''; + vm.origin.balanceCurrency = ''; + return; + } + + if (originWalletStatus) { + var cryptoBalanceParts = originWalletStatus.spendableBalanceStr.split(' '); + balanceCryptoAmount = cryptoBalanceParts[0]; + balanceCryptoCurrencyCode = cryptoBalanceParts.length > 1 ? cryptoBalanceParts[1] : ''; + + if (originWalletStatus.alternativeBalanceAvailable) { + balanceFiatAmount = originWalletStatus.spendableBalanceAlternative; + balanceFiatCurrency = originWalletStatus.alternativeIsoCode; + } + } + + if (priceDisplayIsFiat) { + vm.origin.balanceAmount = balanceFiatAmount ? balanceFiatAmount : balanceCryptoAmount; + vm.origin.balanceCurrency = balanceFiatAmount ? balanceFiatCurrency : balanceCryptoCurrencyCode; + } else { + vm.origin.balanceAmount = balanceCryptoAmount; + vm.origin.balanceCurrency = balanceCryptoCurrencyCode; + } + } + + function updateSendAmounts() { if (typeof satoshis !== 'number') { return; } + var cryptoAmount = ''; + var cryptoCurrencyCode = ''; var amountStr = txFormatService.formatAmountStr(coin, satoshis); - var amountParts = amountStr.split(' '); - vm.primaryAmount = amountParts[0]; - vm.primaryCurrency = amountParts[1]; + if (amountStr) { + var amountParts = amountStr.split(' '); + cryptoAmount = amountParts[0]; + cryptoCurrencyCode = amountParts.length > 1 ? amountParts[1] : ''; + } + // Want to avoid flashing of amount strings so do all formatting after this has returned. txFormatService.formatAlternativeStr(coin, satoshis, function(v) { if (!v) { + vm.primaryAmount = cryptoAmount; + vm.primaryCurrency = cryptoCurrencyCode; vm.secondaryAmount = ''; vm.secondaryCurrency = ''; return; @@ -74,8 +122,20 @@ function reviewController(configService, $log, $scope, txFormatService) { vm.secondaryCurrency = vm.primaryCurrency; var fiatParts = v.split(' '); - vm.primaryAmount = fiatParts[0]; - vm.primaryCurrency = fiatParts[1]; + var fiatAmount = fiatParts[0]; + var fiatCurrency = fiatParts.length > 1 ? fiatParts[1] : ''; + + if (priceDisplayIsFiat) { + vm.primaryAmount = fiatAmount; + vm.primaryCurrency = fiatCurrency; + vm.secondaryAmount = cryptoAmount; + vm.secondaryCurrency = cryptoCurrencyCode; + } else { + vm.primaryAmount = cryptoAmount; + vm.primaryCurrency = cryptoCurrencyCode; + vm.secondaryAmount = fiatAmount; + vm.secondaryCurrency = fiatCurrency; + } }); } diff --git a/www/views/review.html b/www/views/review.html index ebec1581b..d75ce9e48 100644 --- a/www/views/review.html +++ b/www/views/review.html @@ -10,24 +10,24 @@
-
-

-

+
+

{{vm.primaryAmount}} {{vm.primaryCurrency}}

+

{{vm.secondaryAmount}} {{vm.secondaryCurrency}}

-
From:
+
From:
-

Personal Wallet (BCH)

-

128.67

+

{{vm.origin.name}} ({{vm.origin.currency}})

+

{{vm.origin.balanceAmount}} {{vm.origin.balanceCurrency}}

From e58c3bf438676226f44a140aba7630ef8d84a79d Mon Sep 17 00:00:00 2001 From: Brendon Duncan Date: Thu, 2 Aug 2018 10:07:25 +1200 Subject: [PATCH 107/256] From wallet currency colour. --- src/js/controllers/review.controller.js | 6 ++++-- www/views/review.html | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/js/controllers/review.controller.js b/src/js/controllers/review.controller.js index a38084b91..1e51bd5d0 100644 --- a/src/js/controllers/review.controller.js +++ b/src/js/controllers/review.controller.js @@ -12,6 +12,7 @@ function reviewController(configService, gettextCatalog, profileService, $scope, balanceCurrency: '', color: '', currency: '', + currencyColor: '', name: '', }; vm.primaryAmount = ''; @@ -44,14 +45,15 @@ function reviewController(configService, gettextCatalog, profileService, $scope, vm.origin.color = originWallet.color; vm.origin.name = originWallet.name; - configService.get(function onConfig(err, configCache) { + configService.get(function onConfig(err, config) { if (err) { $log.err('Error getting config.', err); } else { console.log('Got config.'); //config = configCache; // Use this later if have time - priceDisplayIsFiat = configCache.wallet.settings.priceDisplay === 'fiat'; + priceDisplayIsFiat = config.wallet.settings.priceDisplay === 'fiat'; + vm.origin.currencyColor = originWallet.coin === 'btc' ? config.bitcoinWalletColor : config.bitcoinCashWalletColor; } updateSendAmounts(); getOriginWalletBalance(originWallet); diff --git a/www/views/review.html b/www/views/review.html index d75ce9e48..2ee10e40a 100644 --- a/www/views/review.html +++ b/www/views/review.html @@ -26,7 +26,7 @@ style="background-color: {{vm.origin.color}}" >
-

{{vm.origin.name}} ({{vm.origin.currency}})

+

{{vm.origin.name}} ({{vm.origin.currency}})

{{vm.origin.balanceAmount}} {{vm.origin.balanceCurrency}}

From 438ab94404512feb5901f508d7f790af85d04000 Mon Sep 17 00:00:00 2001 From: Brendon Duncan Date: Thu, 2 Aug 2018 10:20:03 +1200 Subject: [PATCH 108/256] Strings for translation. --- i18n/po/template.pot | 25 +++++++++++++++++++++++++ src/js/controllers/review.controller.js | 5 ++--- www/views/review.html | 3 ++- 3 files changed, 29 insertions(+), 4 deletions(-) diff --git a/i18n/po/template.pot b/i18n/po/template.pot index caa984046..7406fcb74 100644 --- a/i18n/po/template.pot +++ b/i18n/po/template.pot @@ -3702,4 +3702,29 @@ msgstr "" #: www/views/review.html:4 msgid "Review Transaction" +msgstr "" + +#: www/views/review.html:14 +msgid "You are sending" +msgstr "" + +#: www/views/review.html:22 +msgid "From:" +msgstr "" + +#: www/views/review.html:36 +msgid "To:" +msgstr "" + +#: www/views/review.html:53 +msgid "Add personal note" +msgstr "" + + +#: www/views/review.html:57 +msgid "Personal note:" +msgstr "" + +#: www/views/review.html:69 +msgid "Less than 1 cent" msgstr "" \ No newline at end of file diff --git a/src/js/controllers/review.controller.js b/src/js/controllers/review.controller.js index 1e51bd5d0..f0c443e96 100644 --- a/src/js/controllers/review.controller.js +++ b/src/js/controllers/review.controller.js @@ -7,6 +7,8 @@ angular function reviewController(configService, gettextCatalog, profileService, $scope, txFormatService) { var vm = this; + vm.feeCrypto = ''; + vm.feeFiat = ''; vm.origin = { balanceAmount: '', balanceCurrency: '', @@ -49,9 +51,6 @@ function reviewController(configService, gettextCatalog, profileService, $scope, if (err) { $log.err('Error getting config.', err); } else { - console.log('Got config.'); - //config = configCache; - // Use this later if have time priceDisplayIsFiat = config.wallet.settings.priceDisplay === 'fiat'; vm.origin.currencyColor = originWallet.coin === 'btc' ? config.bitcoinWalletColor : config.bitcoinCashWalletColor; } diff --git a/www/views/review.html b/www/views/review.html index 2ee10e40a..15c6d5978 100644 --- a/www/views/review.html +++ b/www/views/review.html @@ -11,6 +11,7 @@ ng-init="memoExpanded = false">
+

You are sending

{{vm.primaryAmount}} {{vm.primaryCurrency}}

{{vm.secondaryAmount}} {{vm.secondaryCurrency}}

@@ -49,7 +50,7 @@ ng-class="{ 'expand-content-revealed': memoExpanded }" ng-click="memoExpanded = !memoExpanded"> - Add a personal note + Add personal note
From ff643bf479958364a4a82dae6b7de24d6c065ea9 Mon Sep 17 00:00:00 2001 From: Brendon Duncan Date: Thu, 2 Aug 2018 11:48:41 +1200 Subject: [PATCH 109/256] Starting on destination UI. --- src/js/controllers/review.controller.js | 17 ++++++++++++++++- www/views/review.html | 2 +- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/src/js/controllers/review.controller.js b/src/js/controllers/review.controller.js index f0c443e96..9394b5ef2 100644 --- a/src/js/controllers/review.controller.js +++ b/src/js/controllers/review.controller.js @@ -7,6 +7,13 @@ angular function reviewController(configService, gettextCatalog, profileService, $scope, txFormatService) { var vm = this; + vm.destination = { + address: '', + balanceAmount: '', + balanceCurrecy: '', + color: '', + name: '' + }; vm.feeCrypto = ''; vm.feeFiat = ''; vm.origin = { @@ -27,7 +34,7 @@ function reviewController(configService, gettextCatalog, profileService, $scope, var priceDisplayIsFiat = true; var satoshis = null; var toAddress = ''; - var toWalletId = ''; + var destinationWalletId = ''; @@ -47,6 +54,14 @@ function reviewController(configService, gettextCatalog, profileService, $scope, vm.origin.color = originWallet.color; vm.origin.name = originWallet.name; + destinationWalletId = data.stateParams.toWalletId; + if (destinationWalletId) { + var destinationWallet = profileService.getWallet(destinationWalletId); + vm.destination.color = destinationWallet.color; + vm.destination.name = destinationWallet.name; + + } + configService.get(function onConfig(err, config) { if (err) { $log.err('Error getting config.', err); diff --git a/www/views/review.html b/www/views/review.html index 15c6d5978..0ec643b8b 100644 --- a/www/views/review.html +++ b/www/views/review.html @@ -37,7 +37,7 @@
-

Satoshi Nakamoto

+

{{vm.destination.name}}

128.67

From 927c1e947847eba1ef284d060a307832b7d92528 Mon Sep 17 00:00:00 2001 From: Brendon Duncan Date: Thu, 2 Aug 2018 15:44:59 +1200 Subject: [PATCH 110/256] Request Specifc Amount integrated into new send flow. --- src/js/controllers/amount.js | 225 ++++++++++++----------------- src/js/controllers/customAmount.js | 9 +- src/js/controllers/tab-receive.js | 3 +- src/js/routes.js | 4 +- 4 files changed, 99 insertions(+), 142 deletions(-) diff --git a/src/js/controllers/amount.js b/src/js/controllers/amount.js index c50a949a0..4d8c8671b 100644 --- a/src/js/controllers/amount.js +++ b/src/js/controllers/amount.js @@ -2,7 +2,7 @@ angular.module('copayApp.controllers').controller('amountController', amountController); -function amountController(configService, $filter, $ionicHistory, $ionicModal, $ionicScrollDelegate, lodash, $log, nodeWebkitService, rateService, $scope, $state, $stateParams, $timeout, txFormatService, platformInfo, popupService, profileService, walletService, $window) { +function amountController(configService, $filter, $ionicHistory, $ionicModal, $ionicScrollDelegate, lodash, $log, nodeWebkitService, rateService, $scope, $state, $timeout, txFormatService, platformInfo, popupService, profileService, walletService, $window) { var vm = this; vm.allowSend = false; @@ -11,12 +11,10 @@ function amountController(configService, $filter, $ionicHistory, $ionicModal, $i vm.alternativeUnit = ''; vm.amount = '0'; vm.availableFunds = ''; - vm.fromWalletId = ''; // Use insufficient for logic, as when the amount is invalid, funds being // either sufficent or insufficient doesn't make sense. vm.fundsAreInsufficient = false; vm.globalResult = ''; - vm.hello = 'hi'; vm.isRequestingSpecificAmount = false; vm.listComplete = false; vm.lastUsedPopularList = []; @@ -44,33 +42,25 @@ function amountController(configService, $filter, $ionicHistory, $ionicModal, $i var LENGTH_BEFORE_COMMA_EXPRESSION_LIMIT = 8; var LENGTH_AFTER_COMMA_EXPRESSION_LIMIT = 8; - var _id; var altCurrencyModal = null; var altUnitIndex = 0; var availableFundsInCrypto = ''; var availableFundsInFiat = ''; var availableSatoshis = null; var availableUnits = []; - var displayAddress = null; var fiatCode; - var fixedUnit; var hasMaxAmount = true; var isNW = platformInfo.isNW; var isAndroid = platformInfo.isAndroid; var isIos = platformInfo.isIOS; var lastUsedAltCurrencyList = []; - var nextStep = null; - var unitToSatoshi; - var recipientType = null; + var passthroughParams = {}; var satToUnit; var showMenu = false; var showWarningMessage = false; - var toAddress = ''; - var toColor = null; - var toEmail = null; - var toName = null; var unitDecimals; var unitIndex = 0; + var unitToSatoshi; var useSendMax = false; function onLeave() { @@ -87,24 +77,11 @@ function amountController(configService, $filter, $ionicHistory, $ionicModal, $i vm.shapeshiftOrderId = data.stateParams.shapeshiftOrderId; } - // To get the wallet from with the new flow - vm.fromWalletId = data.stateParams.fromWalletId; + passthroughParams = data.stateParams; - if (data.stateParams.noPrefix) { - showWarningMessage = data.stateParams.noPrefix != 0; - if (showWarningMessage) { - var message = 'Address doesn\'t contain currency information, please make sure you are sending the correct currency.'; - popupService.showAlert('', message, function() {}, 'Ok'); - } - } - - vm.isRequestingSpecificAmount = !!data.stateParams.id; + vm.isRequestingSpecificAmount = !data.stateParams.fromWalletId; var config = configService.getSync().wallet.settings; - // Go to... - _id = data.stateParams.id; // Optional (BitPay Card ID or Wallet ID) - nextStep = data.stateParams.nextStep; - setAvailableUnits(); updateUnitUI(); @@ -112,19 +89,8 @@ function amountController(configService, $filter, $ionicHistory, $ionicModal, $i hasMaxAmount = false; } - showMenu = $ionicHistory.backView() && ($ionicHistory.backView().stateName == 'tabs.send' || $ionicHistory.backView().stateName == 'tabs.bitpayCard'); - recipientType = data.stateParams.recipientType || null; - toAddress = data.stateParams.toAddress; - displayAddress = data.stateParams.displayAddress; - toName = data.stateParams.toName; - toEmail = data.stateParams.toEmail; - toColor = data.stateParams.toColor; - - if (!nextStep && !data.stateParams.toAddress) { - $log.error('Bad params at amount') - throw ('bad params'); - } - + showMenu = $ionicHistory.backView() && ($ionicHistory.backView().stateName == 'tabs.send'); + var reNr = /^[1234567890\.]$/; var reOp = /^[\*\+\-\/]$/; @@ -158,11 +124,6 @@ function amountController(configService, $filter, $ionicHistory, $ionicModal, $i resetAmount(); - // in SAT ALWAYS - if ($stateParams.toAmount) { - vm.amount = (($stateParams.toAmount) * satToUnit).toFixed(unitDecimals); - } - processAmount(); $timeout(function() { @@ -174,11 +135,16 @@ function amountController(configService, $filter, $ionicHistory, $ionicModal, $i var configCache = configService.getSync(); availableUnits = []; - var hasBCHWallets = profileService.getWallets({ - coin: 'bch' - }).length; + var coinFromWallet = ''; + if (passthroughParams.fromWalletId) { + var fromWallet = profileService.getWallet(passthroughParams.fromWalletId); + coinFromWallet = fromWallet.coin; + } else { + var toWallet = profileService.getWallet(passthroughParams.toWalletId); + coinFromWallet = toWallet.coin; + } - if (hasBCHWallets) { + if (coinFromWallet === 'bch') { availableUnits.push({ name: 'Bitcoin Cash', id: 'bch', @@ -186,11 +152,7 @@ function amountController(configService, $filter, $ionicHistory, $ionicModal, $i }); }; - var hasBTCWallets = profileService.getWallets({ - coin: 'btc' - }).length; - - if (hasBTCWallets) { + if (coinFromWallet === 'btc') { availableUnits.push({ name: 'Bitcoin', id: 'btc', @@ -200,27 +162,7 @@ function amountController(configService, $filter, $ionicHistory, $ionicModal, $i unitIndex = 0; - if (data.stateParams.coin) { - var coins = data.stateParams.coin.split(','); - var newAvailableUnits = []; - - lodash.each(coins, function(c) { - var coin = lodash.find(availableUnits, { - id: c - }); - if (!coin) { - $log.warn('Could not find desired coin:' + data.stateParams.coin) - } else { - newAvailableUnits.push(coin); - } - }); - - if (newAvailableUnits.length > 0) { - availableUnits = newAvailableUnits; - } - } - - + // currency have preference var fiatName; if (data.stateParams.currency) { @@ -241,18 +183,14 @@ function amountController(configService, $filter, $ionicHistory, $ionicModal, $i isFiat: true, }); - if (data.stateParams.fixedUnit) { - fixedUnit = true; - } - unitIndex = lodash.findIndex(availableUnits, { isFiat: true }); altUnitIndex = 0; - if (vm.fromWalletId) { - var fromWallet = profileService.getWallet(vm.fromWalletId); + if (passthroughParams.fromWalletId) { + var fromWallet = profileService.getWallet(passthroughParams.fromWalletId); updateAvailableFundsFromWallet(fromWallet); } }; @@ -302,8 +240,6 @@ function amountController(configService, $filter, $ionicHistory, $ionicModal, $i vm.amount = '0'; - if (fixedUnit) return; - if (!(availableUnits[unitIndex].isFiat && availableUnits.length > 2 && altUnitIndex == 0)) { unitIndex++; if (unitIndex >= availableUnits.length) unitIndex = 0; @@ -405,7 +341,7 @@ function amountController(configService, $filter, $ionicHistory, $ionicModal, $i var a = fromFiat(result); if (a) { var amountInSatoshis = a * unitToSatoshi; - vm.fundsAreInsufficient = !!vm.fromWalletId + vm.fundsAreInsufficient = !!passthroughParams.fromWalletId && availableSatoshis !== null && availableSatoshis < amountInSatoshis; @@ -425,7 +361,7 @@ function amountController(configService, $filter, $ionicHistory, $ionicModal, $i vm.allowSend = false; } } else { - vm.fundsAreInsufficient = vm.fromWalletId + vm.fundsAreInsufficient = passthroughParams.fromWalletId && availableSatoshis !== null && availableSatoshis < result * unitToSatoshi; @@ -482,67 +418,88 @@ function amountController(configService, $filter, $ionicHistory, $ionicModal, $i function finish() { var unit = availableUnits[unitIndex]; - var _amount = evaluate(format(vm.amount)); - var coin = unit.id; + var uiAmount = evaluate(format(vm.amount)); + + var satoshis = 0; if (unit.isFiat) { - coin = availableUnits[altUnitIndex].id; + satoshis = (fromFiat(uiAmount) * unitToSatoshi).toFixed(0); + } else { + satoshis = (uiAmount * unitToSatoshi).toFixed(0); } - if (nextStep) { - $state.transitionTo(nextStep, { - id: _id, - amount: useSendMax ? null : _amount, - currency: unit.id.toUpperCase(), - coin: coin, - useSendMax: useSendMax, - fromWalletId: vm.fromWalletId - }); - } else { - var amount = _amount; + var confirmData = { + amount: useSendMax ? undefined : satoshis, + fromWalletId: passthroughParams.fromWalletId, + sendMax: useSendMax, + thirdParty: passthroughParams.thirdParty, + toAddr: passthroughParams.toAddress, + toWalletId: passthroughParams.toWalletId + }; + console.log('confirmData:', confirmData); + + if (!confirmData.fromWalletId) { + $state.transitionTo('tabs.paymentRequest.confirm', confirmData); + } else { + + + var coin = unit.id; if (unit.isFiat) { - amount = (fromFiat(amount) * unitToSatoshi).toFixed(0); - } else { - amount = (amount * unitToSatoshi).toFixed(0); + coin = availableUnits[altUnitIndex].id; } - var confirmData = { - recipientType: recipientType, - toAmount: amount, - toAddress: toAddress, - displayAddress: displayAddress || toAddress, - toName: toName, - toEmail: toEmail, - toColor: toColor, - coin: coin, - useSendMax: useSendMax, - fromWalletId: vm.fromWalletId - }; + if (nextStep) { + $state.transitionTo(nextStep, { + id: _id, + amount: useSendMax ? null : _amount, + currency: unit.id.toUpperCase(), + coin: coin, + useSendMax: useSendMax, + fromWalletId: passthroughParams.fromWalletId + }); + } else { + var amount = _amount; - if (vm.shapeshiftOrderId) { - var shapeshiftOrderUrl = 'https://www.shapeshift.io/#/status/'; - shapeshiftOrderUrl += vm.shapeshiftOrderId; - confirmData.description = shapeshiftOrderUrl; - confirmData.fromWalletId = vm.fromWalletId; + if (unit.isFiat) { + amount = (fromFiat(amount) * unitToSatoshi).toFixed(0); + } else { + amount = (amount * unitToSatoshi).toFixed(0); + } - if (confirmData.useSendMax) { - var wallet = lodash.find(profileService.getWallets({ coin: coin }), - function(w) { - return w.id == vm.fromWalletId; - }); + var confirmData = { + amount: useSendMax ? undefined : amount, + fromWalletId: passthroughParams.fromWalletId, + sendMax: useSendMax, + thirdParty: passthroughParams.thirdParty, + toAddr: passthroughParams.toAddress, + toWalletId: passthroughParams.toWalletId + }; - var balance = parseFloat(wallet.cachedBalance.substring(0, wallet.cachedBalance.length-4)); - if (balance < vm.minShapeshiftAmount * 1.04) { - confirmData.useSendMax = false; - confirmData.toAmount = vm.minShapeshiftAmount * unitToSatoshi; - } else if (balance > vm.maxShapeshiftAmount) { - confirmData.useSendMax = false; - confirmData.toAmount = vm.maxShapeshiftAmount * unitToSatoshi * 0.99; + if (vm.shapeshiftOrderId) { + var shapeshiftOrderUrl = 'https://www.shapeshift.io/#/status/'; + shapeshiftOrderUrl += vm.shapeshiftOrderId; + confirmData.description = shapeshiftOrderUrl; + + if (confirmData.useSendMax) { + var wallet = lodash.find(profileService.getWallets({ coin: coin }), + function(w) { + return w.id == vm.fromWalletId; + }); + + var balance = parseFloat(wallet.cachedBalance.substring(0, wallet.cachedBalance.length-4)); + if (balance < vm.minShapeshiftAmount * 1.04) { + confirmData.useSendMax = false; + confirmData.amount = vm.minShapeshiftAmount * unitToSatoshi; + } else if (balance > vm.maxShapeshiftAmount) { + confirmData.useSendMax = false; + confirmData.amount = vm.maxShapeshiftAmount * unitToSatoshi * 0.99; + } } } - } - $state.transitionTo('tabs.send.confirm', confirmData); + + $state.transitionTo('tabs.send.confirm', confirmData); + } } useSendMax = null; } diff --git a/src/js/controllers/customAmount.js b/src/js/controllers/customAmount.js index f6b96c22c..d74ebca30 100644 --- a/src/js/controllers/customAmount.js +++ b/src/js/controllers/customAmount.js @@ -17,7 +17,7 @@ angular.module('copayApp.controllers').controller('customAmountController', func } $scope.$on("$ionicView.beforeEnter", function(event, data) { - var walletId = data.stateParams.id; + var walletId = data.stateParams.toWalletId; if (!walletId) { showErrorAndBack('Error', 'No wallet selected'); @@ -53,11 +53,12 @@ angular.module('copayApp.controllers').controller('customAmountController', func $scope.address = bchAddresses[$scope.bchAddressType]; } - $scope.coin = data.stateParams.coin; + $scope.coin = $scope.wallet.coin; + var satoshis = parseInt(data.stateParams.amount, 10); var parsedAmount = txFormatService.parseAmount( $scope.wallet.coin, - data.stateParams.amount, - data.stateParams.currency); + satoshis, + 'sat'); // Amount in USD or BTC var amount = parsedAmount.amount; diff --git a/src/js/controllers/tab-receive.js b/src/js/controllers/tab-receive.js index 8f25412ec..3c48818b6 100644 --- a/src/js/controllers/tab-receive.js +++ b/src/js/controllers/tab-receive.js @@ -19,8 +19,7 @@ angular.module('copayApp.controllers').controller('tabReceiveController', functi $scope.requestSpecificAmount = function() { $state.go('tabs.paymentRequest.amount', { - id: $scope.wallet.credentials.walletId, - coin: $scope.wallet.coin + toWalletId: $scope.wallet.credentials.walletId }); }; diff --git a/src/js/routes.js b/src/js/routes.js index 234344d5f..e5430b5f5 100644 --- a/src/js/routes.js +++ b/src/js/routes.js @@ -723,7 +723,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr }) .state('tabs.paymentRequest.amount', { - url: '/amount/:coin', + url: '/amount/:toWalletId', views: { 'tab-receive@tabs': { controller: 'amountController', @@ -733,7 +733,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr } }) .state('tabs.paymentRequest.confirm', { - url: '/confirm/:amount/:currency/:coin', + url: '/confirm/:amount/:toWalletId', views: { 'tab-receive@tabs': { controller: 'customAmountController', From dc41aa604426866cb5a471dc4d170f52123a2309 Mon Sep 17 00:00:00 2001 From: Brendon Duncan Date: Thu, 2 Aug 2018 16:40:00 +1200 Subject: [PATCH 111/256] Warning messages for ShapeShift amounts. --- src/js/controllers/amount.js | 194 +++++++++++++---------------------- www/views/amount.html | 8 +- 2 files changed, 78 insertions(+), 124 deletions(-) diff --git a/src/js/controllers/amount.js b/src/js/controllers/amount.js index 4d8c8671b..309949f97 100644 --- a/src/js/controllers/amount.js +++ b/src/js/controllers/amount.js @@ -2,7 +2,7 @@ angular.module('copayApp.controllers').controller('amountController', amountController); -function amountController(configService, $filter, $ionicHistory, $ionicModal, $ionicScrollDelegate, lodash, $log, nodeWebkitService, rateService, $scope, $state, $timeout, txFormatService, platformInfo, popupService, profileService, walletService, $window) { +function amountController(configService, $filter, gettextCatalog, $ionicHistory, $ionicModal, $ionicScrollDelegate, lodash, $log, nodeWebkitService, rateService, $scope, $state, $timeout, txFormatService, platformInfo, profileService, walletService, $window) { var vm = this; vm.allowSend = false; @@ -18,8 +18,8 @@ function amountController(configService, $filter, $ionicHistory, $ionicModal, $i vm.isRequestingSpecificAmount = false; vm.listComplete = false; vm.lastUsedPopularList = []; - vm.maxShapeshiftAmount = 0; - vm.minShapeshiftAmount = 0; + vm.maxAmount = 0; + vm.minAmount = 0; vm.shapeshiftOrderId = ''; vm.unit = ''; @@ -34,6 +34,7 @@ function amountController(configService, $filter, $ionicHistory, $ionicModal, $i vm.removeDigit = removeDigit; vm.save = save; vm.sendMax = sendMax; + vm.errorMessage = ''; $scope.$on('$ionicView.beforeEnter', onBeforeEnter); $scope.$on('$ionicView.leave', onLeave); @@ -49,15 +50,12 @@ function amountController(configService, $filter, $ionicHistory, $ionicModal, $i var availableSatoshis = null; var availableUnits = []; var fiatCode; - var hasMaxAmount = true; var isNW = platformInfo.isNW; var isAndroid = platformInfo.isAndroid; var isIos = platformInfo.isIOS; var lastUsedAltCurrencyList = []; var passthroughParams = {}; var satToUnit; - var showMenu = false; - var showWarningMessage = false; var unitDecimals; var unitIndex = 0; var unitToSatoshi; @@ -70,26 +68,19 @@ function amountController(configService, $filter, $ionicHistory, $ionicModal, $i function onBeforeEnter(event, data) { initCurrencies(); - vm.hello = 'greetings'; - if (data.stateParams.shapeshiftOrderId && data.stateParams.shapeshiftOrderId.length > 0) { - vm.minShapeshiftAmount = parseFloat(data.stateParams.minShapeshiftAmount); - vm.maxShapeshiftAmount = parseFloat(data.stateParams.maxShapeshiftAmount); - vm.shapeshiftOrderId = data.stateParams.shapeshiftOrderId; - } + + vm.minAmount = parseFloat(data.stateParams.minShapeshiftAmount); + vm.maxAmount = parseFloat(data.stateParams.maxShapeshiftAmount); + vm.shapeshiftOrderId = data.stateParams.shapeshiftOrderId; passthroughParams = data.stateParams; + console.log('stateParams:', data.stateParams); vm.isRequestingSpecificAmount = !data.stateParams.fromWalletId; var config = configService.getSync().wallet.settings; setAvailableUnits(); updateUnitUI(); - - if ($ionicHistory.backView().stateName == 'tabs.receive') { - hasMaxAmount = false; - } - - showMenu = $ionicHistory.backView() && ($ionicHistory.backView().stateName == 'tabs.send'); var reNr = /^[1234567890\.]$/; var reOp = /^[\*\+\-\/]$/; @@ -333,6 +324,8 @@ function amountController(configService, $filter, $ionicHistory, $ionicModal, $i var formatedValue = format(vm.amount); var result = evaluate(formatedValue); + var amountInSatoshis = 0; + if (lodash.isNumber(result)) { vm.globalResult = isExpression(vm.amount) ? '= ' + processResult(result) : ''; @@ -340,7 +333,7 @@ function amountController(configService, $filter, $ionicHistory, $ionicModal, $i var a = fromFiat(result); if (a) { - var amountInSatoshis = a * unitToSatoshi; + amountInSatoshis = a * unitToSatoshi; vm.fundsAreInsufficient = !!passthroughParams.fromWalletId && availableSatoshis !== null && availableSatoshis < amountInSatoshis; @@ -349,7 +342,7 @@ function amountController(configService, $filter, $ionicHistory, $ionicModal, $i vm.allowSend = lodash.isNumber(a) && a > 0 && (!vm.shapeshiftOrderId - || (a >= vm.minShapeshiftAmount && a <= vm.maxShapeshiftAmount)) + || (a >= vm.minAmount && a <= vm.maxAmount)) && !vm.fundsAreInsufficient; } else { if (result) { @@ -361,6 +354,7 @@ function amountController(configService, $filter, $ionicHistory, $ionicModal, $i vm.allowSend = false; } } else { + amountInSatoshis = result; vm.fundsAreInsufficient = passthroughParams.fromWalletId && availableSatoshis !== null && availableSatoshis < result * unitToSatoshi; @@ -369,13 +363,27 @@ function amountController(configService, $filter, $ionicHistory, $ionicModal, $i vm.allowSend = lodash.isNumber(result) && result > 0 && (!vm.shapeshiftOrderId - || (result >= vm.minShapeshiftAmount && result <= vm.maxShapeshiftAmount)) + || (result >= vm.minAmount && result <= vm.maxAmount)) && !vm.fundsAreInsufficient; } } else { vm.fundsAreInsufficient = false; } + + if (vm.fundsAreInsufficient) { + vm.errorMessage = gettextCatalog.getString('Not enough available funds'); + } else if (amountInSatoshis && vm.shapeshiftOrderId) { + if (amountInSatoshis < (vm.minAmount * unitToSatoshi)) { + vm.errorMessage = gettextCatalog.getString('Amount is below minimum'); + } else if (amountInSatoshis > (vm.maxAmount * unitToSatoshi)) { + vm.errorMessage = gettextCatalog.getString('Amount is above maximum'); + } else { + vm.errorMessage = ''; + } + } else { + vm.errorMessage = ''; + } }; function processResult(val) { @@ -415,109 +423,55 @@ function amountController(configService, $filter, $ionicHistory, $ionicModal, $i }; function finish() { + var unit = availableUnits[unitIndex]; + var uiAmount = evaluate(format(vm.amount)); - function finish() { - var unit = availableUnits[unitIndex]; - var uiAmount = evaluate(format(vm.amount)); - - var satoshis = 0; - if (unit.isFiat) { - satoshis = (fromFiat(uiAmount) * unitToSatoshi).toFixed(0); - } else { - satoshis = (uiAmount * unitToSatoshi).toFixed(0); - } - - var confirmData = { - amount: useSendMax ? undefined : satoshis, - fromWalletId: passthroughParams.fromWalletId, - sendMax: useSendMax, - thirdParty: passthroughParams.thirdParty, - toAddr: passthroughParams.toAddress, - toWalletId: passthroughParams.toWalletId - }; - - console.log('confirmData:', confirmData); - - if (!confirmData.fromWalletId) { - $state.transitionTo('tabs.paymentRequest.confirm', confirmData); - } else { - - - var coin = unit.id; - if (unit.isFiat) { - coin = availableUnits[altUnitIndex].id; - } - - if (nextStep) { - $state.transitionTo(nextStep, { - id: _id, - amount: useSendMax ? null : _amount, - currency: unit.id.toUpperCase(), - coin: coin, - useSendMax: useSendMax, - fromWalletId: passthroughParams.fromWalletId - }); - } else { - var amount = _amount; - - if (unit.isFiat) { - amount = (fromFiat(amount) * unitToSatoshi).toFixed(0); - } else { - amount = (amount * unitToSatoshi).toFixed(0); - } - - var confirmData = { - amount: useSendMax ? undefined : amount, - fromWalletId: passthroughParams.fromWalletId, - sendMax: useSendMax, - thirdParty: passthroughParams.thirdParty, - toAddr: passthroughParams.toAddress, - toWalletId: passthroughParams.toWalletId - }; - - if (vm.shapeshiftOrderId) { - var shapeshiftOrderUrl = 'https://www.shapeshift.io/#/status/'; - shapeshiftOrderUrl += vm.shapeshiftOrderId; - confirmData.description = shapeshiftOrderUrl; - - if (confirmData.useSendMax) { - var wallet = lodash.find(profileService.getWallets({ coin: coin }), - function(w) { - return w.id == vm.fromWalletId; - }); - - var balance = parseFloat(wallet.cachedBalance.substring(0, wallet.cachedBalance.length-4)); - if (balance < vm.minShapeshiftAmount * 1.04) { - confirmData.useSendMax = false; - confirmData.amount = vm.minShapeshiftAmount * unitToSatoshi; - } else if (balance > vm.maxShapeshiftAmount) { - confirmData.useSendMax = false; - confirmData.amount = vm.maxShapeshiftAmount * unitToSatoshi * 0.99; - } - } - } - - - $state.transitionTo('tabs.send.confirm', confirmData); - } - } - useSendMax = null; - } - - if (showWarningMessage) { - var u = vm.unit == 'BCH' || vm.unit == 'BTC' ? vm.unit : vm.alternativeUnit; - var message = 'Are you sure you want to send ' + u.toUpperCase() + '?'; - popupService.showConfirm(message, '', 'Yes', 'No', function(res) { - if (!res) { - useSendMax = null; - return; - }; - finish(); - }); + var satoshis = 0; + if (unit.isFiat) { + satoshis = (fromFiat(uiAmount) * unitToSatoshi).toFixed(0); } else { - finish(); + satoshis = (uiAmount * unitToSatoshi).toFixed(0); } + var confirmData = { + amount: useSendMax ? undefined : satoshis, + fromWalletId: passthroughParams.fromWalletId, + sendMax: useSendMax, + thirdParty: passthroughParams.thirdParty, + toAddr: passthroughParams.toAddress, + toWalletId: passthroughParams.toWalletId + }; + + console.log('confirmData:', confirmData); + + if (!confirmData.fromWalletId) { + $state.transitionTo('tabs.paymentRequest.confirm', confirmData); + } else { + + if (vm.shapeshiftOrderId) { + var shapeshiftOrderUrl = 'https://www.shapeshift.io/#/status/'; + shapeshiftOrderUrl += vm.shapeshiftOrderId; + confirmData.description = shapeshiftOrderUrl; + + if (confirmData.sendMax) { + var wallet = lodash.find(profileService.getWallets({ coin: coin }), + function(w) { + return w.id == vm.fromWalletId; + }); + + var balance = parseFloat(wallet.cachedBalance.substring(0, wallet.cachedBalance.length-4)); + if (balance < vm.minAmount * 1.04) { + confirmData.sendMax = false; + confirmData.amount = vm.minAmount * unitToSatoshi; + } else if (balance > vm.maxAmount) { + confirmData.sendMax = false; + confirmData.amount = vm.maxAmount * unitToSatoshi * 0.99; + } + } + } + + $state.transitionTo('tabs.send.confirm', confirmData); + } }; diff --git a/www/views/amount.html b/www/views/amount.html index 77c52f96c..1757bf25a 100644 --- a/www/views/amount.html +++ b/www/views/amount.html @@ -12,8 +12,8 @@
@@ -29,8 +29,8 @@
From 1590a295da6d9380044a6722865ec6f9c34e68f4 Mon Sep 17 00:00:00 2001 From: Brendon Duncan Date: Thu, 2 Aug 2018 17:10:58 +1200 Subject: [PATCH 112/256] Bugfix for ShapeShift warnings. --- src/js/controllers/amount.js | 30 +++++++++++++++++------------- src/js/routes.js | 2 +- 2 files changed, 18 insertions(+), 14 deletions(-) diff --git a/src/js/controllers/amount.js b/src/js/controllers/amount.js index 309949f97..269ff1634 100644 --- a/src/js/controllers/amount.js +++ b/src/js/controllers/amount.js @@ -69,13 +69,13 @@ function amountController(configService, $filter, gettextCatalog, $ionicHistory, initCurrencies(); - vm.minAmount = parseFloat(data.stateParams.minShapeshiftAmount); - vm.maxAmount = parseFloat(data.stateParams.maxShapeshiftAmount); - vm.shapeshiftOrderId = data.stateParams.shapeshiftOrderId; - passthroughParams = data.stateParams; console.log('stateParams:', data.stateParams); + vm.minAmount = parseFloat(data.stateParams.minAmount); + vm.maxAmount = parseFloat(data.stateParams.maxAmount); + vm.shapeshiftOrderId = data.stateParams.thirdPartyOrderId; + vm.isRequestingSpecificAmount = !data.stateParams.fromWalletId; var config = configService.getSync().wallet.settings; @@ -324,7 +324,7 @@ function amountController(configService, $filter, gettextCatalog, $ionicHistory, var formatedValue = format(vm.amount); var result = evaluate(formatedValue); - var amountInSatoshis = 0; + var amountInCrypto = 0; if (lodash.isNumber(result)) { vm.globalResult = isExpression(vm.amount) ? '= ' + processResult(result) : ''; @@ -333,7 +333,8 @@ function amountController(configService, $filter, gettextCatalog, $ionicHistory, var a = fromFiat(result); if (a) { - amountInSatoshis = a * unitToSatoshi; + amountInCrypto = a; + var amountInSatoshis = a * unitToSatoshi; vm.fundsAreInsufficient = !!passthroughParams.fromWalletId && availableSatoshis !== null && availableSatoshis < amountInSatoshis; @@ -354,7 +355,7 @@ function amountController(configService, $filter, gettextCatalog, $ionicHistory, vm.allowSend = false; } } else { - amountInSatoshis = result; + amountInCrypto = result; vm.fundsAreInsufficient = passthroughParams.fromWalletId && availableSatoshis !== null && availableSatoshis < result * unitToSatoshi; @@ -373,11 +374,14 @@ function amountController(configService, $filter, gettextCatalog, $ionicHistory, if (vm.fundsAreInsufficient) { vm.errorMessage = gettextCatalog.getString('Not enough available funds'); - } else if (amountInSatoshis && vm.shapeshiftOrderId) { - if (amountInSatoshis < (vm.minAmount * unitToSatoshi)) { + + } else if (amountInCrypto && vm.shapeshiftOrderId) { + if (amountInCrypto < vm.minAmount) { vm.errorMessage = gettextCatalog.getString('Amount is below minimum'); - } else if (amountInSatoshis > (vm.maxAmount * unitToSatoshi)) { + + } else if (amountInCrypto > vm.maxAmount) { vm.errorMessage = gettextCatalog.getString('Amount is above maximum'); + } else { vm.errorMessage = ''; } @@ -437,7 +441,7 @@ function amountController(configService, $filter, gettextCatalog, $ionicHistory, amount: useSendMax ? undefined : satoshis, fromWalletId: passthroughParams.fromWalletId, sendMax: useSendMax, - thirdParty: passthroughParams.thirdParty, + thirdPartyOrderId: passthroughParams.thirdPartyOrderId, toAddr: passthroughParams.toAddress, toWalletId: passthroughParams.toWalletId }; @@ -456,7 +460,7 @@ function amountController(configService, $filter, gettextCatalog, $ionicHistory, if (confirmData.sendMax) { var wallet = lodash.find(profileService.getWallets({ coin: coin }), function(w) { - return w.id == vm.fromWalletId; + return w.id == passthroughParams.fromWalletId; }); var balance = parseFloat(wallet.cachedBalance.substring(0, wallet.cachedBalance.length-4)); @@ -583,7 +587,7 @@ function amountController(configService, $filter, gettextCatalog, $ionicHistory, }; function updateAvailableFundsStringIfNeeded() { - if (vm.fromWalletId && availableSatoshis !== null) { + if (passthroughParams.fromWalletId && availableSatoshis !== null) { availableFundsInFiat = ''; vm.availableFunds = availableFundsInCrypto; var coin = availableUnits[altUnitIndex].isFiat ? availableUnits[unitIndex].id : availableUnits[altUnitIndex].id; diff --git a/src/js/routes.js b/src/js/routes.js index e5430b5f5..7bb35a89f 100644 --- a/src/js/routes.js +++ b/src/js/routes.js @@ -287,7 +287,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr */ .state('tabs.send.amount', { - url: '/amount/:thirdParty/:fromWalletId/:toWalletId/:toAddress', + url: '/amount/:thirdPartyId/:thirdPartyOrderId/:fromWalletId/:maxAmount/:minAmount/:toWalletId/:toAddress', views: { 'tab-send@tabs': { controller: 'amountController', From e525b2e8addcb9fcd5d97c6a67c3cbc254c59c17 Mon Sep 17 00:00:00 2001 From: Brendon Duncan Date: Thu, 2 Aug 2018 18:14:54 +1200 Subject: [PATCH 113/256] UI for destination as wallet. --- src/js/controllers/review.controller.js | 85 ++++++++++++++++--------- src/js/routes.js | 2 +- www/views/review.html | 13 ++-- 3 files changed, 66 insertions(+), 34 deletions(-) diff --git a/src/js/controllers/review.controller.js b/src/js/controllers/review.controller.js index 9394b5ef2..686cb5787 100644 --- a/src/js/controllers/review.controller.js +++ b/src/js/controllers/review.controller.js @@ -10,8 +10,12 @@ function reviewController(configService, gettextCatalog, profileService, $scope, vm.destination = { address: '', balanceAmount: '', - balanceCurrecy: '', + balanceCurrency: '', + coin: '', color: '', + currency: '', + currencyColor: '', + kind: '', // 'address', 'contact', 'wallet' name: '' }; vm.feeCrypto = ''; @@ -29,6 +33,7 @@ function reviewController(configService, gettextCatalog, profileService, $scope, vm.secondaryAmount = ''; vm.secondaryCurrency = ''; + var config = null; var coin = ''; var originWalletId = ''; var priceDisplayIsFiat = true; @@ -54,61 +59,83 @@ function reviewController(configService, gettextCatalog, profileService, $scope, vm.origin.color = originWallet.color; vm.origin.name = originWallet.name; - destinationWalletId = data.stateParams.toWalletId; - if (destinationWalletId) { - var destinationWallet = profileService.getWallet(destinationWalletId); - vm.destination.color = destinationWallet.color; - vm.destination.name = destinationWallet.name; - - } - - configService.get(function onConfig(err, config) { + configService.get(function onConfig(err, configCache) { if (err) { $log.err('Error getting config.', err); } else { + config = configCache; priceDisplayIsFiat = config.wallet.settings.priceDisplay === 'fiat'; vm.origin.currencyColor = originWallet.coin === 'btc' ? config.bitcoinWalletColor : config.bitcoinCashWalletColor; } updateSendAmounts(); getOriginWalletBalance(originWallet); + handleDestinationAsWallet(data.stateParams.toWalletId); }); } function getOriginWalletBalance(originWallet) { - console.log('origin wallet error:', originWallet.error); + var balanceText = getWalletBalanceDisplayText(originWallet); + vm.origin.balanceAmount = balanceText.amount; + vm.origin.balanceCurrecny = balanceText.currency; + } + + function getWalletBalanceDisplayText(wallet) { var balanceCryptoAmount = ''; var balanceCryptoCurrencyCode = ''; var balanceFiatAmount = ''; var balanceFiatCurrency = '' + var displayAmount = ''; + var displayCurrency = ''; - var originWalletStatus = null; - if (originWallet.status.isValid) { - originWalletStatus = originWallet.status; - } else if (originWallet.cachedStatus.isValid) { - originWalletStatus = originWallet.cachedStatus; - } else { - vm.origin.balanceAmount = ''; - vm.origin.balanceCurrency = ''; - return; + var walletStatus = null; + if (wallet.status.isValid) { + walletStatus = wallet.status; + } else if (wallet.cachedStatus.isValid) { + walletStatus = wallet.cachedStatus; } - if (originWalletStatus) { - var cryptoBalanceParts = originWalletStatus.spendableBalanceStr.split(' '); + if (walletStatus) { + var cryptoBalanceParts = walletStatus.spendableBalanceStr.split(' '); balanceCryptoAmount = cryptoBalanceParts[0]; balanceCryptoCurrencyCode = cryptoBalanceParts.length > 1 ? cryptoBalanceParts[1] : ''; - if (originWalletStatus.alternativeBalanceAvailable) { - balanceFiatAmount = originWalletStatus.spendableBalanceAlternative; - balanceFiatCurrency = originWalletStatus.alternativeIsoCode; + if (walletStatus.alternativeBalanceAvailable) { + balanceFiatAmount = walletStatus.spendableBalanceAlternative; + balanceFiatCurrency = walletStatus.alternativeIsoCode; } } if (priceDisplayIsFiat) { - vm.origin.balanceAmount = balanceFiatAmount ? balanceFiatAmount : balanceCryptoAmount; - vm.origin.balanceCurrency = balanceFiatAmount ? balanceFiatCurrency : balanceCryptoCurrencyCode; + displayAmount = balanceFiatAmount ? balanceFiatAmount : balanceCryptoAmount; + displayCurrency = balanceFiatAmount ? balanceFiatCurrency : balanceCryptoCurrencyCode; } else { - vm.origin.balanceAmount = balanceCryptoAmount; - vm.origin.balanceCurrency = balanceCryptoCurrencyCode; + displayAmount = balanceCryptoAmount; + displayCurrency = balanceCryptoCurrencyCode; + } + + return { + amount: displayAmount, + currency: displayCurrency + }; + } + + function handleDestinationAsWallet(walletId) { + destinationWalletId = walletId; + if (destinationWalletId) { + var destinationWallet = profileService.getWallet(destinationWalletId); + vm.destination.coin = destinationWallet.coin; + vm.destination.color = destinationWallet.color; + vm.destination.currency = destinationWallet.coin.toUpperCase(); + vm.destination.kind = 'wallet'; + vm.destination.name = destinationWallet.name; + + if (config) { + vm.destination.currencyColor = vm.destination.coin === 'btc' ? config.bitcoinWalletColor : config.bitcoinCashWalletColor; + } + + var balanceText = getWalletBalanceDisplayText(destinationWallet); + vm.destination.balanceAmount = balanceText.amount; + vm.destination.balanceCurrency = balanceText.currency; } } diff --git a/src/js/routes.js b/src/js/routes.js index d38e0e0de..38941021c 100644 --- a/src/js/routes.js +++ b/src/js/routes.js @@ -317,7 +317,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr } }) .state('tabs.send.review', { - url: '/review/:coin/:fromWalletId/:amount/:useSendMax', + url: '/review/:amount/:fromWalletId/:sendMax/:toWalletId', views: { 'tab-send@tabs': { controller: 'reviewController', diff --git a/www/views/review.html b/www/views/review.html index 0ec643b8b..c1974a0dc 100644 --- a/www/views/review.html +++ b/www/views/review.html @@ -36,11 +36,16 @@
To:
- -

{{vm.destination.name}}

-

128.67

+ + +
+
+

{{vm.destination.name}} ({{vm.destination.currency}})

+

{{vm.destination.balanceAmount}} {{vm.destination.balanceCurrency}}

-
+
qz9cqq5pryv9hnqwa8q8mccmynk9uf4vlu5nxerpzmc
From aeb6efcdd0aef5153396b304564c31b391785cc1 Mon Sep 17 00:00:00 2001 From: Brendon Duncan Date: Thu, 2 Aug 2018 19:51:50 +1200 Subject: [PATCH 114/256] UI for sending to contact. --- src/js/controllers/review.controller.js | 71 +++++++++++++++++-------- src/js/routes.js | 2 +- 2 files changed, 51 insertions(+), 22 deletions(-) diff --git a/src/js/controllers/review.controller.js b/src/js/controllers/review.controller.js index 686cb5787..b81645488 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(configService, gettextCatalog, profileService, $scope, txFormatService) { +function reviewController(addressbookService, configService, profileService, $log, $scope, txFormatService) { var vm = this; vm.destination = { @@ -42,22 +42,20 @@ function reviewController(configService, gettextCatalog, profileService, $scope, var destinationWalletId = ''; - - $scope.$on("$ionicView.beforeEnter", onBeforeEnter); function onBeforeEnter(event, data) { - coin = data.stateParams.coin; originWalletId = data.stateParams.fromWalletId; satoshis = parseInt(data.stateParams.amount, 10); - toAddress = data.stateParams.toAddress; + toAddress = data.stateParams.toAddr; var originWallet = profileService.getWallet(originWalletId); vm.origin.currency = originWallet.coin.toUpperCase(); vm.origin.color = originWallet.color; vm.origin.name = originWallet.name; + coin = originWallet.coin; configService.get(function onConfig(err, configCache) { if (err) { @@ -69,6 +67,7 @@ function reviewController(configService, gettextCatalog, profileService, $scope, } updateSendAmounts(); getOriginWalletBalance(originWallet); + handleDestinationAsAddress(toAddress, coin); handleDestinationAsWallet(data.stateParams.toWalletId); }); } @@ -76,7 +75,7 @@ function reviewController(configService, gettextCatalog, profileService, $scope, function getOriginWalletBalance(originWallet) { var balanceText = getWalletBalanceDisplayText(originWallet); vm.origin.balanceAmount = balanceText.amount; - vm.origin.balanceCurrecny = balanceText.currency; + vm.origin.balanceCurrency = balanceText.currency; } function getWalletBalanceDisplayText(wallet) { @@ -119,24 +118,54 @@ function reviewController(configService, gettextCatalog, profileService, $scope, }; } + function handleDestinationAsAddress(address, originCoin) { + if (!address) { + return; + } + + // Check if the recipient is a contact + addressbookService.get(originCoin + address, function(err, contact) { + if (!err && contact) { + console.log('destination is contact'); + handleDestinationAsContact(contact); + } else { + console.log('destination is address'); + vm.destination.address = address; + vm.destination.kind = 'address'; + } + }); + + } + + function handleDestinationAsContact(contact) { + vm.destination.kind = 'contact'; + vm.destination.name = contact.name; + vm.destination.color = contact.coin === 'btc' ? config.bitcoinWalletColor : config.bitcoinCashWalletColor; + vm.destination.currency = contact.coin.toUpperCase(); + vm.destination.currencyColor = vm.destination.color; + } + function handleDestinationAsWallet(walletId) { destinationWalletId = walletId; - if (destinationWalletId) { - var destinationWallet = profileService.getWallet(destinationWalletId); - vm.destination.coin = destinationWallet.coin; - vm.destination.color = destinationWallet.color; - vm.destination.currency = destinationWallet.coin.toUpperCase(); - vm.destination.kind = 'wallet'; - vm.destination.name = destinationWallet.name; - - if (config) { - vm.destination.currencyColor = vm.destination.coin === 'btc' ? config.bitcoinWalletColor : config.bitcoinCashWalletColor; - } - - var balanceText = getWalletBalanceDisplayText(destinationWallet); - vm.destination.balanceAmount = balanceText.amount; - vm.destination.balanceCurrency = balanceText.currency; + if (!destinationWalletId) { + return; } + + console.log('destination is wallet'); + var destinationWallet = profileService.getWallet(destinationWalletId); + vm.destination.coin = destinationWallet.coin; + vm.destination.color = destinationWallet.color; + vm.destination.currency = destinationWallet.coin.toUpperCase(); + vm.destination.kind = 'wallet'; + vm.destination.name = destinationWallet.name; + + if (config) { + vm.destination.currencyColor = vm.destination.coin === 'btc' ? config.bitcoinWalletColor : config.bitcoinCashWalletColor; + } + + var balanceText = getWalletBalanceDisplayText(destinationWallet); + vm.destination.balanceAmount = balanceText.amount; + vm.destination.balanceCurrency = balanceText.currency; } function updateSendAmounts() { diff --git a/src/js/routes.js b/src/js/routes.js index 38941021c..4807fab5c 100644 --- a/src/js/routes.js +++ b/src/js/routes.js @@ -317,7 +317,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr } }) .state('tabs.send.review', { - url: '/review/:amount/:fromWalletId/:sendMax/:toWalletId', + url: '/review/:amount/:fromWalletId/:sendMax/:toAddr/:toWalletId', views: { 'tab-send@tabs': { controller: 'reviewController', From 4a1fd498f5952f18bb09f6e98ef13ba640477df4 Mon Sep 17 00:00:00 2001 From: Brendon Duncan Date: Thu, 2 Aug 2018 20:05:52 +1200 Subject: [PATCH 115/256] UI for sending to address. --- www/views/review.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/www/views/review.html b/www/views/review.html index c1974a0dc..36bb67410 100644 --- a/www/views/review.html +++ b/www/views/review.html @@ -35,7 +35,8 @@
To:
-
+
Date: Thu, 2 Aug 2018 15:15:23 +0200 Subject: [PATCH 116/256] thirdParty updates + shapeshift screens + merged with review transaction --- src/js/controllers/amount.js | 46 +++++++-- src/js/routes.js | 2 +- src/js/services/incomingData.js | 2 +- src/js/services/shapeshiftService.js | 141 ++++++++++++++++++++++++++- src/sass/views/shapeshift.scss | 4 + www/img/shapeshift_swap.png | Bin 0 -> 209589 bytes www/views/amount.html | 8 +- www/views/shapeshift.html | 4 +- 8 files changed, 187 insertions(+), 20 deletions(-) create mode 100644 www/img/shapeshift_swap.png diff --git a/src/js/controllers/amount.js b/src/js/controllers/amount.js index b623aa592..88d4901e9 100644 --- a/src/js/controllers/amount.js +++ b/src/js/controllers/amount.js @@ -2,7 +2,7 @@ angular.module('copayApp.controllers').controller('amountController', amountController); -function amountController(configService, $filter, gettextCatalog, $ionicHistory, $ionicModal, $ionicScrollDelegate, lodash, $log, nodeWebkitService, rateService, $scope, $state, $timeout, txFormatService, platformInfo, profileService, walletService, $window) { +function amountController(configService, $filter, gettextCatalog, $ionicHistory, $ionicModal, $ionicScrollDelegate, lodash, $log, nodeWebkitService, rateService, $scope, $state, $timeout, shapeshiftService, txFormatService, platformInfo, profileService, walletService, $window) { var vm = this; vm.allowSend = false; @@ -21,6 +21,7 @@ function amountController(configService, $filter, gettextCatalog, $ionicHistory, vm.maxAmount = 0; vm.minAmount = 0; vm.shapeshiftOrderId = ''; + vm.thirdParty = false; vm.unit = ''; vm.changeUnit = changeUnit; @@ -72,11 +73,39 @@ function amountController(configService, $filter, gettextCatalog, $ionicHistory, passthroughParams = data.stateParams; console.log('stateParams:', data.stateParams); + vm.fromWalletId = data.stateParams.fromWalletId; + vm.toWalletId = data.stateParams.toWalletId; vm.minAmount = parseFloat(data.stateParams.minAmount); vm.maxAmount = parseFloat(data.stateParams.maxAmount); - vm.shapeshiftOrderId = data.stateParams.thirdPartyOrderId; + + if (passthroughParams.thirdParty) { + vm.thirdParty = JSON.parse(passthroughParams.thirdParty); // Parse stringified JSON-object + if (vm.thirdParty) { + if (vm.thirdParty.id === 'shapeshift') { + if (!vm.thirdParty.data) { + vm.thirdParty.data = {}; + } + vm.thirdParty.data['fromWalletId'] = vm.fromWalletId; + + vm.fromWallet = profileService.getWallet(vm.fromWalletId); + vm.toWallet = profileService.getWallet(vm.toWalletId); + + shapeshiftService.getMarketData(vm.fromWallet.coin, vm.toWallet.coin, function(data) { + console.log(data); + vm.thirdParty.data['minAmount'] = vm.minAmount = parseFloat(data.minimum); + vm.thirdParty.data['maxAmount'] = vm.maxAmount = parseFloat(data.maxLimit); + }); + + // if (vm.thirdParty.data['shapeshiftOrderId'] && data.stateParams.shapeshiftOrderId.length > 0) { + // vm.shapeshiftOrderId = vm.thirdParty.data['shapeshiftOrderId']; + // } + } + } + } + // vm.shapeshiftOrderId = data.stateParams.thirdPartyOrderId; vm.isRequestingSpecificAmount = !data.stateParams.fromWalletId; + var config = configService.getSync().wallet.settings; setAvailableUnits(); @@ -335,8 +364,8 @@ function amountController(configService, $filter, gettextCatalog, $ionicHistory, if (a) { amountInCrypto = a; var amountInSatoshis = a * unitToSatoshi; - vm.fundsAreInsufficient = !!passthroughParams.fromWalletId - && availableSatoshis !== null + vm.fundsAreInsufficient = !!passthroughParams.fromWalletId + && availableSatoshis !== null && availableSatoshis < amountInSatoshis; vm.alternativeAmount = txFormatService.formatAmount(amountInSatoshis, true); @@ -356,8 +385,8 @@ function amountController(configService, $filter, gettextCatalog, $ionicHistory, } } else { amountInCrypto = result; - vm.fundsAreInsufficient = passthroughParams.fromWalletId - && availableSatoshis !== null + vm.fundsAreInsufficient = passthroughParams.fromWalletId + && availableSatoshis !== null && availableSatoshis < result * unitToSatoshi; vm.alternativeAmount = $filter('formatFiatAmount')(toFiat(result)); @@ -441,11 +470,14 @@ function amountController(configService, $filter, gettextCatalog, $ionicHistory, amount: useSendMax ? undefined : satoshis, fromWalletId: passthroughParams.fromWalletId, sendMax: useSendMax, - thirdPartyOrderId: passthroughParams.thirdPartyOrderId, toAddr: passthroughParams.toAddress, toWalletId: passthroughParams.toWalletId }; + if (vm.thirdParty) { + confirmData['thirdParty'] = JSON.stringify(this.thirdParty); + } + console.log('confirmData:', confirmData); if (!confirmData.fromWalletId) { diff --git a/src/js/routes.js b/src/js/routes.js index 286042266..d9c900e34 100644 --- a/src/js/routes.js +++ b/src/js/routes.js @@ -287,7 +287,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr */ .state('tabs.send.amount', { - url: '/amount/:thirdPartyId/:thirdPartyOrderId/:fromWalletId/:maxAmount/:minAmount/:toWalletId/:toAddress', + url: '/amount/:thirdParty/:fromWalletId/:maxAmount/:minAmount/:toWalletId/:toAddress', views: { 'tab-send@tabs': { controller: 'amountController', diff --git a/src/js/services/incomingData.js b/src/js/services/incomingData.js index 7a9e67fe7..fb8d8868a 100644 --- a/src/js/services/incomingData.js +++ b/src/js/services/incomingData.js @@ -86,7 +86,6 @@ angular.module('copayApp.services').factory('incomingData', function($log, $stat $state.transitionTo('tabs.send.origin', { amount: amount, toAddress: addr, - displayAddress: originalAddress ? originalAddress : addr, description: message, coin: coin }); @@ -109,6 +108,7 @@ angular.module('copayApp.services').factory('incomingData', function($log, $stat // params['thirdParty']['minShapeshiftAmount'] = serviceData.minAmount; // params['thirdParty']['maxShapeshiftAmount'] = serviceData.maxAmount; // params['thirdParty']['shapeshiftOrderId'] = serviceData.orderId; + params['thirdParty'] = JSON.stringify(params['thirdParty']); $state.transitionTo('tabs.send.amount', params); } else { $state.transitionTo('tabs.send.origin', params); diff --git a/src/js/services/shapeshiftService.js b/src/js/services/shapeshiftService.js index 8a9b8fcaa..41af14002 100644 --- a/src/js/services/shapeshiftService.js +++ b/src/js/services/shapeshiftService.js @@ -1,7 +1,143 @@ 'use strict'; -angular.module('copayApp.services').factory('shapeshiftService', function($http, $log, lodash, moment, storageService, configService, platformInfo, servicesService) { +angular.module('copayApp.services').factory('shapeshiftService', function($http, $log, lodash, moment, ongoingProcess, shapeshiftApiService, storageService, configService, platformInfo, servicesService) { var root = {}; - var credentials = {}; + root.ShiftState = 'Shift'; + root.withdrawalAddress = '' + root.returnAddress = '' + root.amount = ''; + root.marketData = {} + this.withdrawalAddress = function(address) { + root.withdrawalAddress = address; + }; + this.returnAddress = function(address) { + root.returnAddress = address; + }; + this.amount = function(amount) { + root.amount = amount; + }; + this.fromWalletId = function(id) { + root.fromWalletId = id; + }; + this.toWalletId = function(id) { + root.toWalletId = id; + }; + + root.getMarketDataIn = function(coin) { + if(coin === root.coinOut) return root.getMarketData(root.coinOut, root.coinIn); + return root.getMarketData(coin, root.coinOut); + }; + root.getMarketDataOut = function(coin) { + if(coin === root.coinIn) return root.getMarketData(root.coinOut, root.coinIn); + return root.getMarketData(root.coinIn, coin); + }; + root.getMarketData = function(coinIn, coinOut, cb) { + root.coinIn = coinIn; + root.coinOut= coinOut; + if(root.coinIn === undefined || root.coinOut === undefined) return; + shapeshiftApiService + .marketInfo(root.coinIn, root.coinOut) + .then(function(marketData){ + root.marketData = marketData; + root.rateString = root.marketData.rate.toString() + ' ' + coinOut.toUpperCase() + '/' + coinIn.toUpperCase(); + if (cb) { + cb(marketData); + } + }); + }; + + /*shapeshiftApiService.coins().then(function(coins){ + root.coins = coins; + root.coinIn = coins['BTC'].symbol; + root.coinOut = coins['BCH'].symbol; + root.getMarketData(root.coinIn, root.coinOut); + });*/ + + root.coins = { + 'BTC': { name: 'Bitcoin', symbol: 'BTC' }, + 'BCH': { name: 'Bitcoin Cash', symbol: 'BCH' } + }; + + function checkForError(data){ + if(data.error) return true; + return false; + } + + root.shiftIt = function(){ + ongoingProcess.set('connectingShapeshift', true); + var validate=shapeshiftApiService.ValidateAddress(root.withdrawalAddress, root.coinOut); + validate.then(function(valid){ + //console.log(root.withdrawalAddress) + //console.log(valid) + var tx = ShapeShift(); + tx.then(function(txData){ + if(txData['fixedTxData']){ + txData = txData.fixedTxData; + if(checkForError(txData)) return; + //console.log(txData) + var coinPair=txData.pair.split('_'); + txData.depositType = coinPair[0].toUpperCase(); + txData.withdrawalType = coinPair[1].toUpperCase(); + var coin = root.coins[txData.depositType].name.toLowerCase(); + //console.log(coin) + txData.depositQR = coin + ":" + txData.deposit + "?amount=" + txData.depositAmount + root.txFixedPending = true; + } else if(txData['normalTxData']){ + txData = txData.normalTxData; + if(checkForError(txData)) return; + var coin = root.coins[txData.depositType.toUpperCase()].name.toLowerCase(); + txData.depositQR = coin + ":" + txData.deposit; + } else if(txData['cancelTxData']){ + if(checkForError(txData.cancelTxData)) return; + if(root.txFixedPending) { + $interval.cancel(root.txInterval); + root.txFixedPending = false; + } + root.ShiftState = 'Shift'; + return; + } + root.depositInfo = txData; + //console.log(root.marketData); + //console.log(root.depositInfo); + var sendAddress = txData.depositQR; + if (sendAddress && sendAddress.indexOf('bitcoin cash') >= 0) + sendAddress = sendAddress.replace('bitcoin cash', 'bitcoincash'); + + var shapeshiftData = { + fromWalletId: root.fromWalletId, + minAmount: root.marketData.minimum, + maxAmount: root.marketData.maxLimit, + orderId: root.depositInfo.orderId + }; + + if (incomingData.redir(sendAddress, shapeshiftData)) { + ongoingProcess.set('connectingShapeshift', false); + return; + } + + /*root.ShiftState = 'Cancel'; + root.GetStatus(); + root.txInterval=$interval(root.GetStatus, 8000);*/ + }); + }) + }; + + function ShapeShift() { + if(root.ShiftState === 'Cancel') return shapeshiftApiService.CancelTx(root); + if(parseFloat(root.amount) > 0) return shapeshiftApiService.FixedAmountTx(root); + return shapeshiftApiService.NormalTx(root); + } + + root.GetStatus = function(){ + var address = root.depositInfo.deposit + shapeshiftApiService.GetStatusOfDepositToAddress(address).then(function(data){ + root.DepositStatus = data; + if(root.DepositStatus.status === 'complete'){ + $interval.cancel(root.txInterval); + root.depositInfo = null; + root.ShiftState = 'Shift' + } + }); + }; var servicesItem = { name: 'shapeshift', @@ -13,7 +149,6 @@ angular.module('copayApp.services').factory('shapeshiftService', function($http, var register = function() { servicesService.register(servicesItem); }; - register(); return root; }); diff --git a/src/sass/views/shapeshift.scss b/src/sass/views/shapeshift.scss index 8b4b941ab..1054fece2 100644 --- a/src/sass/views/shapeshift.scss +++ b/src/sass/views/shapeshift.scss @@ -1,4 +1,8 @@ #shapeshift { + .swap-image { + width: 70%; + max-width: 400px; + } .empty-case { @include empty-case(); } diff --git a/www/img/shapeshift_swap.png b/www/img/shapeshift_swap.png new file mode 100644 index 0000000000000000000000000000000000000000..83905b75141199bfdc0831c1a3cc309317da07dc GIT binary patch literal 209589 zcmeFZW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0f 100644 --- a/www/views/amount.html +++ b/www/views/amount.html @@ -6,15 +6,11 @@ - +

-
diff --git a/www/views/shapeshift.html b/www/views/shapeshift.html index 2382f9897..81e502631 100644 --- a/www/views/shapeshift.html +++ b/www/views/shapeshift.html @@ -11,8 +11,8 @@
-
- Your Bitcoin wallet is empty +
+
From aacc80ea218b678d6c26e9a591b44d118bf48e79 Mon Sep 17 00:00:00 2001 From: Sebastiaan Pasma Date: Thu, 2 Aug 2018 15:42:35 +0200 Subject: [PATCH 117/256] shapeshift flow --- src/js/controllers/amount.js | 3 +-- src/js/controllers/review.controller.js | 17 ++++++++++++++++- src/js/routes.js | 2 +- src/sass/views/amount.scss | 3 +++ src/sass/views/shapeshift.scss | 3 +++ www/views/amount.html | 6 +++--- www/views/review.html | 3 ++- www/views/shapeshift.html | 4 +--- .../shapeshift-header.html} | 0 www/views/walletSelector.html | 2 +- 10 files changed, 31 insertions(+), 12 deletions(-) rename www/views/{header-thirdparty.html => thirdparty/shapeshift-header.html} (100%) diff --git a/src/js/controllers/amount.js b/src/js/controllers/amount.js index 88d4901e9..576fb4500 100644 --- a/src/js/controllers/amount.js +++ b/src/js/controllers/amount.js @@ -506,8 +506,7 @@ function amountController(configService, $filter, gettextCatalog, $ionicHistory, } } - $state.transitionTo('tabs.send.review', confirmData); - } + $state.transitionTo('tabs.send.review', confirmData); $scope.useSendMax = null; } }; diff --git a/src/js/controllers/review.controller.js b/src/js/controllers/review.controller.js index b81645488..edf7787d5 100644 --- a/src/js/controllers/review.controller.js +++ b/src/js/controllers/review.controller.js @@ -6,7 +6,7 @@ angular function reviewController(addressbookService, configService, profileService, $log, $scope, txFormatService) { var vm = this; - + vm.destination = { address: '', balanceAmount: '', @@ -32,6 +32,7 @@ function reviewController(addressbookService, configService, profileService, $lo vm.primaryCurrency = ''; vm.secondaryAmount = ''; vm.secondaryCurrency = ''; + vm.thirdParty = false; var config = null; var coin = ''; @@ -57,6 +58,20 @@ function reviewController(addressbookService, configService, profileService, $lo vm.origin.name = originWallet.name; coin = originWallet.coin; + if (data.stateParams.thirdParty) { + vm.thirdParty = JSON.parse(data.stateParams.thirdParty); // Parse stringified JSON-object + if (vm.thirdParty) { + if (vm.thirdParty.id === 'shapeshift') { + if (!vm.thirdParty.data) { + vm.thirdParty.data = {}; + } + vm.thirdParty.data['fromWalletId'] = vm.fromWalletId; + vm.fromWallet = profileService.getWallet(vm.fromWalletId); + vm.toWallet = profileService.getWallet(vm.toWalletId); + } + } + } + configService.get(function onConfig(err, configCache) { if (err) { $log.err('Error getting config.', err); diff --git a/src/js/routes.js b/src/js/routes.js index d9c900e34..905683dcb 100644 --- a/src/js/routes.js +++ b/src/js/routes.js @@ -345,7 +345,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr } }) .state('tabs.send.review', { - url: '/review/:amount/:fromWalletId/:sendMax/:toAddr/:toWalletId', + url: '/review/:thirdParty/:amount/:fromWalletId/:sendMax/:toAddr/:toWalletId', views: { 'tab-send@tabs': { controller: 'reviewController', diff --git a/src/sass/views/amount.scss b/src/sass/views/amount.scss index daf6cf4fe..ca32c6ac4 100644 --- a/src/sass/views/amount.scss +++ b/src/sass/views/amount.scss @@ -254,6 +254,9 @@ padding: 0 6px 6px 6px; text-align: center; } + &__max { + float: right; + } } .send-amount-tool { diff --git a/src/sass/views/shapeshift.scss b/src/sass/views/shapeshift.scss index 1054fece2..158babb16 100644 --- a/src/sass/views/shapeshift.scss +++ b/src/sass/views/shapeshift.scss @@ -15,4 +15,7 @@ border: 0px; @include button-shadow(); } +} +.header.shapeshift { + background: #243F5D; } \ No newline at end of file diff --git a/www/views/amount.html b/www/views/amount.html index e5df7dc0f..48637ec1b 100644 --- a/www/views/amount.html +++ b/www/views/amount.html @@ -6,17 +6,17 @@ -
+
- {{vm.amount}} {{vm.unit}} + {{vm.amount || '0'}} {{vm.unit}}
{{vm.globalResult}} {{vm.unit}}
diff --git a/www/views/review.html b/www/views/review.html index 36bb67410..b9c190ab5 100644 --- a/www/views/review.html +++ b/www/views/review.html @@ -9,7 +9,8 @@ -
+
+

You are sending

{{vm.primaryAmount}} {{vm.primaryCurrency}}

diff --git a/www/views/shapeshift.html b/www/views/shapeshift.html index 81e502631..764ef8851 100644 --- a/www/views/shapeshift.html +++ b/www/views/shapeshift.html @@ -7,9 +7,7 @@ -
- -
+
diff --git a/www/views/header-thirdparty.html b/www/views/thirdparty/shapeshift-header.html similarity index 100% rename from www/views/header-thirdparty.html rename to www/views/thirdparty/shapeshift-header.html diff --git a/www/views/walletSelector.html b/www/views/walletSelector.html index a4cc4db81..49a7ba208 100644 --- a/www/views/walletSelector.html +++ b/www/views/walletSelector.html @@ -4,7 +4,7 @@ -
+
Paying
$... USD
From f49e8725e8543f852f612b069b561d23bbe4c833 Mon Sep 17 00:00:00 2001 From: Sebastiaan Pasma Date: Thu, 2 Aug 2018 16:05:12 +0200 Subject: [PATCH 118/256] Translations additions + some (s)css + review transaction changes --- i18n/po/template.pot | 19 ++++++++++++++++++- src/js/controllers/review.controller.js | 4 +++- src/sass/views/review.scss | 4 ++++ src/sass/views/shapeshift.scss | 6 ++++-- www/views/review.html | 16 +++------------- www/views/shapeshift.html | 5 ++--- 6 files changed, 34 insertions(+), 20 deletions(-) diff --git a/i18n/po/template.pot b/i18n/po/template.pot index 2e7cedcbe..ecf44efe9 100644 --- a/i18n/po/template.pot +++ b/i18n/po/template.pot @@ -2651,6 +2651,7 @@ msgid "You can receive bitcoin from any wallet or service." msgstr "" #: www/views/tab-send.html:72 +#: www/views/shapeshift.html:23 msgid "To get started, you'll need to create a bitcoin wallet and get some bitcoin." msgstr "" @@ -3116,6 +3117,18 @@ msgstr "" msgid "Start ShapeShift" msgstr "" +#: www/views/shapeshift.html:30 +msgid "Exchange your BTC to BCH in minutes." +msgstr "" + +#: www/views/shapeshift.html:30 +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." +msgstr "" + #: www/views/shapeshift.html:34 msgid "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." msgstr "" @@ -3720,10 +3733,14 @@ msgstr "" msgid "Review Transaction" msgstr "" -#: www/views/review.html:14 +#: src/js/controllers/review.controller.js:36 msgid "You are sending" msgstr "" +#: src/js/controllers/review.controller.js:66 +msgid "You are shifting" +msgstr "" + #: www/views/review.html:22 msgid "From:" msgstr "" diff --git a/src/js/controllers/review.controller.js b/src/js/controllers/review.controller.js index edf7787d5..473ac4452 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, gettextCatalog, profileService, $log, $scope, txFormatService) { var vm = this; vm.destination = { @@ -33,6 +33,7 @@ function reviewController(addressbookService, configService, profileService, $lo vm.secondaryAmount = ''; vm.secondaryCurrency = ''; vm.thirdParty = false; + vm.sendingTitle = gettextCatalog.getString('You are sending'); var config = null; var coin = ''; @@ -62,6 +63,7 @@ function reviewController(addressbookService, configService, profileService, $lo vm.thirdParty = JSON.parse(data.stateParams.thirdParty); // Parse stringified JSON-object if (vm.thirdParty) { if (vm.thirdParty.id === 'shapeshift') { + vm.sendingTitle = gettextCatalog.getString('You are shifting'); if (!vm.thirdParty.data) { vm.thirdParty.data = {}; } diff --git a/src/sass/views/review.scss b/src/sass/views/review.scss index 67733fe22..22470a7b2 100644 --- a/src/sass/views/review.scss +++ b/src/sass/views/review.scss @@ -10,4 +10,8 @@ position: absolute; bottom: 92px; } + + .shapeshift-banner { + box-shadow: none; + } } \ No newline at end of file diff --git a/src/sass/views/shapeshift.scss b/src/sass/views/shapeshift.scss index 158babb16..ee4cd0b0f 100644 --- a/src/sass/views/shapeshift.scss +++ b/src/sass/views/shapeshift.scss @@ -1,7 +1,8 @@ #shapeshift { .swap-image { - width: 70%; + width: auto; max-width: 400px; + max-height: 25vh; } .empty-case { @include empty-case(); @@ -17,5 +18,6 @@ } } .header.shapeshift { - background: #243F5D; + background: url(../img/shapeshiftbg.jpg) center center no-repeat #28394d; + opacity: 0.99; } \ No newline at end of file diff --git a/www/views/review.html b/www/views/review.html index b9c190ab5..e398e68a1 100644 --- a/www/views/review.html +++ b/www/views/review.html @@ -12,7 +12,7 @@
-

You are sending

+

{{vm.sendingTitle}}

{{vm.primaryAmount}} {{vm.primaryCurrency}}

{{vm.secondaryAmount}} {{vm.secondaryCurrency}}

@@ -84,13 +84,13 @@ {{buttonText}} @@ -104,14 +104,4 @@ Proposal Created Transaction Created - - - - diff --git a/www/views/shapeshift.html b/www/views/shapeshift.html index 764ef8851..61ad0952e 100644 --- a/www/views/shapeshift.html +++ b/www/views/shapeshift.html @@ -13,12 +13,11 @@
+

Exchange your BTC to BCH in minutes.

-

Before exchanging your BTC to BCH, you will need to add funds to your wallet.

-

You can receive Bitcoin from any wallet or service.

+

To start the process you need to add funds to your wallet.

-

Using Shapeshift will allow you to exchange your BTC for BCH.

The process is fast and you will receive the exchanged amount in your wallet.

To get started, you'll need to create a bitcoin wallet and get some bitcoin.
From eef84b25f80063b547b078406247e4e10a350fee Mon Sep 17 00:00:00 2001 From: Sebastiaan Pasma Date: Thu, 2 Aug 2018 18:30:35 +0200 Subject: [PATCH 119/256] update to txp creation. merged and refactored many features from confirm.js --- src/js/controllers/confirm.js | 3 +- src/js/controllers/review.controller.js | 425 +++++++++++++++++++++- src/js/directives/shapeshiftCoinTrader.js | 2 +- src/js/services/shapeshiftService.js | 2 +- www/views/review.html | 16 +- 5 files changed, 428 insertions(+), 20 deletions(-) diff --git a/src/js/controllers/confirm.js b/src/js/controllers/confirm.js index 762bfe42b..07256c0b2 100644 --- a/src/js/controllers/confirm.js +++ b/src/js/controllers/confirm.js @@ -140,7 +140,7 @@ angular.module('copayApp.controllers').controller('confirmController', function( return cb(); }); - } + }; $scope.$on("$ionicView.beforeEnter", function(event, data) { $scope.fromWallet = profileService.getWallet(data.stateParams.fromWalletId); // Wallet to send from @@ -463,7 +463,6 @@ angular.module('copayApp.controllers').controller('confirmController', function( } }; - $scope.toggleAddress = function() { $scope.showAddress = !$scope.showAddress; }; diff --git a/src/js/controllers/review.controller.js b/src/js/controllers/review.controller.js index 473ac4452..f0a0ec2ae 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, gettextCatalog, profileService, $log, $scope, txFormatService) { +function reviewController($log, $scope, $ionicLoading, $ionicModal, $timeout, addressbookService, bitcoinCashJsService, bitcore, bitcoreCash, configService, feeService, gettextCatalog, lodash, ongoingProcess, platformInfo, profileService, walletService, txFormatService) { var vm = this; vm.destination = { @@ -20,6 +20,8 @@ function reviewController(addressbookService, configService, gettextCatalog, pro }; vm.feeCrypto = ''; vm.feeFiat = ''; + vm.fiatCurrency = ''; + vm.feeLessThanACent = false; vm.origin = { balanceAmount: '', balanceCurrency: '', @@ -28,21 +30,30 @@ function reviewController(addressbookService, configService, gettextCatalog, pro currencyColor: '', name: '', }; + vm.isCordova = platformInfo.isCordova; vm.primaryAmount = ''; vm.primaryCurrency = ''; + vm.usingMerchantFee = false; vm.secondaryAmount = ''; vm.secondaryCurrency = ''; vm.thirdParty = false; vm.sendingTitle = gettextCatalog.getString('You are sending'); + vm.buttonText = ''; var config = null; var coin = ''; + var countDown = null; + var usingCustomFee = false; + var usingMerchantFee = false; + var destinationWalletId = ''; var originWalletId = ''; + var originWallet; var priceDisplayIsFiat = true; var satoshis = null; var toAddress = ''; - var destinationWalletId = ''; + var tx = {}; + var FEE_TOO_HIGH_LIMIT_PERCENTAGE = 15; $scope.$on("$ionicView.beforeEnter", onBeforeEnter); @@ -53,7 +64,7 @@ function reviewController(addressbookService, configService, gettextCatalog, pro satoshis = parseInt(data.stateParams.amount, 10); toAddress = data.stateParams.toAddr; - var originWallet = profileService.getWallet(originWalletId); + originWallet = profileService.getWallet(originWalletId); vm.origin.currency = originWallet.coin.toUpperCase(); vm.origin.color = originWallet.color; vm.origin.name = originWallet.name; @@ -68,8 +79,6 @@ function reviewController(addressbookService, configService, gettextCatalog, pro vm.thirdParty.data = {}; } vm.thirdParty.data['fromWalletId'] = vm.fromWalletId; - vm.fromWallet = profileService.getWallet(vm.fromWalletId); - vm.toWallet = profileService.getWallet(vm.toWalletId); } } } @@ -86,15 +95,186 @@ function reviewController(addressbookService, configService, gettextCatalog, pro getOriginWalletBalance(originWallet); handleDestinationAsAddress(toAddress, coin); handleDestinationAsWallet(data.stateParams.toWalletId); + createVanityTransaction(data); }); - } + } + vm.chooseFeeLevel = function(tx, wallet) { + + if (wallet.coin == 'bch') return; + if (usingMerchantFee) return; + + var scope = $rootScope.$new(true); + scope.network = tx.network; + scope.feeLevel = tx.feeLevel; + scope.noSave = true; + scope.coin = originWallet.coin; + + if (usingCustomFee) { + scope.customFeePerKB = tx.feeRate; + scope.feePerSatByte = tx.feeRate / 1000; + } + + $ionicModal.fromTemplateUrl('views/modals/chooseFeeLevel.html', { + scope: scope, + backdropClickToClose: false, + hardwareBackButtonClose: false + }).then(function(modal) { + scope.chooseFeeLevelModal = modal; + scope.openModal(); + }); + scope.openModal = function() { + scope.chooseFeeLevelModal.show(); + }; + + scope.hideModal = function(newFeeLevel, customFeePerKB) { + scope.chooseFeeLevelModal.hide(); + $log.debug('New fee level choosen:' + newFeeLevel + ' was:' + tx.feeLevel); + + usingCustomFee = newFeeLevel == 'custom' ? true : false; + + if (tx.feeLevel == newFeeLevel && !usingCustomFee) return; + + tx.feeLevel = newFeeLevel; + if (usingCustomFee) tx.feeRate = parseInt(customFeePerKB); + + updateTx(tx, originWallet, { + clearCache: true, + dryRun: true + }, function() {}); + }; + }; + + function createVanityTransaction(data) { + var configFeeLevel = config.wallet.settings.feeLevel ? config.wallet.settings.feeLevel : 'normal'; + + // Grab stateParams + tx = { + amount: parseInt(data.stateParams.amount), + sendMax: data.stateParams.useSendMax == 'true' ? true : false, + fromWalletId: data.stateParams.fromWalletId, + toAddress: data.stateParams.toAddress, + feeLevel: configFeeLevel, + spendUnconfirmed: config.wallet.spendUnconfirmed, + + // Vanity tx info (not in the real tx) + recipientType: vm.destination.kind || null, + toName: vm.destination.name || null, + toEmail: vm.destination.email || null, + toColor: vm.destination.color || null, + network: false, + coin: originWallet.coin, + txp: {}, + }; + + if (data.stateParams.requiredFeeRate) { + vm.usingMerchantFee = true; + tx.feeRate = parseInt(data.stateParams.requiredFeeRate); + } + + if (tx.coin && tx.coin === 'bch') { + tx.feeLevel = 'normal'; + } + + var B = data.stateParams.coin === 'bch' ? bitcoreCash : bitcore; + var networkName; + try { + if (vm.destination.kind === 'wallet') { // There is a wallet-to-wallet transfer + $ionicLoading.show(); + var toWallet = profileService.getWallet(data.stateParams.toWalletId); + + // We need an address to send to, so we ask the walletService to create a new address for the toWallet. + walletService.getAddress(toWallet, true, function (err, addr) { + $ionicLoading.hide(); + tx.toAddress = addr; + networkName = (new B.Address(tx.toAddress)).network.name; + tx.network = networkName; + setupTx(tx); + }); + } else { // This is a Wallet-to-address transfer + networkName = (new B.Address(tx.toAddress)).network.name; + tx.network = networkName; + setupTx(tx); + } + } catch (e) { + var message = gettextCatalog.getString('Invalid address'); + popupService.showAlert(null, message, function () { + $ionicHistory.nextViewOptions({ + disableAnimate: true, + historyRoot: true + }); + $state.go('tabs.send').then(function () { + $ionicHistory.clearHistory(); + }); + }); + return; + } + } function getOriginWalletBalance(originWallet) { var balanceText = getWalletBalanceDisplayText(originWallet); vm.origin.balanceAmount = balanceText.amount; vm.origin.balanceCurrency = balanceText.currency; } + function getSendMaxInfo(tx, wallet, cb) { + if (!tx.sendMax) return cb(); + + //ongoingProcess.set('retrievingInputs', true); + walletService.getSendMaxInfo(wallet, { + feePerKb: tx.feeRate, + excludeUnconfirmedUtxos: !tx.spendUnconfirmed, + returnInputs: true, + }, cb); + }; + + function getTxp(tx, wallet, dryRun, cb) { + + // ToDo: use a credential's (or fc's) function for this + if (tx.description && !wallet.credentials.sharedEncryptingKey) { + var msg = gettextCatalog.getString('Could not add message to imported wallet without shared encrypting key'); + $log.warn(msg); + return setSendError(msg); + } + + if (tx.amount > Number.MAX_SAFE_INTEGER) { + var msg = gettextCatalog.getString('Amount too big'); + $log.warn(msg); + return setSendError(msg); + } + + var txp = {}; + + txp.outputs = [{ + 'toAddress': tx.toAddress, + 'amount': tx.amount, + 'message': tx.description + }]; + + if (tx.sendMaxInfo) { + txp.inputs = tx.sendMaxInfo.inputs; + txp.fee = tx.sendMaxInfo.fee; + } else { + if (usingCustomFee || usingMerchantFee) { + txp.feePerKb = tx.feeRate; + } else txp.feeLevel = tx.feeLevel; + } + + txp.message = tx.description; + + if (tx.paypro) { + txp.payProUrl = tx.paypro.url; + } + txp.excludeUnconfirmedUtxos = !tx.spendUnconfirmed; + txp.dryRun = dryRun; + walletService.createTx(wallet, txp, function(err, ctxp) { + if (err) { + setSendError(err); + return cb(err); + } + return cb(null, ctxp); + }); + }; + function getWalletBalanceDisplayText(wallet) { var balanceCryptoAmount = ''; var balanceCryptoCurrencyCode = ''; @@ -157,7 +337,8 @@ function reviewController(addressbookService, configService, gettextCatalog, pro function handleDestinationAsContact(contact) { vm.destination.kind = 'contact'; vm.destination.name = contact.name; - vm.destination.color = contact.coin === 'btc' ? config.bitcoinWalletColor : config.bitcoinCashWalletColor; + vm.destination.email = contact.email; + vm.destination.color = contact.coin === 'btc' ? config.bitcoinWalletColor : config.bitcoinCashWalletColor; vm.destination.currency = contact.coin.toUpperCase(); vm.destination.currencyColor = vm.destination.color; } @@ -228,4 +409,234 @@ function reviewController(addressbookService, configService, gettextCatalog, pro }); } + function setButtonText(isMultisig, isPayPro) { + if (isPayPro) { + if (vm.isCordova) { + vm.buttonText = gettextCatalog.getString('Slide to pay'); + } else { + vm.buttonText = gettextCatalog.getString('Click to pay'); + } + } else if (isMultisig) { + if (vm.isCordova) { + vm.buttonText = gettextCatalog.getString('Slide to accept'); + } else { + vm.buttonText = gettextCatalog.getString('Click to accept'); + } + } else { + if (vm.isCordova) { + vm.buttonText = gettextCatalog.getString('Slide to send'); + } else { + vm.buttonText = gettextCatalog.getString('Click to send'); + } + } + } + + function setupTx(tx) { + if (tx.coin === 'bch') { + tx.displayAddress = bitcoinCashJsService.readAddress(tx.toAddress).cashaddr; + } else { + tx.displayAddress = entry.address; + } + + addressbookService.get(tx.coin+tx.toAddress, function(err, addr) { // Check if the recipient is a contact + if (!err && addr) { + tx.toName = addr.name; + tx.toEmail = addr.email; + tx.recipientType = 'contact'; + } + }); + + // Other Scope vars + vm.showAddress = false; + + + setButtonText(originWallet.credentials.m > 1, !!tx.paypro); + + if (tx.paypro) + _paymentTimeControl(tx.paypro.expires); + + updateTx(tx, originWallet, { + dryRun: true + }, function(err) { + $timeout(function() { + $scope.$apply(); + }, 10); + + }); + + // setWalletSelector(tx.coin, tx.network, tx.amount, function(err) { + // if (err) { + // return exitWithError('Could not update wallets'); + // } + // + // if (vm.wallets.length > 1) { + // vm.showWalletSelector(); + // } else if (vm.wallets.length) { + // setWallet(vm.wallets[0], tx); + // } + // }); + } + function updateTx(tx, wallet, opts, cb) { + ongoingProcess.set('calculatingFee', true); + + if (opts.clearCache) { + tx.txp = {}; + } + + // $scope.tx = tx; + + // function updateAmount() { + // if (!tx.amount) return; + // + // // Amount + // tx.amountStr = txFormatService.formatAmountStr(originWallet.coin, tx.amount); + // tx.amountValueStr = tx.amountStr.split(' ')[0]; + // tx.amountUnitStr = tx.amountStr.split(' ')[1]; + // txFormatService.formatAlternativeStr(wallet.coin, tx.amount, function(v) { + // var parts = v.split(' '); + // tx.alternativeAmountStr = v; + // tx.alternativeAmountValueStr = parts[0]; + // tx.alternativeAmountUnitStr = (parts.length > 0) ? parts[1] : ''; + // }); + // } + // + // updateAmount(); + // refresh(); + + // End of quick refresh, before wallet is selected. + if (!wallet) { + ongoingProcess.set('calculatingFee', false); + return cb(); + } + + var feeServiceLevel = usingMerchantFee && originWallet.coin == 'btc' ? 'urgent' : tx.feeLevel; + feeService.getFeeRate(originWallet.coin, tx.network, feeServiceLevel, function(err, feeRate) { + if (err) { + ongoingProcess.set('calculatingFee', false); + return cb(err); + } + + var msg; + if (usingCustomFee) { + msg = gettextCatalog.getString('Custom'); + tx.feeLevelName = msg; + } else if (usingMerchantFee) { + $log.info('Using Merchant Fee:' + tx.feeRate + ' vs. Urgent level:' + feeRate); + msg = gettextCatalog.getString('Suggested by Merchant'); + tx.feeLevelName = msg; + } else { + tx.feeLevelName = feeService.feeOpts[tx.feeLevel]; + tx.feeRate = feeRate; + } + + getSendMaxInfo(lodash.clone(tx), wallet, function(err, sendMaxInfo) { + if (err) { + ongoingProcess.set('calculatingFee', false); + var msg = gettextCatalog.getString('Error getting SendMax information'); + return setSendError(msg); + } + + if (sendMaxInfo) { + + $log.debug('Send max info', sendMaxInfo); + + if (tx.sendMax && sendMaxInfo.amount == 0) { + ongoingProcess.set('calculatingFee', false); + setNoWallet(gettextCatalog.getString('Insufficient confirmed funds')); + popupService.showAlert(gettextCatalog.getString('Error'), gettextCatalog.getString('Not enough funds for fee')); + return cb('no_funds'); + } + + tx.sendMaxInfo = sendMaxInfo; + tx.amount = tx.sendMaxInfo.amount; + updateAmount(); + ongoingProcess.set('calculatingFee', false); + $timeout(function() { + showSendMaxWarning(wallet, sendMaxInfo); + }, 200); + } + + // txp already generated for this wallet? + if (tx.txp[wallet.id]) { + ongoingProcess.set('calculatingFee', false); + updateSendAmounts(); + return cb(); + } + + getTxp(lodash.clone(tx), wallet, opts.dryRun, function(err, txp) { + ongoingProcess.set('calculatingFee', false); + if (err) { + if (err.message == 'Insufficient funds') { + setNoWallet(gettextCatalog.getString('Insufficient funds')); + popupService.showAlert(gettextCatalog.getString('Error'), gettextCatalog.getString('Not enough funds for fee')); + return cb('no_funds'); + } else + return cb(err); + } + + txp.feeStr = txFormatService.formatAmountStr(wallet.coin, txp.fee); + txFormatService.formatAlternativeStr(wallet.coin, txp.fee, function(v) { + // txp.alternativeFeeStr = v; + // if (txp.alternativeFeeStr.substring(0, 4) == '0.00') + // txp.alternativeFeeStr = '< ' + txp.alternativeFeeStr; + vm.feeFiat = v; + vm.fiatCurrency = config.wallet.settings.alternativeIsoCode; + if (v.substring(0, 1) === "<") { + vm.feeLessThanACent = true; + } + + console.log("fiat", vm.feeFiat); + + }); + + var per = (txp.fee / (txp.amount + txp.fee) * 100); + var perString = per.toFixed(2); + txp.feeRatePerStr = (perString == '0.00' ? '< ' : '') + perString + '%'; + txp.feeToHigh = per > FEE_TOO_HIGH_LIMIT_PERCENTAGE; + vm.feeCrypto = txp.fee; + console.log("crypto", vm.feeCrypto); + + + tx.txp[wallet.id] = txp; + $log.debug('Confirm. TX Fully Updated for wallet:' + wallet.id, tx); + updateSendAmounts(); + + return cb(); + }); + }); + }); + } + + function _paymentTimeControl(expirationTime) { + $scope.paymentExpired = false; + setExpirationTime(); + + countDown = $interval(function() { + setExpirationTime(); + }, 1000); + + function setExpirationTime() { + var now = Math.floor(Date.now() / 1000); + + if (now > expirationTime) { + setExpiredValues(); + return; + } + + var totalSecs = expirationTime - now; + var m = Math.floor(totalSecs / 60); + var s = totalSecs % 60; + $scope.remainingTimeStr = ('0' + m).slice(-2) + ":" + ('0' + s).slice(-2); + }; + + function setExpiredValues() { + $scope.paymentExpired = true; + $scope.remainingTimeStr = gettextCatalog.getString('Expired'); + if (countDown) $interval.cancel(countDown); + $timeout(function() { + $scope.$apply(); + }); + }; + }; + } diff --git a/src/js/directives/shapeshiftCoinTrader.js b/src/js/directives/shapeshiftCoinTrader.js index d5c62f431..60cc66bdf 100644 --- a/src/js/directives/shapeshiftCoinTrader.js +++ b/src/js/directives/shapeshiftCoinTrader.js @@ -111,7 +111,7 @@ angular.module('copayApp.directives').directive('shapeshiftCoinTrader', function orderId: $scope.depositInfo.orderId }; - if (incomingData.redir(sendAddress, shapeshiftData)) { + if (incomingData.redir(sendAddress, 'shapeshift', shapeshiftData)) { ongoingProcess.set('connectingShapeshift', false); return; } diff --git a/src/js/services/shapeshiftService.js b/src/js/services/shapeshiftService.js index 41af14002..131df0cd0 100644 --- a/src/js/services/shapeshiftService.js +++ b/src/js/services/shapeshiftService.js @@ -109,7 +109,7 @@ angular.module('copayApp.services').factory('shapeshiftService', function($http, orderId: root.depositInfo.orderId }; - if (incomingData.redir(sendAddress, shapeshiftData)) { + if (incomingData.redir(sendAddress, 'shapeshift', shapeshiftData)) { ongoingProcess.set('connectingShapeshift', false); return; } diff --git a/www/views/review.html b/www/views/review.html index e398e68a1..a26143d2c 100644 --- a/www/views/review.html +++ b/www/views/review.html @@ -13,7 +13,7 @@

{{vm.sendingTitle}}

-

{{vm.primaryAmount}} {{vm.primaryCurrency}}

+

{{vm.primaryAmount}} {{vm.primaryCurrency}}

{{vm.secondaryAmount}} {{vm.secondaryCurrency}}

@@ -73,24 +73,22 @@
-
Fee: Less than 1 cent
-
- +
Fee: Less than 1 cent
+
Fee:
+
+
{{buttonText}} From f75866839523806056403e01be65f65584aa2550 Mon Sep 17 00:00:00 2001 From: Brendon Duncan Date: Fri, 3 Aug 2018 08:48:24 +1200 Subject: [PATCH 120/256] Title on wallet-to-wallet destination screen. --- src/js/controllers/walletSelectorController.js | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/js/controllers/walletSelectorController.js b/src/js/controllers/walletSelectorController.js index 4f0533084..f73bd4830 100644 --- a/src/js/controllers/walletSelectorController.js +++ b/src/js/controllers/walletSelectorController.js @@ -5,9 +5,17 @@ angular.module('copayApp.controllers').controller('walletSelectorController', fu $scope.$on("$ionicView.beforeEnter", function(event, data) { var config = configService.getSync().wallet.settings; - $scope.sendFlowTitle = ""; - if ($state.current.name === 'tabs.send.wallet-to-wallet') { - $scope.sendFlowTitle = gettextCatalog.getString('Wallet to Wallet Transfer'); + switch($state.current.name) { + case 'tabs.send.wallet-to-wallet': + $scope.sendFlowTitle = gettextCatalog.getString('Wallet to Wallet Transfer'); + break; + case 'tabs.send.destination': + if (data.stateParams.fromWalletId) { + $scope.sendFlowTitle = gettextCatalog.getString('Wallet to Wallet Transfer'); + } + break; + default: + // nop } $scope.params = $state.params; From 6626663a313d6d90c6066f8481eb04777492a7b8 Mon Sep 17 00:00:00 2001 From: Brendon Duncan Date: Fri, 3 Aug 2018 10:41:21 +1200 Subject: [PATCH 121/256] Displays error when transaction amount too low. Reinstated warning colour for transactions with high fees. --- src/js/controllers/review.controller.js | 18 +++++++++++++++--- www/views/review.html | 6 +++--- 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/src/js/controllers/review.controller.js b/src/js/controllers/review.controller.js index f0a0ec2ae..85950a8aa 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($log, $scope, $ionicLoading, $ionicModal, $timeout, addressbookService, bitcoinCashJsService, bitcore, bitcoreCash, configService, feeService, gettextCatalog, lodash, ongoingProcess, platformInfo, profileService, walletService, txFormatService) { +function reviewController(addressbookService, bitcoinCashJsService, bitcore, bitcoreCash, bwcError, configService, feeService, gettextCatalog, $ionicLoading, $ionicModal, lodash, $log, ongoingProcess, platformInfo, popupService, profileService, $scope, $timeout, txFormatService, walletService) { var vm = this; vm.destination = { @@ -21,6 +21,7 @@ function reviewController($log, $scope, $ionicLoading, $ionicModal, $timeout, ad vm.feeCrypto = ''; vm.feeFiat = ''; vm.fiatCurrency = ''; + vm.feeIsHigh = false; vm.feeLessThanACent = false; vm.origin = { balanceAmount: '', @@ -52,6 +53,7 @@ function reviewController($log, $scope, $ionicLoading, $ionicModal, $timeout, ad var satoshis = null; var toAddress = ''; var tx = {}; + var unitFromSat = 0; var FEE_TOO_HIGH_LIMIT_PERCENTAGE = 15; @@ -89,7 +91,8 @@ function reviewController($log, $scope, $ionicLoading, $ionicModal, $timeout, ad } else { config = configCache; priceDisplayIsFiat = config.wallet.settings.priceDisplay === 'fiat'; - vm.origin.currencyColor = originWallet.coin === 'btc' ? config.bitcoinWalletColor : config.bitcoinCashWalletColor; + vm.origin.currencyColor = originWallet.coin === 'btc' ? config.bitcoinWalletColor : config.bitcoinCashWalletColor; + unitFromSat = 1 / config.wallet.settings.unitToSatoshi; } updateSendAmounts(); getOriginWalletBalance(originWallet); @@ -431,6 +434,14 @@ function reviewController($log, $scope, $ionicLoading, $ionicModal, $timeout, ad } } + function setSendError(msg) { + $scope.sendStatus = ''; + $timeout(function() { + $scope.$apply(); + }); + popupService.showAlert(gettextCatalog.getString('Error at confirm'), bwcError.msg(msg)); + }; + function setupTx(tx) { if (tx.coin === 'bch') { tx.displayAddress = bitcoinCashJsService.readAddress(tx.toAddress).cashaddr; @@ -593,7 +604,8 @@ function reviewController($log, $scope, $ionicLoading, $ionicModal, $timeout, ad var perString = per.toFixed(2); txp.feeRatePerStr = (perString == '0.00' ? '< ' : '') + perString + '%'; txp.feeToHigh = per > FEE_TOO_HIGH_LIMIT_PERCENTAGE; - vm.feeCrypto = txp.fee; + vm.feeCrypto = (unitFromSat * txp.fee).toFixed(8); + vm.feeIsHigh = txp.feeToHigh; console.log("crypto", vm.feeCrypto); diff --git a/www/views/review.html b/www/views/review.html index a26143d2c..c1f37baf9 100644 --- a/www/views/review.html +++ b/www/views/review.html @@ -73,10 +73,10 @@
-
Fee: Less than 1 cent
-
Fee:
+
Fee: Less than 1 cent
+
Fee: {{vm.feeFiat}} {{vm.feeCurrency}}
- + {{vm.feeCrypto}} {{vm.origin.currency}}
From e649da69ef124605199f3d69085a739fb176f53f Mon Sep 17 00:00:00 2001 From: Brendon Duncan Date: Fri, 3 Aug 2018 17:11:47 +1200 Subject: [PATCH 122/256] In WalletService, createAddress now terminated properly, preventing double callback. --- src/js/services/walletService.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/js/services/walletService.js b/src/js/services/walletService.js index 774fa0906..a69b505c1 100644 --- a/src/js/services/walletService.js +++ b/src/js/services/walletService.js @@ -884,7 +884,7 @@ angular.module('copayApp.services').factory('walletService', function($log, $tim var createAddress = function(wallet, cb) { $log.debug('Creating address for wallet:', wallet.id); - wallet.createAddress({}, function(err, addr) { + wallet.createAddress({}, function onWalletCreatedAddress(err, addr) { if (err) { var prefix = gettextCatalog.getString('Could not create address'); if (err instanceof errors.CONNECTION_ERROR || (err.message && err.message.match(/5../))) { @@ -902,6 +902,7 @@ angular.module('copayApp.services').factory('walletService', function($log, $tim if (err) return cb(err); return cb(null, addr[0].address); }); + return; } return bwcError.cb(err, prefix, cb); } From f96610a66b7016e1e65b65e87ea44ff670ae6acd Mon Sep 17 00:00:00 2001 From: Sam Cheng Hung Date: Fri, 3 Aug 2018 13:34:09 +0800 Subject: [PATCH 123/256] Removes border and background from Paste Address button for send tab page --- src/sass/views/tab-send.scss | 2 + www/css/main.css | 1524 ++++++++++++++++++++++------------ 2 files changed, 982 insertions(+), 544 deletions(-) diff --git a/src/sass/views/tab-send.scss b/src/sass/views/tab-send.scss index 4fbe8e531..82b6f8d02 100644 --- a/src/sass/views/tab-send.scss +++ b/src/sass/views/tab-send.scss @@ -88,6 +88,8 @@ &.contains-address { .address { display: inline; + border: none; + background-color: transparent; } .non-address { display: none; diff --git a/www/css/main.css b/www/css/main.css index b4e67edac..e39d96cf3 100644 --- a/www/css/main.css +++ b/www/css/main.css @@ -9970,7 +9970,7 @@ ion-nav-bar.hide { .card { margin: 20px 14px; } -ion-view.deflash-blue:before, ion-view#view-amount:before, ion-view#view-confirm:before, ion-view#copayers-invitation:before, ion-view#tab-home:before, ion-view#tab-receive:before, ion-view#tab-send:before, ion-view.settings:before, ion-view#bitpayCard:before, ion-view#bitpayCard-intro:before, ion-view#view-address-book:before, ion-view#addresses:before, ion-view#send-feedback:before, ion-view#choose-fee-level:before, ion-view#txp-details:before, ion-view#coinbase:before, ion-view#glidera:before, ion-view#amazon:before, ion-view#mercadolibre:before, ion-view#custom-amount:before { +ion-view.deflash-blue:before, ion-view#view-amount:before, ion-view#view-confirm:before, ion-view#copayers-invitation:before, ion-view#tab-home:before, ion-view#tab-receive:before, ion-view#tab-send:before, ion-view.settings:before, ion-view#bitpayCard:before, ion-view#bitpayCard-intro:before, ion-view#view-address-book:before, ion-view#addresses:before, ion-view#choose-fee-level:before, ion-view#txp-details:before, ion-view#coinbase:before, ion-view#glidera:before, ion-view#amazon:before, ion-view#mercadolibre:before, ion-view#custom-amount:before { content: " "; display: block; position: absolute; @@ -9980,7 +9980,7 @@ ion-view.deflash-blue:before, ion-view#view-amount:before, ion-view#view-confirm height: 44px; background-color: #fab915; } -.platform-ios.platform-cordova:not(.fullscreen) ion-view.deflash-blue:before, .platform-ios.platform-cordova:not(.fullscreen) ion-view#view-amount:before, .platform-ios.platform-cordova:not(.fullscreen) ion-view#view-confirm:before, .platform-ios.platform-cordova:not(.fullscreen) ion-view#copayers-invitation:before, .platform-ios.platform-cordova:not(.fullscreen) ion-view#tab-home:before, .platform-ios.platform-cordova:not(.fullscreen) ion-view#tab-receive:before, .platform-ios.platform-cordova:not(.fullscreen) ion-view#tab-send:before, .platform-ios.platform-cordova:not(.fullscreen) ion-view.settings:before, .platform-ios.platform-cordova:not(.fullscreen) ion-view#bitpayCard:before, .platform-ios.platform-cordova:not(.fullscreen) ion-view#bitpayCard-intro:before, .platform-ios.platform-cordova:not(.fullscreen) ion-view#view-address-book:before, .platform-ios.platform-cordova:not(.fullscreen) ion-view#addresses:before, .platform-ios.platform-cordova:not(.fullscreen) ion-view#send-feedback:before, .platform-ios.platform-cordova:not(.fullscreen) ion-view#choose-fee-level:before, .platform-ios.platform-cordova:not(.fullscreen) ion-view#txp-details:before, .platform-ios.platform-cordova:not(.fullscreen) ion-view#coinbase:before, .platform-ios.platform-cordova:not(.fullscreen) ion-view#glidera:before, .platform-ios.platform-cordova:not(.fullscreen) ion-view#amazon:before, .platform-ios.platform-cordova:not(.fullscreen) ion-view#mercadolibre:before, .platform-ios.platform-cordova:not(.fullscreen) ion-view#custom-amount:before { +.platform-ios.platform-cordova:not(.fullscreen) ion-view.deflash-blue:before, .platform-ios.platform-cordova:not(.fullscreen) ion-view#view-amount:before, .platform-ios.platform-cordova:not(.fullscreen) ion-view#view-confirm:before, .platform-ios.platform-cordova:not(.fullscreen) ion-view#copayers-invitation:before, .platform-ios.platform-cordova:not(.fullscreen) ion-view#tab-home:before, .platform-ios.platform-cordova:not(.fullscreen) ion-view#tab-receive:before, .platform-ios.platform-cordova:not(.fullscreen) ion-view#tab-send:before, .platform-ios.platform-cordova:not(.fullscreen) ion-view.settings:before, .platform-ios.platform-cordova:not(.fullscreen) ion-view#bitpayCard:before, .platform-ios.platform-cordova:not(.fullscreen) ion-view#bitpayCard-intro:before, .platform-ios.platform-cordova:not(.fullscreen) ion-view#view-address-book:before, .platform-ios.platform-cordova:not(.fullscreen) ion-view#addresses:before, .platform-ios.platform-cordova:not(.fullscreen) ion-view#choose-fee-level:before, .platform-ios.platform-cordova:not(.fullscreen) ion-view#txp-details:before, .platform-ios.platform-cordova:not(.fullscreen) ion-view#coinbase:before, .platform-ios.platform-cordova:not(.fullscreen) ion-view#glidera:before, .platform-ios.platform-cordova:not(.fullscreen) ion-view#amazon:before, .platform-ios.platform-cordova:not(.fullscreen) ion-view#mercadolibre:before, .platform-ios.platform-cordova:not(.fullscreen) ion-view#custom-amount:before { height: 64px; } .just-a-hint, .icon.bp-arrow-right, .icon.bp-arrow-down, .icon.bp-arrow-up { @@ -10037,6 +10037,11 @@ ion-view.deflash-blue:before, ion-view#view-amount:before, ion-view#view-confirm .big-icon-svg.theme-circle > .bg.icon-faucet { background-image: url("../img/icon-faucet.svg"); background-size: 70%; } + .big-icon-svg.theme-circle > .bg.icon-wallet { + background-color: #FAB915; + background-image: url("../img/icon-wallet.svg"); + border: none; + box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.3) inset; } .big-icon-svg.theme-circle-services > .bg { border: 1px solid #191919; } .big-icon-svg.theme-circle-community > .bg { @@ -10071,11 +10076,13 @@ ion-view.deflash-blue:before, ion-view#view-amount:before, ion-view#view-confirm .loading .spinner svg { margin-top: 0; } -.button.button-primary.button-standard, .button.button-secondary.button-standard, .button.button-light.button-standard, .button.button-assertive.button-standard, +.button.button-primary.button-standard, .button.button-secondary.button-standard, .button.button-light.button-standard, .button.button-white.button-standard, .button.button-green.button-standard, .button.button-assertive.button-standard, .onboarding .button.button-primary.button-standard, .onboarding .button.button-secondary.button-standard, .onboarding .button.button-light.button-standard, -.onboarding .button.button-assertive.button-standard { +.onboarding .button.button-white.button-standard, +.onboarding .button.button-green.button-standard, +.onboarding .button.button-assertive.button-standard, #shapeshift .button-shapeshift { width: 85%; max-width: 300px; margin-left: auto; @@ -10118,10 +10125,12 @@ ion-view.deflash-blue:before, ion-view#view-amount:before, ion-view#view-confirm box-shadow: none; color: #fff; } -.button.button-primary.button-standard + .button-standard, .button.button-secondary.button-standard + .button-standard, .button.button-light.button-standard + .button-standard, .button.button-assertive.button-standard + .button-standard, +.button.button-primary.button-standard + .button-standard, .button.button-secondary.button-standard + .button-standard, .button.button-light.button-standard + .button-standard, .button.button-white.button-standard + .button-standard, .button.button-green.button-standard + .button-standard, .button.button-assertive.button-standard + .button-standard, .onboarding .button.button-primary.button-standard + .button-standard, .onboarding .button.button-secondary.button-standard + .button-standard, .onboarding .button.button-light.button-standard + .button-standard, +.onboarding .button.button-white.button-standard + .button-standard, +.onboarding .button.button-green.button-standard + .button-standard, .onboarding .button.button-assertive.button-standard + .button-standard { margin-top: 1rem; } @@ -10183,8 +10192,67 @@ ion-view.deflash-blue:before, ion-view#view-amount:before, ion-view#view-confirm font-size: 0.7em !important; display: inline !important; } -.button.button-full { - display: block; } +.button { + border-radius: 6px; } + .button.button-full { + display: block; } + .button-green { + border-color: #FFF; + background-color: #719561; + color: #FFF; + border: 0px; + box-shadow: 0 2px 11px 0 #C1C1C1; } + .button-green:hover { + color: #FFF; + text-decoration: none; } + .button-green.active, .button-green.activated { + border-color: #FFF; + background-color: #606060; } + .button-green.button-clear { + border-color: transparent; + background: none; + box-shadow: none; + color: #FFF; } + .button-green.button-icon { + border-color: transparent; + background: none; } + .button-green.button-outline { + border-color: #C1C1C1; + background: transparent; + color: #C1C1C1; } + .button-green.button-outline.active, .button-green.button-outline.activated { + background-color: #C1C1C1; + box-shadow: none; + color: #fff; } + .button-white { + border-color: #C1C1C1; + background-color: #FFF; + color: #606060; + box-shadow: 0 2px 11px 0 #C1C1C1; } + .button-white:hover { + color: #606060; + text-decoration: none; } + .button-white.active, .button-white.activated { + border-color: #FFF; + background-color: #C1C1C1; } + .button-white.button-clear { + border-color: transparent; + background: none; + box-shadow: none; + color: #FFF; } + .button-white.button-icon { + border-color: transparent; + background: none; } + .button-white.button-outline { + border-color: #C1C1C1; + background: transparent; + color: #C1C1C1; } + .button-white.button-outline.active, .button-white.button-outline.activated { + background-color: #C1C1C1; + box-shadow: none; + color: #fff; } + .button-white.activated { + color: #FFF; } .button-clear { background: none !important; } @@ -10197,6 +10265,22 @@ textarea.d-block { display: block; width: 100%; } +qrcode { + position: relative; } + qrcode.qr-overlay::before { + content: ""; + background-size: 100% 100%; + display: block; + left: 88px; + margin-top: 88px; + width: 44px; + height: 44px; + position: absolute; } + qrcode.qr-overlay--bch::before { + background-image: url("../img/qr-overlay-bch.png"); } + qrcode.qr-overlay--btc::before { + background-image: url("../img/qr-overlay-btc.png"); } + .center-block { float: none; margin: 0 auto; } @@ -10208,6 +10292,15 @@ textarea.d-block { top: 50%; left: 50%; } +.third-party-notice { + font-size: 12px; + margin: 0px 14px; + font-weight: 600; + color: #6F6F70; } + @media (min-width: 768px) { + .third-party-notice { + text-align: center; } } + .tabs .tab-item .icon { background-repeat: no-repeat; background-position: center; @@ -10237,6 +10330,10 @@ textarea.d-block { font-weight: 700; } #tab-home .card > .item-heading .icon, #tab-home .list > .item-heading .icon, #tab-send .card > .item-heading .icon, #tab-send .list > .item-heading .icon { color: #667; } + #tab-home .card > .item-heading .subtitle, #tab-home .list > .item-heading .subtitle, #tab-send .card > .item-heading .subtitle, #tab-send .list > .item-heading .subtitle { + color: #667; + font-size: 12px; + font-weight: 300; } #view-add .item { margin-bottom: 10px; @@ -10260,349 +10357,397 @@ textarea.d-block { #view-add .bg.join { padding: 10px; } -#view-amount .recipient-label { - font-size: 14px; - padding-bottom: 0; - color: #667; } - -#view-amount .item-no-bottom-border + .item { - border-top: 0; } - -#view-amount .icon-bitpay-card { - background-image: url("../img/icon-bitpay.svg"); } - -#view-amount .icon-amazon { - background-image: url("../img/icon-amazon.svg"); } - -@media (max-width: 480px) { - #view-amount .bitcoin-address { - font-size: 13px; - padding-left: 48px; } - #view-amount .bitcoin-address .icon { - left: 8px; - font-size: 24px; } - #view-amount .bitcoin-address .big-icon-svg { - left: 5px; } - #view-amount .bitcoin-address .big-icon-svg > .bg { - width: 30px; - height: 30px; - box-shadow: none; } } - -@media (max-width: 320px) { - #view-amount .bitcoin-address > span:last-child { - margin-left: -2px; } } - -#view-amount .send-gravatar { - left: 11px; - position: absolute; - top: 10px; } - -#view-amount .amount span input { - display: inline; - width: 120px; } - -#view-amount .amount-pane-recipient { - position: absolute; - top: 95px; - bottom: 0; - width: 100%; - background-color: #fff; - padding: 0 16px; } - #view-amount .amount-pane-recipient .amount-bar { - padding: 24px 0; - font-size: 18px; } - @media (max-height: 480px) { - #view-amount .amount-pane-recipient .amount-bar { - padding: 0px; } } - @media (max-width: 320px) { - #view-amount .amount-pane-recipient .amount-bar { - padding: 0px; } } - #view-amount .amount-pane-recipient .amount-bar .title { - float: left; - padding-top: 10px; - color: #445; - font-weight: bold; } +#view-amount { + background: #f2f2f2; } + #view-amount .recipient-label { + font-size: 14px; + padding-bottom: 0; + color: #667; } + #view-amount .item-no-bottom-border + .item { + border-top: 0; } + #view-amount .icon-bitpay-card { + background-image: url("../img/icon-bitpay.svg"); } + #view-amount .icon-amazon { + background-image: url("../img/icon-amazon.svg"); } + @media (max-width: 480px) { + #view-amount .bitcoin-address { + font-size: 13px; + padding-left: 48px; } + #view-amount .bitcoin-address .icon { + left: 8px; + font-size: 24px; } + #view-amount .bitcoin-address .big-icon-svg { + left: 5px; } + #view-amount .bitcoin-address .big-icon-svg > .bg { + width: 30px; + height: 30px; + box-shadow: none; } } + @media (max-width: 320px) { + #view-amount .bitcoin-address > span:last-child { + margin-left: -2px; } } + #view-amount .send-gravatar { + left: 11px; + position: absolute; + top: 10px; } + #view-amount .amount span input { + display: inline; + width: 120px; } + #view-amount .amount-pane-recipient { + position: absolute; + top: 95px; + bottom: 0; + width: 100%; + background-color: #fff; + padding: 0 16px; } + #view-amount .amount-pane-recipient .amount-bar { + padding: 24px 0; + font-size: 18px; } @media (max-height: 480px) { - #view-amount .amount-pane-recipient .amount-bar .title { + #view-amount .amount-pane-recipient .amount-bar { padding: 0px; } } - @media (max-height: 480px) { - #view-amount .amount-pane-recipient .amount-bar { - padding-top: 3px; } } - #view-amount .amount-pane-recipient .amount { - display: flex; - flex-direction: column; - justify-content: center; - flex-grow: 1; + @media (max-width: 320px) { + #view-amount .amount-pane-recipient .amount-bar { + padding: 0px; } } + #view-amount .amount-pane-recipient .amount-bar .title { + float: left; + padding-top: 10px; + color: #445; + font-weight: bold; } + @media (max-height: 480px) { + #view-amount .amount-pane-recipient .amount-bar .title { + padding: 0px; } } + @media (max-height: 480px) { + #view-amount .amount-pane-recipient .amount-bar { + padding-top: 3px; } } + #view-amount .amount-pane-recipient .amount { + display: flex; + flex-direction: column; + justify-content: center; + flex-grow: 1; + position: absolute; + bottom: 254px; + top: 66px; } + #view-amount .amount-pane-recipient .amount .light { + color: #9b9bab; } + @media (max-height: 480px) { + #view-amount .amount-pane-recipient .amount { + top: 45px; } } + @media (max-width: 320px) { + #view-amount .amount-pane-recipient .amount { + bottom: 276px; + top: 60px; } + #view-amount .amount-pane-recipient .amount > div { + display: inline-block; } + #view-amount .amount-pane-recipient .amount > div:first-child { + display: inherit; } } + #view-amount .amount-pane-no-recipient { position: absolute; - bottom: 254px; - top: 66px; } - #view-amount .amount-pane-recipient .amount .light { - color: #9b9bab; } - @media (max-height: 480px) { - #view-amount .amount-pane-recipient .amount { - top: 45px; } } - @media (max-width: 320px) { - #view-amount .amount-pane-recipient .amount { - bottom: 276px; - top: 60px; } - #view-amount .amount-pane-recipient .amount > div { - display: inline-block; } - #view-amount .amount-pane-recipient .amount > div:first-child { - display: inherit; } } - -#view-amount .amount-pane-no-recipient { - position: absolute; - top: 0; - bottom: 0; - width: 100%; - background-color: #fff; - padding: 0 16px; } - #view-amount .amount-pane-no-recipient .amount-bar { - padding: 24px 0; - font-size: 18px; } - #view-amount .amount-pane-no-recipient .amount-bar .title { - padding-top: 10px; + top: 0; + bottom: 0; + width: 100%; + background-color: #fff; + padding: 0 16px; } + #view-amount .amount-pane-no-recipient .amount-bar { + padding: 24px 0; + font-size: 18px; } + #view-amount .amount-pane-no-recipient .amount-bar .title { + padding-top: 10px; + color: #445; + font-weight: bold; } + #view-amount .amount-pane-no-recipient .amount-bar .title .limits { + margin-top: 10px; + color: #9b9bab; + font-size: 12px; } + #view-amount .amount-pane-no-recipient .amount-bar .title .select { + margin: 10px 1px; } + #view-amount .amount-pane-no-recipient .amount { + display: flex; + flex-direction: column; + justify-content: center; + flex-grow: 1; + position: absolute; + bottom: 254px; + top: 66px; } + #view-amount .amount-pane-no-recipient .amount .light { + color: #9b9bab; } + #view-amount .amount { + padding-top: 10px; + padding-bottom: 10px; } + #view-amount .amount .icon-toggle { + font-size: 1.2em; + width: auto; + margin: 0.8em auto; + border: 1px solid #f2f2f2; color: #445; - font-weight: bold; } - #view-amount .amount-pane-no-recipient .amount-bar .title .limits { - margin-top: 10px; - color: #9b9bab; - font-size: 12px; } - #view-amount .amount-pane-no-recipient .amount-bar .title .select { - margin: 10px 1px; } - #view-amount .amount-pane-no-recipient .amount { - display: flex; - flex-direction: column; - justify-content: center; - flex-grow: 1; - position: absolute; - bottom: 254px; - top: 66px; } - #view-amount .amount-pane-no-recipient .amount .light { + border-radius: 3px; + padding: 0 10px; + cursor: pointer; } + @media (max-height: 280px) { + #view-amount .amount .icon-toggle { + margin: 0.1em auto; } } + #view-amount .amount__editable--minimize { + font-size: 22px; } + #view-amount .amount__editable--standard { + font-size: 42px; } + @media (max-height: 480px) { + #view-amount .amount__editable--standard { + font-size: 26px; + padding-top: 10px; } } + #view-amount .amount__editable--placeholder { color: #9b9bab; } - -#view-amount .amount { - padding-top: 10px; - padding-bottom: 10px; } - #view-amount .amount .icon-toggle { - font-size: 1.2em; - width: auto; - margin: 0.8em auto; - border: 1px solid #f2f2f2; - color: #445; - border-radius: 3px; - padding: 0 10px; - cursor: pointer; } - @media (max-height: 280px) { - #view-amount .amount .icon-toggle { - margin: 0.1em auto; } } - #view-amount .amount__editable--minimize { - font-size: 22px; } - #view-amount .amount__editable--standard { - font-size: 42px; } - @media (max-height: 480px) { - #view-amount .amount__editable--standard { - font-size: 26px; - padding-top: 10px; } } - #view-amount .amount__editable--placeholder { - color: #9b9bab; } - #view-amount .amount__number { - color: #445; } - #view-amount .amount__currency-toggle { - border: 1px solid #f2f2f2; - color: #445; - border-radius: 3px; - padding: 0 10px; - cursor: pointer; - font-size: .6em; - position: relative; - top: -3px; - line-height: 1; } - @media (max-width: 320px) { - #view-amount .amount__currency-toggle { - line-height: 30px; - height: 30px; } } - #view-amount .amount__currency-toggle-mobile { - border: 1px solid #f2f2f2; - color: #445; - border-radius: 3px; - cursor: pointer; - position: relative; - line-height: 1; } - @media (max-width: 320px) { - #view-amount .amount__currency-toggle-mobile { - line-height: 30px; - height: 30px; } } - #view-amount .amount__results--minimize { - font-size: 12px; } - #view-amount .amount__results--standard { - font-size: 18px; - padding: 10px 0; } - #view-amount .amount__results--placeholder { - color: #9b9bab; } - #view-amount .amount__result { - color: #9b9bab; - font-size: .9em; - line-height: 1; } - @media (max-height: 480px) { - #view-amount .amount__result { - margin-bottom: 0; } } - #view-amount .amount__result-equiv { - color: #667; - font-size: 1.2em; } - @media (max-height: 480px) { - #view-amount .amount__result-equiv { - margin-top: 0; - font-size: 16px; } } - -#view-amount .scroll-content { - display: flex; - flex-direction: column; } - #view-amount .scroll-content .send-amount { - flex: 1 1 auto; + #view-amount .amount__number { + color: #445; } + #view-amount .amount__currency-toggle { + border: 1px solid #f2f2f2; + color: #445; + border-radius: 3px; + padding: 0 10px; + cursor: pointer; + font-size: .6em; + position: relative; + top: -3px; + line-height: 1; } + @media (max-width: 320px) { + #view-amount .amount__currency-toggle { + line-height: 30px; + height: 30px; } } + #view-amount .amount__currency-toggle-mobile { + border: 1px solid #f2f2f2; + color: #445; + border-radius: 3px; + cursor: pointer; + position: relative; + line-height: 1; } + @media (max-width: 320px) { + #view-amount .amount__currency-toggle-mobile { + line-height: 30px; + height: 30px; } } + #view-amount .amount__results--minimize { + font-size: 12px; } + #view-amount .amount__results--standard { + font-size: 18px; + padding: 10px 0; } + #view-amount .amount__results--placeholder { + color: #9b9bab; } + #view-amount .amount__result { + color: #9b9bab; + font-size: .9em; + line-height: 1; } + @media (max-height: 480px) { + #view-amount .amount__result { + margin-bottom: 0; } } + #view-amount .amount__result-equiv { + color: #667; + font-size: 1.2em; } + @media (max-height: 480px) { + #view-amount .amount__result-equiv { + margin-top: 0; + font-size: 16px; } } + #view-amount .scroll-content { display: flex; - flex-direction: column; - justify-content: center; } - #view-amount .scroll-content .send-amount .send-amount-tool { - flex: 0 1 auto; } - #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input { - text-align: center; - position: relative; - padding: 10px 30px; } - #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .text-selectable { - -webkit-user-select: text; - -moz-user-select: text; - -ms-user-select: text; - user-select: text; } - #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount input, #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount .unit, #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount .primary-amount-display { - font-size: 1.8em; } - @media (min-width: 375px) { + flex-direction: column; } + #view-amount .scroll-content .send-amount { + flex: 1 1 auto; + display: flex; + flex-direction: column; + justify-content: center; } + #view-amount .scroll-content .send-amount .send-amount-header-footer { + flex: 1 1 auto; + min-height: 20px; } + #view-amount .scroll-content .send-amount .send-amount-header-footer .warning { + font-weight: bold; + font-size: 12px; + padding: 0 6px 6px 6px; + text-align: center; } + #view-amount .scroll-content .send-amount .send-amount-header-footer__max { + float: right; } + #view-amount .scroll-content .send-amount .send-amount-tool { + flex: 0 1 auto; } + #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input { + text-align: center; + position: relative; + padding: 10px 30px; } + #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .text-selectable { + -webkit-user-select: text; + -moz-user-select: text; + -ms-user-select: text; + user-select: text; } + #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount { + color: #333; + font-weight: bold; } #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount input, #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount .unit, #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount .primary-amount-display { - font-size: 2.1em; } } - @media (min-width: 414px) { - #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount input, #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount .unit, #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount .primary-amount-display { - font-size: 2.4em; } } - #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount.long input, #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount.long .unit, #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount.long .primary-amount-display { - font-size: 1.6em; } - @media (min-width: 375px) { + font-size: 1.8em; } + @media (min-width: 375px) { + #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount input, #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount .unit, #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount .primary-amount-display { + font-size: 2.1em; } } + @media (min-width: 414px) { + #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount input, #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount .unit, #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount .primary-amount-display { + font-size: 2.4em; } } #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount.long input, #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount.long .unit, #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount.long .primary-amount-display { - font-size: 1.8em; } } - @media (min-width: 414px) { - #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount.long input, #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount.long .unit, #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount.long .primary-amount-display { - font-size: 2em; } } - #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount.very-long input, #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount.very-long .unit, #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount.very-long .primary-amount-display { - font-size: 0.9em; } - @media (min-width: 375px) { + font-size: 1.6em; } + @media (min-width: 375px) { + #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount.long input, #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount.long .unit, #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount.long .primary-amount-display { + font-size: 1.8em; } } + @media (min-width: 414px) { + #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount.long input, #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount.long .unit, #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount.long .primary-amount-display { + font-size: 2em; } } #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount.very-long input, #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount.very-long .unit, #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount.very-long .primary-amount-display { - font-size: 1.3em; } } - @media (min-width: 414px) { - #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount.very-long input, #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount.very-long .unit, #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount.very-long .primary-amount-display { - font-size: 1.4em; } } - #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount input { - border: 0; - padding: 0; - white-space: normal; - background: none; - line-height: 1; - box-sizing: content-box; - display: inline-block; - vertical-align: middle; - margin: 0; - height: 1em; - margin-right: 5px; - font-family: 'ProximaNova'; } - #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount .unit, - #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount .primary-amount-display { - display: inline-block; - vertical-align: middle; - line-height: 1em; } - #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount .unit { - font-weight: bold; } - #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount .primary-amount-display { - margin-right: 5px; - word-break: break-all; } - #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .switch-currencies { - position: absolute; - right: 0; - top: 50%; - transform: translate(0, -50%); - padding: 15px; } - #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .switch-currencies img { - width: 18px; } - #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-actions { - margin-top: 15px; + font-size: 0.9em; } + @media (min-width: 375px) { + #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount.very-long input, #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount.very-long .unit, #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount.very-long .primary-amount-display { + font-size: 1.3em; } } + @media (min-width: 414px) { + #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount.very-long input, #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount.very-long .unit, #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount.very-long .primary-amount-display { + font-size: 1.4em; } } + #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount input { + border: 0; + padding: 0; + white-space: normal; + background: none; + line-height: 1; + box-sizing: content-box; + display: inline-block; + vertical-align: middle; + margin: 0; + height: 1em; + margin-right: 5px; + font-family: 'ProximaNova'; } + #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount .unit, + #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount .primary-amount-display { + display: inline-block; + vertical-align: middle; + line-height: 1em; } + #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .primary-amount .primary-amount-display { + margin-right: 5px; + word-break: break-all; } + #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .alternative-amount { + color: #6F6F70; } + #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .switch-currencies { + position: absolute; + right: 0; + top: 50%; + transform: translate(0, -50%); + padding: 15px; } + #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-tool-input .switch-currencies img { + width: 18px; } + #view-amount .scroll-content .send-amount-extras { + display: flex; + flex: 0 0 auto; + /* So that if only one item is present, it appears on the right. */ + flex-direction: row-reverse; + font-size: 12px; + align-items: center; + justify-content: space-between; + margin: 0 14px; } + #view-amount .scroll-content .send-amount-extras .available-funds { + color: #6F6F70; } + #view-amount .scroll-content .send-amount-extras .warning { + color: #b7664d; } + #view-amount .scroll-content .send-amount-extras .extra, + #view-amount .scroll-content .send-amount-extras button.extra { + /*display: flex;*/ + flex: 0 1 auto; } + #view-amount .scroll-content .send-amount-extras button.extra { + background: none; + border: none; + color: #000; + font-family: 'ProximaNova'; + font-size: 14px; + line-height: normal; + min-height: auto; + min-width: auto; + padding: 0; } + #view-amount .scroll-content .send-amount-extras .button .icon:before { + font-size: 14px; + line-height: normal; } + #view-amount .scroll-content .send-amount-extras .button span { display: flex; align-items: center; justify-content: center; } - #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-actions .button { - flex: 1 1 auto; - line-height: 1.2em; } - #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-actions .button + .button { - margin-left: 10px; } - #view-amount .scroll-content .send-amount .send-amount-tool .send-amount-actions .button span { - display: flex; - align-items: center; - justify-content: center; } - #view-amount .scroll-content .button.no-margin { - margin: 0; } - #view-amount .scroll-content .notification-warning { - display: block; - padding: .75rem 1.25rem; - color: #856404; - background-color: #fff3cd; - border: 1px solid #ffeeba; - line-height: 1.4em; - margin-bottom: 20px; } - #view-amount .scroll-content .keypad-container { - position: relative; } - #view-amount .scroll-content .keypad-container .keypad { - text-align: center; + #view-amount .scroll-content .button.no-margin { + margin: 0; } + #view-amount .scroll-content .notification-warning { + display: block; + padding: .75rem 1.25rem; + color: #856404; + background-color: #fff3cd; + border: 1px solid #ffeeba; + line-height: 1.4em; + margin-bottom: 20px; } + #view-amount .scroll-content .keypad-container { + position: relative; font-size: 18px; - font-weight: lighter; - position: absolute; - bottom: 0; - width: 100%; - color: #667; } + line-height: 2em; } @media (min-height: 667px) { - #view-amount .scroll-content .keypad-container .keypad { + #view-amount .scroll-content .keypad-container { font-size: 24px; } } - #view-amount .scroll-content .keypad-container .keypad .row { - padding: 0 !important; - margin: 0 !important; } - #view-amount .scroll-content .keypad-container .keypad .col { - line-height: 38px; } - @media (min-height: 667px) { - #view-amount .scroll-content .keypad-container .keypad .col { - line-height: 45px; } } - #view-amount .scroll-content .keypad-container .keypad .row:last-child .col { - padding-bottom: 10px; } - #view-amount .scroll-content .keypad-container .keypad .operator { - background-color: #f2f2f2; - font-weight: normal; - cursor: pointer; } - #view-amount .scroll-content .keypad-container .keypad .operator:active { - background-color: #9b9bab; } - #view-amount .scroll-content .keypad-container .keypad .operator-send { - font-weight: bolder; - color: #fff; - background-color: #494949; - font-size: 36px; - cursor: pointer; } - #view-amount .scroll-content .keypad-container .keypad .operator-send:active { - background-color: #eaeaea; } - #view-amount .scroll-content .keypad-container .keypad .digit { - cursor: pointer; - border-top: 1px solid #f2f2f2; - border-left: 1px solid #f2f2f2; - transition: all 0.1s ease; } - #view-amount .scroll-content .keypad-container .keypad .digit:active { - background-color: #f2f2f2; } @media (max-height: 480px) { - #view-amount .scroll-content .keypad-container .keypad { + #view-amount .scroll-content .keypad-container { font-size: 12px; } } + #view-amount .scroll-content .keypad-container .sendmax { + background: #262424; } + #view-amount .scroll-content .keypad-container .sendmax .button { + color: white; + background: black; + border: 1px solid #262424; + border-radius: 0; + font-size: 0.8em; + line-height: 2em; + width: 100%; } + #view-amount .scroll-content .keypad-container .sendmax .button .available-funds-amount { + color: #C9C9C9; } + #view-amount .scroll-content .keypad-container .sendmax .button:active { + background-color: #445; } + #view-amount .scroll-content .keypad-container .keypad { + text-align: center; + font-weight: lighter; + position: absolute; + bottom: 0; + width: 100%; + color: #fff; } + #view-amount .scroll-content .keypad-container .keypad .row { + padding: 0 !important; + margin: 0 !important; } + #view-amount .scroll-content .keypad-container .keypad .row:last-child .col { + padding-bottom: 10px; } + #view-amount .scroll-content .keypad-container .keypad .operator { + background-color: #f2f2f2; + font-weight: normal; + cursor: pointer; } + #view-amount .scroll-content .keypad-container .keypad .operator:active { + background-color: #9b9bab; } + #view-amount .scroll-content .keypad-container .keypad .operator-send { + font-weight: bolder; + color: #fff; + background-color: #494949; + font-size: 36px; + cursor: pointer; } + #view-amount .scroll-content .keypad-container .keypad .operator-send:active { + background-color: #eaeaea; } + #view-amount .scroll-content .keypad-container .keypad .digit { + cursor: pointer; + background-color: #000; + border: 1px solid #262424; + transition: all 0.1s ease; } + #view-amount .scroll-content .keypad-container .keypad .digit:active { + background-color: #445; } + #view-amount .scroll-content .button-primary { + background-color: #fab915; + border-radius: 0; + font-weight: bold; } + #view-amount .scroll-content .button-primary[disabled] { + background-color: #667; + opacity: 1; } + #view-amount .warning { + color: #b7664d; } + #view-amount ion-content { + margin-bottom: constant(safe-area-inset-bottom); + /* iOS 11.0 */ + margin-bottom: env(safe-area-inset-bottom); + /* iOS 11.2 */ } #view-confirm { - background-color: #ffffff; } + background-color: #494949; } #view-confirm .item-note { float: none; } #view-confirm .item-note .fee-rate { @@ -10622,6 +10767,13 @@ textarea.d-block { margin-top: -3px; } #view-confirm .toggle { cursor: pointer; } + #view-confirm ion-content { + background-color: #ffffff; } + #view-confirm slide-to-accept, #view-confirm slide-to-accept-success { + margin-bottom: constant(safe-area-inset-bottom); + /* iOS 11.0 */ + margin-bottom: env(safe-area-inset-bottom); + /* iOS 11.2 */ } #copayers-invitation .button-share { color: #fff; @@ -10728,6 +10880,8 @@ textarea.d-block { #tab-home .card-banner { padding: 0; } + #tab-home .card-banner svg { + margin: 40px auto 40px; } #tab-home .card-banner__img { width: 100%; display: block; } @@ -10951,123 +11105,156 @@ textarea.d-block { #cordova-plugin-qrscanner-still, #cordova-plugin-qrscanner-video-preview { background-color: #fab915 !important; } -#tab-send .input input { - width: 100%; - height: auto; } +#tab-send-header { + height: 300px; + width: 100%; } -#tab-send .input.item { - height: 55px; } +#tab-send-contacts { + height: calc(100vh - 300px - 50px - 44px); + /* screen size - button container - bottom-tab-menu - header top */ + overflow: scroll; } + #tab-send-contacts.ios { + height: calc(100vh - 300px - 50px - 44px - 18px); } -#tab-send .input i.left { - padding-left: 15px; } +#tab-send .input { + width: 100%; } + #tab-send .input input { + width: 100%; + height: 57px; + background: #FFF; + border: 1px #D9D9D9 solid; } + #tab-send .input input::placeholder { + color: #DCDCDC; } + #tab-send .input i.left { + padding-left: 15px; } + #tab-send .input i.qr { + cursor: pointer; + cursor: hand; + padding-right: 5px; } -#tab-send .input i.qr { - cursor: pointer; - cursor: hand; - padding-right: 5px; } - -#tab-send .qr-scan-icon { - cursor: pointer; - cursor: hand; - border-left: 1px solid #e4e4e4; - padding-left: 10px; } - -#tab-send .qr-icon { - line-height: 20px; } - -#tab-send .zero-state-cta { - padding-bottom: 3vh; - left: 0; } - -#tab-send .send-heading { - font-size: 14px; - font-weight: bold; - padding: 0 0 16px 0; - border: none; } - -#tab-send .send-header-wrapper { - padding: 10px; - background-color: white; - box-shadow: 0px 5px 10px 0px #cccccc; } - -#tab-send .search-wrapper { +#tab-send .send-wrapper { + padding: 18px 9px 9px 9px; background-color: #f2f2f2; border-radius: 3px; border: none; } - #tab-send .search-wrapper .svg#Bitcoin_Symbol { - width: 14px; } - #tab-send .search-wrapper .svg#Bitcoin_Symbol .st0 { - fill: #cccccc; } - #tab-send .search-wrapper.focus { - background: none; } - #tab-send .search-wrapper.focus .svg#Bitcoin_Symbol { - display: none; } - #tab-send .search-wrapper.focus .search-input { - padding-left: 30px; } - #tab-send .search-wrapper.focus .search-input:focus::-webkit-input-placeholder { - opacity: 0; } - -#tab-send .abs-v-center { - position: absolute; - top: 50%; - transform: translateY(-50%); } + #tab-send .send-wrapper:after { + display: block; + position: relative; + height: 1px; + background: #DEDEDE; + bottom: 0; + content: ''; + margin: 10px 6px 0px; } + #tab-send .send-wrapper.focus .search-input { + padding-left: 30px; } + #tab-send .send-wrapper.focus .search-input:focus::-webkit-input-placeholder { + opacity: 0; } + #tab-send .send-wrapper .buttons { + margin: auto; + margin-top: 18px; } + #tab-send .send-wrapper .buttons .button { + height: 60px; + line-height: 16px; + margin-right: 0px; + width: 95%; + max-width: none; + padding: 2px; } + #tab-send .send-wrapper .buttons .button-clipboard-paste { + margin-left: 0; } + #tab-send .send-wrapper .buttons .button-clipboard-paste .address { + display: none; } + #tab-send .send-wrapper .buttons .button-clipboard-paste .icon { + background: url(../img/icon-clipboard-paste.svg); + width: 15px; + height: 19px; + display: inline-block; + margin-bottom: 4px; } + #tab-send .send-wrapper .buttons .button-clipboard-paste.contains-address, #tab-send .send-wrapper .buttons .button-clipboard-paste.contains-content { + background: #FAB915; + color: #FFF !important; + border: 0; + box-shadow: 0 2px 11px 0 #C1C1C1; } + #tab-send .send-wrapper .buttons .button-clipboard-paste.contains-address .address, #tab-send .send-wrapper .buttons .button-clipboard-paste.contains-content .address { + display: none; } + #tab-send .send-wrapper .buttons .button-clipboard-paste.contains-address .icon, #tab-send .send-wrapper .buttons .button-clipboard-paste.contains-content .icon { + background: url(../img/icon-clipboard-paste-white.svg); } + #tab-send .send-wrapper .buttons .button-clipboard-paste.contains-address.contains-address .address, #tab-send .send-wrapper .buttons .button-clipboard-paste.contains-content.contains-address .address { + display: inline; + border: none; + background-color: transparent; } + #tab-send .send-wrapper .buttons .button-clipboard-paste.contains-address.contains-address .non-address, #tab-send .send-wrapper .buttons .button-clipboard-paste.contains-content.contains-address .non-address { + display: none; } + #tab-send .send-wrapper .buttons .button span { + font-size: 14px; } + #tab-send .send-wrapper .buttons .button img { + height: 16px; + width: auto; + margin: 2px 0 4px; } + #tab-send .send-wrapper .buttons .button-qr { + font-weight: bold; + max-width: none; + width: 100%; + height: 95px; + margin-top: 20px; } + #tab-send .send-wrapper .buttons .button-qr img { + vertical-align: middle; + margin-right: 12px; + width: 43px; + height: 43px; } + #tab-send .send-wrapper .buttons .button-qr span { + font-size: 19px; } #tab-send .search-input { background-color: transparent; padding-left: 30px; } -#tab-send .separator-left { - border-left: 1px solid #d9d9df; - padding-left: 10px; - height: 70%; } - -#tab-send .bitcoin-address { - border-top: none; - padding-bottom: .5rem; } - @media (max-width: 480px) { - #tab-send .bitcoin-address input { - font-size: 14px; } } - #tab-send .bitcoin-address .icon { - line-height: 31px; - padding-top: 2px; - padding-bottom: 1px; } - -#tab-send .show-more { - text-align: center; - padding: 20px; - font-size: 16px; - color: #387ef5; - font-weight: bold; } - #tab-send .sendTip { + padding-top: 5vh; text-align: center; } - #tab-send .sendTip > .item-heading { - margin-top: 10px; - background: 0 none; } - #tab-send .sendTip img { - content: url("../img/app/tab-icons/ico-send-selected.svg"); } #tab-send .sendTip .item { border-style: none; } #tab-send .sendTip > .title { font-size: 20px; - font-weight: bold; color: #445; margin: 20px 10px; } #tab-send .sendTip > .subtitle { font-size: 1rem; line-height: 1.5em; font-weight: 300; - color: #445; + color: #6F6F70; margin: 20px 1em 2.5em; } #tab-send .sendTip .big-icon-svg .bg.green { padding: 0 10px; box-shadow: none; } + #tab-send .sendTip .buttons { + margin-top: 18px; } + #tab-send .sendTip .buttons .button { + font-weight: bold; + font-size: 19px; } + #tab-send .sendTip .button-first-contact img { + height: 19px; + width: 19px; + margin-right: 6px; + vertical-align: sub; } + +#tab-send .item-heading { + line-height: 16px; + font-size: 14px; + font-weight: bold; } + #tab-send .item-heading .subtitle { + color: #B5B2B2; + font-size: 12px; + font-weight: 300; } #tab-send .list .item { + font-weight: 600; color: #444; - border-top: none; - padding-top: 1.5rem; - padding-bottom: 1.5rem; } + padding-top: 0.6rem; + padding-bottom: 0.6rem; } + #tab-send .list .item p { + font-weight: normal; } + #tab-send .list .item.item-icon-left { + padding-left: 64px; } #tab-send .list .item .big-icon-svg { left: 5px; } #tab-send .list .item .big-icon-svg > .bg { @@ -11077,7 +11264,7 @@ textarea.d-block { #tab-send .list .item:before { display: block; position: absolute; - width: 80%; + width: 100%; height: 1px; background: rgba(221, 221, 221, 0.3); top: 0; @@ -11096,6 +11283,83 @@ textarea.d-block { #tab-send .scroll { height: 100%; } +#tab-send .card.contacts { + margin: 4px 4px 16px 4px; + border-radius: 6px; + box-shadow: 0px 2px 1px 0 #C1C1C1; } + #tab-send .card.contacts .gravatar { + border-radius: 30px; + height: 40px; + width: 40px; } + +@media only screen and (min-device-width: 320px) and (max-device-width: 568px) { + #tab-send .send-wrapper .buttons .button-qr { + height: 60px; } + #tab-send .send-wrapper .buttons .button-qr span { + font-size: 16px; } + #tab-send #tab-send-header { + height: 270px; } + #tab-send #tab-send-contacts { + height: calc(100vh - 270px - 50px - 44px); + /* screen size - button container - bottom-tab-menu - header top */ } + #tab-send #tab-send-contacts.ios { + height: calc(100vh - 270px - 50px - 44px - 18px); } } + +#wallet-origin-destination .header--request { + padding: 30px 24px; + width: 100%; + height: 139px; + background-color: #fff; } + #wallet-origin-destination .header--request__title { + width: 46px; + height: 20px; + font-size: 16px; + font-weight: 600; + letter-spacing: -0.4px; + color: #000000; } + #wallet-origin-destination .header--request__amount { + font-size: 29px; + font-weight: 600; + letter-spacing: -0.7px; + color: #000000; + margin: 11px 0 2px; } + #wallet-origin-destination .header--request__amount-alt { + opacity: 0.45; + font-size: 16px; + font-weight: 600; + letter-spacing: -0.4px; + color: #000000; } + +#wallet-origin-destination .wallets-header { + margin: 20px 14px 0px; } + #wallet-origin-destination .wallets-header .title { + font-size: 16px; + font-weight: bold; + color: #445; + margin-bottom: -12px; } + +#wallet-origin-destination .card { + font-size: 12px; + margin: 20px 14px 0px; } + #wallet-origin-destination .card .item-heading { + font-weight: 600; } + #wallet-origin-destination .card .item-heading .subtitle { + font-size: 12px; } + #wallet-origin-destination .card-insufficient .wallet { + opacity: 0.4; } + #wallet-origin-destination .card-insufficient .item-heading { + font-size: 12px; } + #wallet-origin-destination .card-insufficient .item-heading > div { + display: inline-block; + vertical-align: text-bottom; } + #wallet-origin-destination .card-insufficient__dot { + display: inline-block; + width: 16px; + height: 16px; + background-color: #ec5959; + border-radius: 8px; + margin: 2px 6px 2px 2px; } + .settings .icon-bitpay { background-image: url("../img/icon-bitpay.svg"); } @@ -11604,7 +11868,8 @@ textarea.d-block { fill: white; } #walletDetails .bp-content { position: relative; - height: 100%; } + height: 100%; + height: calc(100% - env(safe-area-inset-bottom) * 2); } #walletDetails .bp-content.status-bar { margin-top: 20px; } #walletDetails .bar-header { @@ -11618,7 +11883,8 @@ textarea.d-block { background-color: inherit !important; } #walletDetails ion-content { padding-top: 0; - top: 0; } + top: 0; + margin-bottom: 16px; } #walletDetails ion-content.collapsible { margin-top: 210px; } #walletDetails ion-content .scroll { @@ -11763,6 +12029,73 @@ a.item { color: #667; font-size: 0.9em; } +#shapeshift .swap-image { + width: auto; + max-width: 400px; + max-height: 25vh; } + +#shapeshift .empty-case { + padding-top: 5vh; + text-align: center; } + #shapeshift .empty-case .item { + border-style: none; } + #shapeshift .empty-case > .title { + font-size: 20px; + color: #445; + margin: 20px 10px; } + #shapeshift .empty-case > .subtitle { + font-size: 1rem; + line-height: 1.5em; + font-weight: 300; + color: #6F6F70; + margin: 20px 1em 2.5em; } + #shapeshift .empty-case .big-icon-svg .bg.green { + padding: 0 10px; + box-shadow: none; } + #shapeshift .empty-case .buttons { + margin-top: 18px; } + #shapeshift .empty-case .buttons .button { + font-weight: bold; + font-size: 19px; } + #shapeshift .empty-case .button-first-contact img { + height: 19px; + width: 19px; + margin-right: 6px; + vertical-align: sub; } + +#shapeshift .button-shapeshift { + border-color: #FFF; + background-color: #243F5D; + color: #FFF; + border: 0px; + box-shadow: 0 2px 11px 0 #C1C1C1; } + #shapeshift .button-shapeshift:hover { + color: #FFF; + text-decoration: none; } + #shapeshift .button-shapeshift.active, #shapeshift .button-shapeshift.activated { + border-color: #FFF; + background-color: #606060; } + #shapeshift .button-shapeshift.button-clear { + border-color: transparent; + background: none; + box-shadow: none; + color: #FFF; } + #shapeshift .button-shapeshift.button-icon { + border-color: transparent; + background: none; } + #shapeshift .button-shapeshift.button-outline { + border-color: #C1C1C1; + background: transparent; + color: #C1C1C1; } + #shapeshift .button-shapeshift.button-outline.active, #shapeshift .button-shapeshift.button-outline.activated { + background-color: #C1C1C1; + box-shadow: none; + color: #fff; } + +.header.shapeshift { + background: url(../img/shapeshiftbg.jpg) center center no-repeat #28394d; + opacity: 0.99; } + #bitpayCard { background: white; } #bitpayCard .status-label { @@ -12211,7 +12544,6 @@ a.item { position: relative; height: 70px; border-color: #fab915; - background-color: #fab915; padding-top: 20px; margin-bottom: 50px; text-align: center; } @@ -13013,74 +13345,13 @@ a.item { .onboarding-illustration-backup-warning { background-image: url(../img/app/backup-warning.svg); } -#rate-card .item-heading { - font-weight: 700; } - -#rate-card .row { - border: none; } - -#rate-card .item-icon-right { - margin: 0; } - -#rate-card .feedback-flow-button { - margin-bottom: 20px; } - -#rate-card .icon-svg > img { - height: 1.8rem; - margin-bottom: 5px; } - -#send-feedback { - background-color: #ffffff; } - #send-feedback .row { - border: none; } - #send-feedback .skip { - color: rgba(255, 255, 255, 0.3); } - #send-feedback .feedback-heading { - padding-top: 20px; } - #send-feedback .feedback-title { - padding-left: 10px; - font-size: 20px; - font-weight: bold; - color: #445; } - #send-feedback .rating { - text-align: right; - padding-right: 15px; } - #send-feedback .comment { - padding: 0 20px 20px; - font-size: 1rem; - line-height: 1.5em; - font-weight: 300; - color: #445; } - #send-feedback .user-feedback { - border-top: 1px solid #f2f2f2; - border-bottom: 1px solid #f2f2f2; - padding: 20px; - width: 100%; - margin-bottom: 20px; - -webkit-appearance: none; } - #send-feedback .send-feedback-star { - height: 1rem; - margin-left: 5px; } - #send-feedback .form-fade-in { - opacity: 0; - animation-name: fadeIn; - animation-duration: .5s; - animation-fill-mode: forwards; - animation-timing-function: ease-in; } - -@keyframes fadeIn { - from { - opacity: 0; } - to { - opacity: 1; } } - -#complete { +#share-app { background-color: #fff; } - #complete .complete-layout { + #share-app .share-app-layout { display: flex; flex-direction: column; height: 100%; } - #complete .complete-layout__expand { + #share-app .share-app-layout__expand { display: flex; flex-direction: column; flex-grow: 1; @@ -13089,36 +13360,27 @@ a.item { text-align: center; opacity: 0; transition: opacity .3s; } - #complete .complete-layout__expand.fade-in { + #share-app .share-app-layout__expand.fade-in { opacity: 1; } - #complete .share-the-love-illustration { + #share-app .share-the-love-illustration { width: 5rem; margin: 1rem; } - #complete .send-feedback-illustration { - height: 16rem; - margin: 1rem; } - #complete .feedback-title { - font-size: 20px; - font-weight: bold; - color: #445; - margin: 20px 10px; - text-align: center; } - #complete .subtitle { + #share-app .subtitle { padding: 10px 30px 20px; text-align: center; color: #667; } - #complete .icon-svg > img { + #share-app .icon-svg > img { height: 16rem; width: 16rem; margin: 10px; } - #complete .socialsharing-icon { + #share-app .socialsharing-icon { display: inline-block; width: 60px; } - #complete .addressbook-icon-svg { + #share-app .addressbook-icon-svg { display: inline-block; width: 50px; height: 50px; } - #complete .share-buttons { + #share-app .share-buttons { padding: 50px 10px 30px; background-color: #f2f2f2; text-align: center; @@ -13130,7 +13392,7 @@ a.item { animation-fill-mode: forwards; animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1); animation-delay: .2s; } - #complete .share-buttons__action { + #share-app .share-buttons__action { display: inline-block; color: #667; font-size: .9rem; @@ -13148,38 +13410,6 @@ a.item { transform: translateY(0); opacity: 1; } } -#rate-app { - background-color: #ffffff; - text-align: center; } - #rate-app .skip-rating { - color: #445; - position: absolute; - top: 5px; - right: 10px; - padding: 15px; } - #rate-app .icon-svg > img { - width: 80px; - height: 80px; - margin-top: 15px; } - #rate-app .feedback-title { - font-size: 20px; - font-weight: bold; - color: #445; - margin: 80px 50px 10px; - text-align: center; } - #rate-app .share-the-love-illustration { - width: 5rem; - margin: 1rem; } - #rate-app .subtitle { - padding: 10px 30px 20px 40px; - color: #667; } - #rate-app .rate-buttons { - bottom: 0; - width: 100%; - position: absolute; - background-color: #f2f2f2; - padding: 30px 0 15px; } - action-sheet .bp-action-sheet__sheet { background: #fff; width: calc(100% + 1px); @@ -13800,7 +14030,11 @@ slide-to-accept-success { transform: translateY(5rem); opacity: 0; transition: transform 400ms ease, opacity 400ms ease; - transition-delay: 250ms; } + transition-delay: 250ms; + margin-bottom: constant(safe-area-inset-bottom); + /* iOS 11.0 */ + margin-bottom: env(safe-area-inset-bottom); + /* iOS 11.2 */ } slide-to-accept-success .slide-success__footer.reveal { -webkit-transform: translateY(0); transform: translateY(0); @@ -13858,16 +14092,16 @@ slide-to-accept-success { line-height: 30px; } #txp-details .head .amount-label .amount, #view-confirm .head .amount-label .amount { - font-size: 38px; - margin-bottom: .5rem; } - #txp-details .head .amount-label .amount > .unit, - #view-confirm .head .amount-label .amount > .unit { - font-family: "Roboto-Light"; } + font-size: 16px; + color: #9B9B9B; + font-family: "Roboto-Light"; } #txp-details .head .amount-label .alternative, #view-confirm .head .amount-label .alternative { - font-size: 16px; - font-family: "Roboto-Light"; - color: #9B9B9B; } + font-size: 38px; + margin-bottom: .5rem; } + #txp-details .head .amount-label .alternative > .unit, + #view-confirm .head .amount-label .alternative > .unit { + font-family: "Roboto-Light"; } #txp-details .item, #view-confirm .item { border-color: #EFEFEF; } @@ -14155,6 +14389,10 @@ wallet-selector .subheader { font-weight: bold; padding-bottom: 10px; border-bottom: 1px solid #EFEFEF; } + wallet-selector .subheader .subtitle { + color: #667; + font-size: 12px; + font-weight: 300; } wallet-selector .subheader .wallet-coin-logo { vertical-align: middle; margin-right: 5px; } @@ -15014,10 +15252,208 @@ log-options #check-bar .checkbox-icon { #cash-scan a { cursor: pointer; } +#view-review { + background-color: #494949; } + #view-review slide-to-accept, #view-review slide-to-accept-success { + margin-bottom: constant(safe-area-inset-bottom); + /* iOS 11.0 */ + margin-bottom: env(safe-area-inset-bottom); + /* iOS 11.2 */ } + #view-review .fee-summary { + position: absolute; + bottom: 92px; } + #view-review .shapeshift-banner { + box-shadow: none; } + .gravatar { border-radius: 3px; display: inline-block; } +.elastic { + width: 100%; + font-size: 14px; } + +/* +* Extends Ionic v1 item +*/ +.item.item-compact { + padding: 11px 13px; } + +.item.item-gutterless { + padding: 0; } + +.item .item-content.item-content-avatar { + min-height: 69px; + padding: 13px 11px 13px 68px; } + .item .item-content.item-content-avatar > img:first-child, + .item .item-content.item-content-avatar > i:first-child { + position: absolute; + max-width: 40px; + max-height: 40px; + width: 100%; + height: 100%; + border-radius: 50%; + left: 13px; + top: 50%; + padding: 0; + transform: translate(0, -50%); } + +.item .item-content.item-content-compact { + min-height: 0; + padding: 13px 11px; } + +.item .item-content .highlight { + color: #FAB915; } + +.item .item-content + .item-content { + padding-top: 0; } + +/* +* Extends Ionic v1 ion-content +*/ +ion-content.bg-neutral { + background-color: #F2F2F2; } + +ion-content.padded-bottom-cta { + bottom: 92px; } + +ion-content.padded-bottom-cta-with-summary { + bottom: 134px; } + +.card.card-gutter-compact { + margin: 10px 12px; } + +.header { + padding: 29px 12px 61px; + background-color: #FAB915; + color: #FFFFFF; } + .header .title { + font-size: 18px; + font-weight: 400; + line-height: 1em; + color: #FFFFFF; + text-align: center; } + .header .title + .content { + margin-top: 23px; } + .header .content { + text-align: center; } + .header .content p { + margin: 0; + line-height: 1em; + font-size: 18px; } + .header .content p.large { + font-size: 29px; + font-weight: 600; } + .header .content p + p { + margin-top: 8px; } + +.content-frame.negative-top { + margin-top: -40px; } + .content-frame.negative-top .card:first-child { + margin-top: 0; } + +.address { + background-color: #F8F8F8; + border: 0.5px solid #EDEBEB; + border-radius: 3px; + padding: 9px; + text-align: center; + font-size: 14px; + overflow: hidden; + text-overflow: ellipsis; } + .address.expanded { + white-space: pre-wrap; + word-break: break-all; } + .address .prefix { + color: #000000; } + .address .mid { + color: #919191; } + .address .suffix { + color: #000000; } + +.action-minor { + margin: 20px 14px; + font-size: 14px; } + .action-minor.mt-negative { + margin-top: 0; } + .action-minor.text-right { + text-align: right; } + .action-minor > .action-icon { + width: 15px; + height: 15px; + vertical-align: middle; + margin-right: 3px; } + .action-minor > .action-text { + vertical-align: middle; + color: #444444; } + +.expand-content-frame { + position: relative; } + .expand-content-frame .expand-content-trigger { + position: absolute; + top: 0; + transition: opacity 0.3s ease; + right: 0; } + .expand-content-frame .expand-content-trigger.expand-content-revealed { + opacity: 0; } + .expand-content-frame .expand-content { + opacity: 0; + transform-origin: 100% 0%; + transform: scale(0, 0); + transition: opacity 0.3s ease, transform 0.3s ease; } + .expand-content-frame .expand-content.expand-content-revealed { + opacity: 1; + transform: scale(1, 1); } + +.fee-summary { + position: relative; + display: flex; + justify-content: space-between; + width: 100%; + padding: 5px 12px 15px; + box-sizing: border-box; + background-color: #F2F2F2; } + .fee-summary:before { + content: ''; + position: absolute; + left: 0; + top: -15px; + width: 100%; + height: 15px; + background: linear-gradient(to bottom, rgba(242, 242, 242, 0) 0%, #f2f2f2 100%); } + .fee-summary .fee-fiat.positive { + color: #70955F; } + .fee-summary .fee-fiat.negative { + color: #C24633; } + .fee-summary .fee-crypto { + color: #A7A7A7; } + +.amount .start, +.amount .middle, +.amount .end, +.amount .currency { + display: inline-block; } + +.amount .start { + font-size: 1em; } + +.amount .middle { + font-size: 0.7857em; + margin-left: 5px; } + +.amount .end { + font-size: 0.7857em; + margin-left: 5px; } + +.amount.size-equal .middle, +.amount.size-equal .end { + font-size: 1em; } + +.amount .currency { + font-size: 1em; + margin-left: 5px; + text-transform: uppercase; } + /* This is for rules that don't yet have a home. * Our goal is to delete this file. Search the regex: /class=".*CLASS.*?"/ */ From 3ca95d6d407304f6a4789cbe38b3ad4a882d6236 Mon Sep 17 00:00:00 2001 From: Brendon Duncan Date: Fri, 3 Aug 2018 17:56:46 +1200 Subject: [PATCH 124/256] Wallet to wallet transaction sent successfully. The UI for it is still incomplete. --- src/js/controllers/review.controller.js | 109 ++++++++++++++++++++---- www/views/review.html | 2 +- 2 files changed, 93 insertions(+), 18 deletions(-) diff --git a/src/js/controllers/review.controller.js b/src/js/controllers/review.controller.js index 85950a8aa..e487c6bfc 100644 --- a/src/js/controllers/review.controller.js +++ b/src/js/controllers/review.controller.js @@ -7,6 +7,7 @@ angular function reviewController(addressbookService, bitcoinCashJsService, bitcore, bitcoreCash, bwcError, configService, feeService, gettextCatalog, $ionicLoading, $ionicModal, lodash, $log, ongoingProcess, platformInfo, popupService, profileService, $scope, $timeout, txFormatService, walletService) { var vm = this; + vm.buttonText = ''; vm.destination = { address: '', balanceAmount: '', @@ -32,15 +33,16 @@ function reviewController(addressbookService, bitcoinCashJsService, bitcore, bit name: '', }; vm.isCordova = platformInfo.isCordova; + vm.notReadyMessage = ''; vm.primaryAmount = ''; vm.primaryCurrency = ''; vm.usingMerchantFee = false; + vm.readyToSend = false; vm.secondaryAmount = ''; vm.secondaryCurrency = ''; - vm.thirdParty = false; vm.sendingTitle = gettextCatalog.getString('You are sending'); - vm.buttonText = ''; - + vm.thirdParty = false; + var config = null; var coin = ''; var countDown = null; @@ -102,6 +104,65 @@ function reviewController(addressbookService, bitcoinCashJsService, bitcore, bit }); } + vm.approve = function(onSendStatusChange) { + + if (!tx || !originWallet) return; + + if ($scope.paymentExpired) { + popupService.showAlert(null, gettextCatalog.getString('This bitcoin payment request has expired.')); + $scope.sendStatus = ''; + $timeout(function() { + $scope.$apply(); + }); + return; + } + + ongoingProcess.set('creatingTx', true, onSendStatusChange); + getTxp(lodash.clone(tx), originWallet, false, function(err, txp) { + ongoingProcess.set('creatingTx', false, onSendStatusChange); + if (err) return; + + // confirm txs for more that 20usd, if not spending/touchid is enabled + function confirmTx(cb) { + if (walletService.isEncrypted(originWallet)) + return cb(); + + var amountUsd = parseFloat(txFormatService.formatToUSD(originWallet.coin, txp.amount)); + return cb(); + }; + + function publishAndSign() { + if (!originWallet.canSign() && !originWallet.isPrivKeyExternal()) { + $log.info('No signing proposal: No private key'); + + return walletService.onlyPublish(originWallet, txp, function(err) { + if (err) setSendError(err); + }, onSendStatusChange); + } + + walletService.publishAndSign(originWallet, txp, function(err, txp) { + if (err) return setSendError(err); + if (config.confirmedTxsNotifications && config.confirmedTxsNotifications.enabled) { + txConfirmNotification.subscribe(originWallet, { + txid: txp.txid + }); + } + }, onSendStatusChange); + }; + + confirmTx(function(nok) { + if (nok) { + $scope.sendStatus = ''; + $timeout(function() { + $scope.$apply(); + }); + return; + } + publishAndSign(); + }); + }); + }; + vm.chooseFeeLevel = function(tx, wallet) { if (wallet.coin == 'bch') return; @@ -149,12 +210,13 @@ function reviewController(addressbookService, bitcoinCashJsService, bitcore, bit }; function createVanityTransaction(data) { + console.log('createVanityTransaction()'); var configFeeLevel = config.wallet.settings.feeLevel ? config.wallet.settings.feeLevel : 'normal'; // Grab stateParams tx = { amount: parseInt(data.stateParams.amount), - sendMax: data.stateParams.useSendMax == 'true' ? true : false, + sendMax: data.stateParams.sendMax === 'true' ? true : false, fromWalletId: data.stateParams.fromWalletId, toAddress: data.stateParams.toAddress, feeLevel: configFeeLevel, @@ -182,24 +244,29 @@ function reviewController(addressbookService, bitcoinCashJsService, bitcore, bit var B = data.stateParams.coin === 'bch' ? bitcoreCash : bitcore; var networkName; try { - if (vm.destination.kind === 'wallet') { // There is a wallet-to-wallet transfer + if (vm.destination.kind === 'wallet') { // This is a wallet-to-wallet transfer $ionicLoading.show(); var toWallet = profileService.getWallet(data.stateParams.toWalletId); // We need an address to send to, so we ask the walletService to create a new address for the toWallet. - walletService.getAddress(toWallet, true, function (err, addr) { + console.log('Getting address for wallet...'); + walletService.getAddress(toWallet, true, function onWalletAddress(err, addr) { + console.log('getAddress cb called', err); $ionicLoading.hide(); tx.toAddress = addr; networkName = (new B.Address(tx.toAddress)).network.name; tx.network = networkName; + console.log('calling setupTx() for wallet.'); setupTx(tx); }); } else { // This is a Wallet-to-address transfer networkName = (new B.Address(tx.toAddress)).network.name; tx.network = networkName; + console.log('calling setupTx() for address.'); setupTx(tx); } } catch (e) { + console.error('Error setting up tx', e); var message = gettextCatalog.getString('Invalid address'); popupService.showAlert(null, message, function () { $ionicHistory.nextViewOptions({ @@ -326,10 +393,8 @@ function reviewController(addressbookService, bitcoinCashJsService, bitcore, bit // Check if the recipient is a contact addressbookService.get(originCoin + address, function(err, contact) { if (!err && contact) { - console.log('destination is contact'); handleDestinationAsContact(contact); } else { - console.log('destination is address'); vm.destination.address = address; vm.destination.kind = 'address'; } @@ -352,7 +417,6 @@ function reviewController(addressbookService, bitcoinCashJsService, bitcore, bit return; } - console.log('destination is wallet'); var destinationWallet = profileService.getWallet(destinationWalletId); vm.destination.coin = destinationWallet.coin; vm.destination.color = destinationWallet.color; @@ -434,8 +498,19 @@ function reviewController(addressbookService, bitcoinCashJsService, bitcore, bit } } + function setNotReady(msg, criticalError) { + vn.readyToSend = false; + vm.notReadyMessage = msg; + $scope.criticalError = criticalError; + $log.warn('Not ready to make the payment:' + msg); + $timeout(function() { + $scope.$apply(); + }); + }; + function setSendError(msg) { $scope.sendStatus = ''; + vm.readyToSend = false; $timeout(function() { $scope.$apply(); }); @@ -514,12 +589,6 @@ function reviewController(addressbookService, bitcoinCashJsService, bitcore, bit // updateAmount(); // refresh(); - // End of quick refresh, before wallet is selected. - if (!wallet) { - ongoingProcess.set('calculatingFee', false); - return cb(); - } - var feeServiceLevel = usingMerchantFee && originWallet.coin == 'btc' ? 'urgent' : tx.feeLevel; feeService.getFeeRate(originWallet.coin, tx.network, feeServiceLevel, function(err, feeRate) { if (err) { @@ -553,7 +622,7 @@ function reviewController(addressbookService, bitcoinCashJsService, bitcore, bit if (tx.sendMax && sendMaxInfo.amount == 0) { ongoingProcess.set('calculatingFee', false); - setNoWallet(gettextCatalog.getString('Insufficient confirmed funds')); + setNotReady(gettextCatalog.getString('Insufficient confirmed funds')); popupService.showAlert(gettextCatalog.getString('Error'), gettextCatalog.getString('Not enough funds for fee')); return cb('no_funds'); } @@ -570,15 +639,18 @@ function reviewController(addressbookService, bitcoinCashJsService, bitcore, bit // txp already generated for this wallet? if (tx.txp[wallet.id]) { ongoingProcess.set('calculatingFee', false); + vm.readyToSend = true; updateSendAmounts(); + $scope.$apply(); return cb(); } + console.log('calling getTxp() from getSendMaxInfo cb.'); getTxp(lodash.clone(tx), wallet, opts.dryRun, function(err, txp) { ongoingProcess.set('calculatingFee', false); if (err) { if (err.message == 'Insufficient funds') { - setNoWallet(gettextCatalog.getString('Insufficient funds')); + setNotReady(gettextCatalog.getString('Insufficient funds')); popupService.showAlert(gettextCatalog.getString('Error'), gettextCatalog.getString('Not enough funds for fee')); return cb('no_funds'); } else @@ -611,7 +683,10 @@ function reviewController(addressbookService, bitcoinCashJsService, bitcore, bit tx.txp[wallet.id] = txp; $log.debug('Confirm. TX Fully Updated for wallet:' + wallet.id, tx); + vm.readyToSend = true; updateSendAmounts(); + console.log('readyToSend:', vm.readyToSend); + $scope.$apply(); return cb(); }); diff --git a/www/views/review.html b/www/views/review.html index c1f37baf9..0b20bd7fc 100644 --- a/www/views/review.html +++ b/www/views/review.html @@ -73,7 +73,7 @@
-
Fee: Less than 1 cent
+
Fee: Less than 1 cent
Fee: {{vm.feeFiat}} {{vm.feeCurrency}}
{{vm.feeCrypto}} {{vm.origin.currency}} From 5973b30551fe3c50820c1b2ca720813163590263 Mon Sep 17 00:00:00 2001 From: Brendon Duncan Date: Fri, 3 Aug 2018 19:14:33 +1200 Subject: [PATCH 125/256] Sends wallet to wallet transaction with sound. --- src/js/controllers/review.controller.js | 117 +++++++++++++++++------- www/views/review.html | 34 +++---- 2 files changed, 99 insertions(+), 52 deletions(-) diff --git a/src/js/controllers/review.controller.js b/src/js/controllers/review.controller.js index e487c6bfc..833c8a330 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, $ionicLoading, $ionicModal, lodash, $log, ongoingProcess, platformInfo, popupService, profileService, $scope, $timeout, txFormatService, walletService) { +function reviewController(addressbookService, bitcoinCashJsService, bitcore, bitcoreCash, bwcError, configService, feeService, gettextCatalog, $ionicLoading, $ionicModal, lodash, $log, ongoingProcess, platformInfo, popupService, profileService, $scope, soundService, $state, $timeout, txConfirmNotification, txFormatService, walletService) { var vm = this; vm.buttonText = ''; @@ -24,16 +24,15 @@ function reviewController(addressbookService, bitcoinCashJsService, bitcore, bit vm.fiatCurrency = ''; vm.feeIsHigh = false; vm.feeLessThanACent = false; + vm.isCordova = platformInfo.isCordova; + vm.notReadyMessage = ''; vm.origin = { balanceAmount: '', balanceCurrency: '', - color: '', currency: '', currencyColor: '', - name: '', }; - vm.isCordova = platformInfo.isCordova; - vm.notReadyMessage = ''; + vm.originWallet = null; vm.primaryAmount = ''; vm.primaryCurrency = ''; vm.usingMerchantFee = false; @@ -41,7 +40,9 @@ function reviewController(addressbookService, bitcoinCashJsService, bitcore, bit vm.secondaryAmount = ''; vm.secondaryCurrency = ''; vm.sendingTitle = gettextCatalog.getString('You are sending'); + vm.sendStatus = ''; vm.thirdParty = false; + vm.wallet = null; var config = null; var coin = ''; @@ -50,7 +51,6 @@ function reviewController(addressbookService, bitcoinCashJsService, bitcore, bit var usingMerchantFee = false; var destinationWalletId = ''; var originWalletId = ''; - var originWallet; var priceDisplayIsFiat = true; var satoshis = null; var toAddress = ''; @@ -68,11 +68,9 @@ function reviewController(addressbookService, bitcoinCashJsService, bitcore, bit satoshis = parseInt(data.stateParams.amount, 10); toAddress = data.stateParams.toAddr; - originWallet = profileService.getWallet(originWalletId); - vm.origin.currency = originWallet.coin.toUpperCase(); - vm.origin.color = originWallet.color; - vm.origin.name = originWallet.name; - coin = originWallet.coin; + vm.originWallet = profileService.getWallet(originWalletId); + vm.origin.currency = vm.originWallet.coin.toUpperCase(); + coin = vm.originWallet.coin; if (data.stateParams.thirdParty) { vm.thirdParty = JSON.parse(data.stateParams.thirdParty); // Parse stringified JSON-object @@ -93,20 +91,20 @@ function reviewController(addressbookService, bitcoinCashJsService, bitcore, bit } else { config = configCache; priceDisplayIsFiat = config.wallet.settings.priceDisplay === 'fiat'; - vm.origin.currencyColor = originWallet.coin === 'btc' ? config.bitcoinWalletColor : config.bitcoinCashWalletColor; + vm.origin.currencyColor = vm.originWallet.coin === 'btc' ? config.bitcoinWalletColor : config.bitcoinCashWalletColor; unitFromSat = 1 / config.wallet.settings.unitToSatoshi; } updateSendAmounts(); - getOriginWalletBalance(originWallet); + getOriginWalletBalance(vm.originWallet); handleDestinationAsAddress(toAddress, coin); handleDestinationAsWallet(data.stateParams.toWalletId); createVanityTransaction(data); }); } - vm.approve = function(onSendStatusChange) { + vm.approve = function() { - if (!tx || !originWallet) return; + if (!tx || !vm.originWallet) return; if ($scope.paymentExpired) { popupService.showAlert(null, gettextCatalog.getString('This bitcoin payment request has expired.')); @@ -117,42 +115,42 @@ function reviewController(addressbookService, bitcoinCashJsService, bitcore, bit return; } - ongoingProcess.set('creatingTx', true, onSendStatusChange); - getTxp(lodash.clone(tx), originWallet, false, function(err, txp) { - ongoingProcess.set('creatingTx', false, onSendStatusChange); + ongoingProcess.set('creatingTx', true, statusChangeHandler); + getTxp(lodash.clone(tx), vm.originWallet, false, function(err, txp) { + ongoingProcess.set('creatingTx', false, statusChangeHandler); if (err) return; // confirm txs for more that 20usd, if not spending/touchid is enabled function confirmTx(cb) { - if (walletService.isEncrypted(originWallet)) + if (walletService.isEncrypted(vm.originWallet)) return cb(); - var amountUsd = parseFloat(txFormatService.formatToUSD(originWallet.coin, txp.amount)); + var amountUsd = parseFloat(txFormatService.formatToUSD(vm.originWallet.coin, txp.amount)); return cb(); }; function publishAndSign() { - if (!originWallet.canSign() && !originWallet.isPrivKeyExternal()) { + if (!vm.originWallet.canSign() && !vm.originWallet.isPrivKeyExternal()) { $log.info('No signing proposal: No private key'); - return walletService.onlyPublish(originWallet, txp, function(err) { + return walletService.onlyPublish(vm.originWallet, txp, function(err) { if (err) setSendError(err); - }, onSendStatusChange); + }, statusChangeHandler); } - walletService.publishAndSign(originWallet, txp, function(err, txp) { + walletService.publishAndSign(vm.originWallet, txp, function(err, txp) { if (err) return setSendError(err); if (config.confirmedTxsNotifications && config.confirmedTxsNotifications.enabled) { - txConfirmNotification.subscribe(originWallet, { + txConfirmNotification.subscribe(vm.originWallet, { txid: txp.txid }); } - }, onSendStatusChange); + }, statusChangeHandler); }; confirmTx(function(nok) { if (nok) { - $scope.sendStatus = ''; + vm.sendStatus = ''; $timeout(function() { $scope.$apply(); }); @@ -172,7 +170,7 @@ function reviewController(addressbookService, bitcoinCashJsService, bitcore, bit scope.network = tx.network; scope.feeLevel = tx.feeLevel; scope.noSave = true; - scope.coin = originWallet.coin; + scope.coin = vm.originWallet.coin; if (usingCustomFee) { scope.customFeePerKB = tx.feeRate; @@ -202,7 +200,7 @@ function reviewController(addressbookService, bitcoinCashJsService, bitcore, bit tx.feeLevel = newFeeLevel; if (usingCustomFee) tx.feeRate = parseInt(customFeePerKB); - updateTx(tx, originWallet, { + updateTx(tx, vm.originWallet, { clearCache: true, dryRun: true }, function() {}); @@ -228,7 +226,7 @@ function reviewController(addressbookService, bitcoinCashJsService, bitcore, bit toEmail: vm.destination.email || null, toColor: vm.destination.color || null, network: false, - coin: originWallet.coin, + coin: vm.originWallet.coin, txp: {}, }; @@ -281,7 +279,7 @@ function reviewController(addressbookService, bitcoinCashJsService, bitcore, bit } } function getOriginWalletBalance(originWallet) { - var balanceText = getWalletBalanceDisplayText(originWallet); + var balanceText = getWalletBalanceDisplayText(vm.originWallet); vm.origin.balanceAmount = balanceText.amount; vm.origin.balanceCurrency = balanceText.currency; } @@ -476,6 +474,18 @@ function reviewController(addressbookService, bitcoinCashJsService, bitcore, bit }); } + vm.onSuccessConfirm = function() { + vm.sendStatus = ''; + $ionicHistory.nextViewOptions({ + disableAnimate: true, + historyRoot: true + }); + $state.go('tabs.send').then(function() { + $ionicHistory.clearHistory(); + $state.transitionTo('tabs.home'); + }); + }; + function setButtonText(isMultisig, isPayPro) { if (isPayPro) { if (vm.isCordova) { @@ -536,12 +546,12 @@ function reviewController(addressbookService, bitcoinCashJsService, bitcore, bit vm.showAddress = false; - setButtonText(originWallet.credentials.m > 1, !!tx.paypro); + setButtonText(vm.originWallet.credentials.m > 1, !!tx.paypro); if (tx.paypro) _paymentTimeControl(tx.paypro.expires); - updateTx(tx, originWallet, { + updateTx(tx, vm.originWallet, { dryRun: true }, function(err) { $timeout(function() { @@ -562,6 +572,43 @@ function reviewController(addressbookService, bitcoinCashJsService, bitcore, bit // } // }); } + + function statusChangeHandler(processName, showName, isOn) { + $log.debug('statusChangeHandler: ', processName, showName, isOn); + if ( + ( + processName === 'broadcastingTx' || + ((processName === 'signingTx') && vm.originWallet.m > 1) || + (processName == 'sendingTx' && !vm.originWallet.canSign() && !vm.originWallet.isPrivKeyExternal()) + ) && !isOn) { + $scope.sendStatus = 'success'; + + if ($state.current.name === "tabs.send.review") { // XX SP: Otherwise all open wallets on other devices play this sound if you have been in a send flow before on that device. + soundService.play('misc/payment_sent.mp3'); + } + + var channel = "firebase"; + if (platformInfo.isNW) { + channel = "ga"; + } + // When displaying Fiat, if the formatting fails, the crypto will be the primary amount. + var amount = priceDisplayIsFiat ? vm.secondaryAmount || vm.primaryAmount : vm.primaryAmount; + var log = new window.BitAnalytics.LogEvent("transfer_success", [{ + "coin": vm.originWallet.coin, + "type": "outgoing", + "amount": amount, + "fees": vm.feeCrypto + }], [channel, "adjust"]); + window.BitAnalytics.LogEventHandlers.postEvent(log); + + $timeout(function() { + $scope.$digest(); + }, 100); + } else if (showName) { + $scope.sendStatus = showName; + } + }; + function updateTx(tx, wallet, opts, cb) { ongoingProcess.set('calculatingFee', true); @@ -589,8 +636,8 @@ function reviewController(addressbookService, bitcoinCashJsService, bitcore, bit // updateAmount(); // refresh(); - var feeServiceLevel = usingMerchantFee && originWallet.coin == 'btc' ? 'urgent' : tx.feeLevel; - feeService.getFeeRate(originWallet.coin, tx.network, feeServiceLevel, function(err, feeRate) { + var feeServiceLevel = usingMerchantFee && vm.originWallet.coin == 'btc' ? 'urgent' : tx.feeLevel; + feeService.getFeeRate(vm.originWallet.coin, tx.network, feeServiceLevel, function(err, feeRate) { if (err) { ongoingProcess.set('calculatingFee', false); return cb(err); diff --git a/www/views/review.html b/www/views/review.html index 0b20bd7fc..4b1b47a98 100644 --- a/www/views/review.html +++ b/www/views/review.html @@ -25,10 +25,10 @@
-

{{vm.origin.name}} ({{vm.origin.currency}})

+

{{vm.originWallet.name}} ({{vm.origin.currency}})

{{vm.origin.balanceAmount}} {{vm.origin.balanceCurrency}}

@@ -73,7 +73,7 @@
-
Fee: Less than 1 cent
+
Fee: Less than 1 cent
Fee: {{vm.feeFiat}} {{vm.feeCurrency}}
{{vm.feeCrypto}} {{vm.origin.currency}} @@ -81,25 +81,25 @@
- {{buttonText}} + ng-click="vm.approve()" + ng-if="!vm.isCordova" + click-send-status="vm.sendStatus" + is-disabled="!vm.readyToSend"> + {{vm.buttonText}} - {{buttonText}} + slide-on-confirm="vm.approve()" + slide-send-status="vm.sendStatus" + is-disabled="!vm.readyToSend"> + {{vm.buttonText}} - Payment Sent - Proposal Created - Transaction Created + Payment Sent + Proposal Created + Transaction Created From 671b46da41867e08de840abc643cfcf411f0fa92 Mon Sep 17 00:00:00 2001 From: Sam Cheng Hung Date: Fri, 3 Aug 2018 15:32:54 +0800 Subject: [PATCH 126/256] Changes address component name to address-frame --- .../components/{address.scss => address-frame.scss} | 2 +- src/sass/components/components.scss | 2 +- www/css/main.css | 10 +++++----- www/views/review.html | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) rename src/sass/components/{address.scss => address-frame.scss} (95%) diff --git a/src/sass/components/address.scss b/src/sass/components/address-frame.scss similarity index 95% rename from src/sass/components/address.scss rename to src/sass/components/address-frame.scss index 2848deb82..b06ce8bea 100644 --- a/src/sass/components/address.scss +++ b/src/sass/components/address-frame.scss @@ -1,4 +1,4 @@ -.address { +.address-frame { background-color: #F8F8F8; border: 0.5px solid #EDEBEB; border-radius: 3px; diff --git a/src/sass/components/components.scss b/src/sass/components/components.scss index eae56e786..0af55e5be 100644 --- a/src/sass/components/components.scss +++ b/src/sass/components/components.scss @@ -4,7 +4,7 @@ @import "header"; @import "content-frame"; -@import "address"; +@import "address-frame"; @import "action-minor"; @import "expand-content"; @import "fee-summary"; diff --git a/www/css/main.css b/www/css/main.css index e39d96cf3..df39fda50 100644 --- a/www/css/main.css +++ b/www/css/main.css @@ -15352,7 +15352,7 @@ ion-content.padded-bottom-cta-with-summary { .content-frame.negative-top .card:first-child { margin-top: 0; } -.address { +.address-frame { background-color: #F8F8F8; border: 0.5px solid #EDEBEB; border-radius: 3px; @@ -15361,14 +15361,14 @@ ion-content.padded-bottom-cta-with-summary { font-size: 14px; overflow: hidden; text-overflow: ellipsis; } - .address.expanded { + .address-frame.expanded { white-space: pre-wrap; word-break: break-all; } - .address .prefix { + .address-frame .prefix { color: #000000; } - .address .mid { + .address-frame .mid { color: #919191; } - .address .suffix { + .address-frame .suffix { color: #000000; } .action-minor { diff --git a/www/views/review.html b/www/views/review.html index 4b1b47a98..2e7823f69 100644 --- a/www/views/review.html +++ b/www/views/review.html @@ -48,7 +48,7 @@

{{vm.destination.balanceAmount}} {{vm.destination.balanceCurrency}}

-
qz9cqq5pryv9hnqwa8q8mccmynk9uf4vlu5nxerpzmc
+
qz9cqq5pryv9hnqwa8q8mccmynk9uf4vlu5nxerpzmc
From 2f62092fd8994941dc3252aaad48e45aeea33aab Mon Sep 17 00:00:00 2001 From: Brendon Duncan Date: Fri, 3 Aug 2018 19:59:25 +1200 Subject: [PATCH 127/256] Payment sent message is displayed. --- src/js/controllers/review.controller.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/js/controllers/review.controller.js b/src/js/controllers/review.controller.js index 833c8a330..9285436f5 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, $ionicLoading, $ionicModal, lodash, $log, ongoingProcess, platformInfo, popupService, profileService, $scope, soundService, $state, $timeout, txConfirmNotification, txFormatService, walletService) { +function reviewController(addressbookService, bitcoinCashJsService, bitcore, bitcoreCash, bwcError, configService, feeService, gettextCatalog, $ionicHistory, $ionicLoading, $ionicModal, lodash, $log, ongoingProcess, platformInfo, popupService, profileService, $scope, soundService, $state, $timeout, txConfirmNotification, txFormatService, walletService) { var vm = this; vm.buttonText = ''; @@ -581,7 +581,7 @@ function reviewController(addressbookService, bitcoinCashJsService, bitcore, bit ((processName === 'signingTx') && vm.originWallet.m > 1) || (processName == 'sendingTx' && !vm.originWallet.canSign() && !vm.originWallet.isPrivKeyExternal()) ) && !isOn) { - $scope.sendStatus = 'success'; + vm.sendStatus = 'success'; if ($state.current.name === "tabs.send.review") { // XX SP: Otherwise all open wallets on other devices play this sound if you have been in a send flow before on that device. soundService.play('misc/payment_sent.mp3'); @@ -605,7 +605,7 @@ function reviewController(addressbookService, bitcoinCashJsService, bitcore, bit $scope.$digest(); }, 100); } else if (showName) { - $scope.sendStatus = showName; + vm.sendStatus = showName; } }; From 8148ad66b4c8647af82c93a2d4faff07d835bf4b Mon Sep 17 00:00:00 2001 From: Brendon Duncan Date: Fri, 3 Aug 2018 20:11:14 +1200 Subject: [PATCH 128/256] Payments to contacts now work. --- src/js/controllers/review.controller.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/js/controllers/review.controller.js b/src/js/controllers/review.controller.js index 9285436f5..b3addc64f 100644 --- a/src/js/controllers/review.controller.js +++ b/src/js/controllers/review.controller.js @@ -216,7 +216,7 @@ function reviewController(addressbookService, bitcoinCashJsService, bitcore, bit amount: parseInt(data.stateParams.amount), sendMax: data.stateParams.sendMax === 'true' ? true : false, fromWalletId: data.stateParams.fromWalletId, - toAddress: data.stateParams.toAddress, + toAddress: data.stateParams.toAddr, feeLevel: configFeeLevel, spendUnconfirmed: config.wallet.spendUnconfirmed, From cebe9507f169d42451c5a16391e0e260dfb8b325 Mon Sep 17 00:00:00 2001 From: Sebastiaan Pasma Date: Fri, 3 Aug 2018 13:13:29 +0200 Subject: [PATCH 129/256] Make the "to"-address field work in new style + BTC transactions fix --- src/js/controllers/review.controller.js | 2 +- src/js/services/incomingData.js | 2 +- www/views/review.html | 4 +++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/js/controllers/review.controller.js b/src/js/controllers/review.controller.js index b3addc64f..7d8efbfac 100644 --- a/src/js/controllers/review.controller.js +++ b/src/js/controllers/review.controller.js @@ -531,7 +531,7 @@ function reviewController(addressbookService, bitcoinCashJsService, bitcore, bit if (tx.coin === 'bch') { tx.displayAddress = bitcoinCashJsService.readAddress(tx.toAddress).cashaddr; } else { - tx.displayAddress = entry.address; + tx.displayAddress = tx.toAddress; } addressbookService.get(tx.coin+tx.toAddress, function(err, addr) { // Check if the recipient is a contact diff --git a/src/js/services/incomingData.js b/src/js/services/incomingData.js index fb8d8868a..55a453dab 100644 --- a/src/js/services/incomingData.js +++ b/src/js/services/incomingData.js @@ -386,7 +386,7 @@ angular.module('copayApp.services').factory('incomingData', function($log, $stat 'notify': $state.current.name == 'tabs.send' ? false : true }); $timeout(function() { - $state.transitionTo('tabs.send.amount', { + $state.transitionTo('tabs.send.origin', { toAddress: toAddress, coin: coin, noPrefix: 1 diff --git a/www/views/review.html b/www/views/review.html index 2e7823f69..2f8a4ee3a 100644 --- a/www/views/review.html +++ b/www/views/review.html @@ -48,7 +48,9 @@

{{vm.destination.balanceAmount}} {{vm.destination.balanceCurrency}}

-
qz9cqq5pryv9hnqwa8q8mccmynk9uf4vlu5nxerpzmc
+
+ {{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)}} +
From d7fabc36422ae698fa56fd86163e1c053376e5fd Mon Sep 17 00:00:00 2001 From: Sebastiaan Pasma Date: Fri, 3 Aug 2018 14:28:56 +0200 Subject: [PATCH 130/256] header + default colors --- src/js/controllers/review.controller.js | 12 +++++++----- src/sass/components/header.scss | 5 ++++- src/sass/variables.scss | 1 + www/views/review.html | 4 ++-- 4 files changed, 14 insertions(+), 8 deletions(-) diff --git a/src/js/controllers/review.controller.js b/src/js/controllers/review.controller.js index 7d8efbfac..82ef2aa30 100644 --- a/src/js/controllers/review.controller.js +++ b/src/js/controllers/review.controller.js @@ -45,6 +45,7 @@ function reviewController(addressbookService, bitcoinCashJsService, bitcore, bit vm.wallet = null; var config = null; + var defaults = {}; var coin = ''; var countDown = null; var usingCustomFee = false; @@ -63,7 +64,7 @@ function reviewController(addressbookService, bitcoinCashJsService, bitcore, bit function onBeforeEnter(event, data) { - + defaults = configService.getDefaults(); originWalletId = data.stateParams.fromWalletId; satoshis = parseInt(data.stateParams.amount, 10); toAddress = data.stateParams.toAddr; @@ -91,7 +92,8 @@ function reviewController(addressbookService, bitcoinCashJsService, bitcore, bit } else { config = configCache; priceDisplayIsFiat = config.wallet.settings.priceDisplay === 'fiat'; - vm.origin.currencyColor = vm.originWallet.coin === 'btc' ? config.bitcoinWalletColor : config.bitcoinCashWalletColor; + 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; } updateSendAmounts(); @@ -404,7 +406,7 @@ function reviewController(addressbookService, bitcoinCashJsService, bitcore, bit vm.destination.kind = 'contact'; vm.destination.name = contact.name; vm.destination.email = contact.email; - vm.destination.color = contact.coin === 'btc' ? config.bitcoinWalletColor : config.bitcoinCashWalletColor; + vm.destination.color = contact.coin === 'btc' ? defaults.bitcoinWalletColor : defaults.bitcoinCashWalletColor; vm.destination.currency = contact.coin.toUpperCase(); vm.destination.currencyColor = vm.destination.color; } @@ -422,8 +424,8 @@ function reviewController(addressbookService, bitcoinCashJsService, bitcore, bit vm.destination.kind = 'wallet'; vm.destination.name = destinationWallet.name; - if (config) { - vm.destination.currencyColor = vm.destination.coin === 'btc' ? config.bitcoinWalletColor : config.bitcoinCashWalletColor; + if (defaults) { + vm.destination.currencyColor = vm.destination.coin === 'btc' ? defaults.bitcoinWalletColor : defaults.bitcoinCashWalletColor; } var balanceText = getWalletBalanceDisplayText(destinationWallet); diff --git a/src/sass/components/header.scss b/src/sass/components/header.scss index fad1f1812..d44c93b60 100644 --- a/src/sass/components/header.scss +++ b/src/sass/components/header.scss @@ -1,6 +1,9 @@ .header { padding: 29px 12px 61px; - background-color: #FAB915; + background-color: $v-bitcoin-orange; + &.btc { + background-color: $v-bitcoin-core; + } color: #FFFFFF; .title { diff --git a/src/sass/variables.scss b/src/sass/variables.scss index 67d5a044b..49ee6ae89 100644 --- a/src/sass/variables.scss +++ b/src/sass/variables.scss @@ -8,6 +8,7 @@ $v-font-family-light: "Roboto-Light", sans-serif- /* Colors */ $v-bitcoin-orange: #fab915 !default; +$v-bitcoin-core: #535353 !default; $v-off-black: #262424; $v-dark-gray: #445 !default; diff --git a/www/views/review.html b/www/views/review.html index 2f8a4ee3a..631d1bec4 100644 --- a/www/views/review.html +++ b/www/views/review.html @@ -1,5 +1,5 @@ - + {{'Review Transaction' | translate}} @@ -10,7 +10,7 @@
-
+

{{vm.sendingTitle}}

{{vm.primaryAmount}} {{vm.primaryCurrency}}

From fb4bc1563c6b9cc378a184aa4bf5221bd55f26eb Mon Sep 17 00:00:00 2001 From: Brendon Duncan Date: Mon, 6 Aug 2018 12:04:14 +1200 Subject: [PATCH 131/256] Starting to integrate BIP70 payment protocol into new send flow. --- i18n/po/template.pot | 6 +- .../controllers/walletSelectorController.js | 35 ++++++--- src/js/services/incomingData.js | 22 ++++-- src/js/services/paypro.service.js | 76 +++++++++++++++++++ src/js/services/payproService.js | 69 ----------------- 5 files changed, 120 insertions(+), 88 deletions(-) create mode 100644 src/js/services/paypro.service.js delete mode 100644 src/js/services/payproService.js diff --git a/i18n/po/template.pot b/i18n/po/template.pot index ecf44efe9..358145a1c 100644 --- a/i18n/po/template.pot +++ b/i18n/po/template.pot @@ -2179,7 +2179,7 @@ msgid "Payment details" msgstr "" #: www/views/modals/paypro.html:6 -msgid "Payment request" +msgid "Payment Request" msgstr "" #: www/views/mercadoLibreCards.html:22 @@ -3760,4 +3760,8 @@ msgstr "" #: www/views/review.html:69 msgid "Less than 1 cent" +msgstr "" + +#: src/js/services/incomingData.js:129 +msgid "This invoice is no longer accepting payments" msgstr "" \ No newline at end of file diff --git a/src/js/controllers/walletSelectorController.js b/src/js/controllers/walletSelectorController.js index f73bd4830..667bff3cb 100644 --- a/src/js/controllers/walletSelectorController.js +++ b/src/js/controllers/walletSelectorController.js @@ -26,8 +26,8 @@ angular.module('copayApp.controllers').controller('walletSelectorController', fu $scope.coin = $scope.params.coin; // Contacts have a coin embedded } - if ($scope.params.amount) { // There is an amount, so presume that it a payment request - $scope.sendFlowTitle = gettextCatalog.getString('Payment request'); + if ($scope.params.amount) { // There is an amount, so presume that it is a payment request + $scope.sendFlowTitle = gettextCatalog.getString('Payment Request'); $scope.specificAmount = $scope.specificAlternativeAmount = ''; $scope.requestAmount = (($state.params.amount) * (1 / config.unitToSatoshi)).toFixed(config.unitDecimals); $scope.isPaymentRequest = true; @@ -54,16 +54,9 @@ angular.module('copayApp.controllers').controller('walletSelectorController', fu } if ($scope.thirdParty) { - // Third party services specific logic - - if ($scope.thirdParty.id === 'shapeshift' && $scope.type === 'destination') { // Shapeshift wants to know the - if ($scope.coin === 'bch') { - $scope.coin = 'btc'; - } else { - $scope.coin = 'bch'; - } - } + handleThirdPartyIfBip70PaymentProtocol(); + handleThirdPartyIfShapeshift(); } if (!$scope.coin || $scope.coin === 'bch') { // if no specific coin is set or coin is set to bch @@ -87,6 +80,26 @@ angular.module('copayApp.controllers').controller('walletSelectorController', fu } } + function handleThirdPartyIfBip70PaymentProtocol() { + if ($scope.thirdParty.id === 'bip70PaymentProtocol') { + $scope.coin = $scope.thirdParty.coin; + $scope.requestAmount = $scope.thirdParty.details. + console.log('paypro details:', $scope.thirdParty.details); + } + } + + function handleThirdPartyIfShapeshift() { + if ($scope.thirdParty.id === 'shapeshift' && $scope.type === 'destination') { // Shapeshift wants to know the + if ($scope.coin === 'bch') { + $scope.coin = 'btc'; + } else { + $scope.coin = 'bch'; + } + } + } + + + $scope.useWallet = function(wallet) { if ($scope.type === 'origin') { // we're on the origin screen, set wallet to send from $scope.params['fromWalletId'] = wallet.id; diff --git a/src/js/services/incomingData.js b/src/js/services/incomingData.js index 55a453dab..72b1a70b5 100644 --- a/src/js/services/incomingData.js +++ b/src/js/services/incomingData.js @@ -121,9 +121,14 @@ angular.module('copayApp.services').factory('incomingData', function($log, $stat var coin = data.indexOf('bitcoincash') >= 0 ? 'bch' : 'btc'; data = decodeURIComponent(data.replace(/bitcoin(cash)?:\?r=/, '')); if (coin == 'bch') { - payproService.getPayProDetailsViaHttp(data, function(err, details) { + payproService.getPayProDetailsViaHttp(data, function onGetPayProDetailsViaHttp(err, details) { if (err) { - popupService.showAlert(gettextCatalog.getString('Error'), err) + var message = err.toString(); + if (typeof err.data === 'string') { + // i.e. 'This invoice is no longer accepting payments' + message = gettextCatalog.getString(err.data); + } + popupService.showAlert(gettextCatalog.getString('Error'), message) } else { handlePayPro(createBchPayProObject(details), coin); } @@ -415,12 +420,15 @@ angular.module('copayApp.services').factory('incomingData', function($log, $stat } function handlePayPro(payProDetails, coin) { + var thirdPartyData = { + id: 'bip70PaymentProtocol', + coin: coin, + details: payProDetails + }; var stateParams = { amount: payProDetails.amount, - toAddress: payProDetails.toAddress, - description: payProDetails.memo, - paypro: payProDetails, - coin: coin, + toAddr: payProDetails.toAddress, + thirdParty: JSON.stringify(thirdPartyData) }; // fee @@ -434,7 +442,7 @@ angular.module('copayApp.services').factory('incomingData', function($log, $stat 'notify': $state.current.name == 'tabs.send' ? false : true }).then(function() { $timeout(function() { - $state.transitionTo('tabs.send.confirm', stateParams); + $state.transitionTo('tabs.send.origin', stateParams); }); }); } diff --git a/src/js/services/paypro.service.js b/src/js/services/paypro.service.js new file mode 100644 index 000000000..4cdc78e7c --- /dev/null +++ b/src/js/services/paypro.service.js @@ -0,0 +1,76 @@ +'use strict'; + +angular + .module('copayApp.services') + .factory('payproService', payproService); + +function payproService(gettextCatalog, $http, $log, ongoingProcess, platformInfo, profileService) { + + var service = { + getPayProDetails: getPayProDetails, + getPayProDetailsViaHttp: getPayProDetailsViaHttp, + broadcastBchTx: broadcastBchTx + }; + + return service; + + function getPayProDetails(uri, coin, cb, disableLoader) { + if (!cb) cb = function() {}; + + var wallet = profileService.getWallets({ + onlyComplete: true, + coin: coin + })[0]; + + if (!wallet) return cb(); + + if (platformInfo.isChromeApp) { + return cb(gettextCatalog.getString('Payment Protocol not supported on Chrome App')); + } + + $log.debug('Fetch PayPro Request...', uri); + + if (!disableLoader) ongoingProcess.set('fetchingPayPro', true); + + wallet.fetchPayPro({ + payProUrl: uri, + }, function(err, paypro) { + if (!disableLoader) ongoingProcess.set('fetchingPayPro', false); + if (err) return cb(gettextCatalog.getString('Could Not Fetch Payment: Check if it is still valid')); + else if (!paypro.verified) { + $log.warn('Failed to verify payment protocol signatures'); + return cb(gettextCatalog.getString('Payment Protocol Invalid')); + } + return cb(null, paypro); + }); + } + + function getPayProDetailsViaHttp(uri, cb) { + var config = { + headers: {'Accept': 'application/payment-request'} + }; + $http.get(uri, config).then(function onGetPayProDetailsSuccess(response) { + return cb(null, response.data); + }, function onGetPayProDetailsError(error) { + return cb(error, null); + }); + } + + function broadcastBchTx(signedTxp, cb) { + var config = { + headers: {'Content-Type': 'application/payment'} + }; + + var data = { + currency: 'BCH', + transactions: [signedTxp.raw] + }; + + $http.post(signedTxp.payProUrl, data, config).then(function(response) { + signedTxp.response = response.data; + return cb(null, signedTxp); + }, function(error) { + return cb(error.data, null); + }); + } +} diff --git a/src/js/services/payproService.js b/src/js/services/payproService.js deleted file mode 100644 index f0814cc0f..000000000 --- a/src/js/services/payproService.js +++ /dev/null @@ -1,69 +0,0 @@ -'use strict'; - -angular.module('copayApp.services').factory('payproService', - function(profileService, platformInfo, gettextCatalog, ongoingProcess, $log, $http) { - - var ret = {}; - - ret.getPayProDetails = function(uri, coin, cb, disableLoader) { - if (!cb) cb = function() {}; - - var wallet = profileService.getWallets({ - onlyComplete: true, - coin: coin - })[0]; - - if (!wallet) return cb(); - - if (platformInfo.isChromeApp) { - return cb(gettextCatalog.getString('Payment Protocol not supported on Chrome App')); - } - - $log.debug('Fetch PayPro Request...', uri); - - if (!disableLoader) ongoingProcess.set('fetchingPayPro', true); - - wallet.fetchPayPro({ - payProUrl: uri, - }, function(err, paypro) { - if (!disableLoader) ongoingProcess.set('fetchingPayPro', false); - if (err) return cb(gettextCatalog.getString('Could Not Fetch Payment: Check if it is still valid')); - else if (!paypro.verified) { - $log.warn('Failed to verify payment protocol signatures'); - return cb(gettextCatalog.getString('Payment Protocol Invalid')); - } - return cb(null, paypro); - }); - }; - - ret.getPayProDetailsViaHttp = function(uri, cb) { - var config = { - headers: {'Accept': 'application/payment-request'} - }; - $http.get(uri, config).then(function(response) { - return cb(null, response.data); - }, function(error) { - return cb(error, null); - }); - } - - ret.broadcastBchTx = function(signedTxp, cb) { - var config = { - headers: {'Content-Type': 'application/payment'} - }; - - var data = { - currency: 'BCH', - transactions: [signedTxp.raw] - }; - - $http.post(signedTxp.payProUrl, data, config).then(function(response) { - signedTxp.response = response.data; - return cb(null, signedTxp); - }, function(error) { - return cb(error.data, null); - }); - } - - return ret; - }); From 4203a449d98827efdb8f12e156708d1536f27d5e Mon Sep 17 00:00:00 2001 From: Brendon Duncan Date: Mon, 6 Aug 2018 13:39:03 +1200 Subject: [PATCH 132/256] Displaying requested amount in origin screen. --- .../controllers/walletSelectorController.js | 46 +++++++++++++++++-- src/js/services/paypro.service.js | 2 + www/views/walletSelector.html | 4 +- 3 files changed, 47 insertions(+), 5 deletions(-) diff --git a/src/js/controllers/walletSelectorController.js b/src/js/controllers/walletSelectorController.js index 667bff3cb..541794b22 100644 --- a/src/js/controllers/walletSelectorController.js +++ b/src/js/controllers/walletSelectorController.js @@ -1,9 +1,17 @@ 'use strict'; -angular.module('copayApp.controllers').controller('walletSelectorController', function($scope, $rootScope, $state, $log, $ionicHistory, configService, gettextCatalog, profileService) { +angular.module('copayApp.controllers').controller('walletSelectorController', function($scope, $rootScope, $state, $log, $ionicHistory, configService, gettextCatalog, profileService, txFormatService) { + + var priceDisplayAsFiat = false; + var requestedSatoshis = 0; + var unitDecimals = 0; + var unitsFromSatoshis = 0; $scope.$on("$ionicView.beforeEnter", function(event, data) { var config = configService.getSync().wallet.settings; + priceDisplayAsFiat = config.priceDisplay === 'fiat'; + unitDecimals = config.unitDecimals; + unitsFromSatoshis = 1 / config.unitToSatoshi; switch($state.current.name) { case 'tabs.send.wallet-to-wallet': @@ -29,7 +37,8 @@ angular.module('copayApp.controllers').controller('walletSelectorController', fu if ($scope.params.amount) { // There is an amount, so presume that it is a payment request $scope.sendFlowTitle = gettextCatalog.getString('Payment Request'); $scope.specificAmount = $scope.specificAlternativeAmount = ''; - $scope.requestAmount = (($state.params.amount) * (1 / config.unitToSatoshi)).toFixed(config.unitDecimals); + //requestedAmountCrypto = (($state.params.amount) * (1 / config.unitToSatoshi)).toFixed(config.unitDecimals); + requestedSatoshis = $state.params.amount; $scope.isPaymentRequest = true; } if ($scope.params.thirdParty) { @@ -65,8 +74,39 @@ angular.module('copayApp.controllers').controller('walletSelectorController', fu if (!$scope.coin || $scope.coin === 'btc') { // if no specific coin is set or coin is set btc $scope.walletsBtc = profileService.getWallets({coin: 'btc', hasFunds: $scope.type === 'origin'}); } + + formatRequestedAmount(); }); + function formatRequestedAmount() { + if (requestedSatoshis) { + var cryptoAmount = (unitsFromSatoshis * requestedSatoshis).toFixed(unitDecimals); + var cryptoCoin = $scope.coin.toUpperCase(); + + txFormatService.formatAlternativeStr($scope.coin, requestedSatoshis, function onFormatAlternativeStr(formatted){ + if (formatted) { + var fiatParts = formatted.split(' '); + var fiatAmount = fiatParts[0]; + var fiatCurrrency = fiatParts.length > 1 ? fiatParts[1] : ''; + + if (priceDisplayAsFiat) { + $scope.requestAmount = fiatAmount; + $scope.requestCurrency = fiatCurrrency; + + $scope.requestAmountSecondary = cryptoAmount; + $scope.requestCurrencySecondary = cryptoCoin; + } else { + $scope.requestAmount = cryptoAmount; + $scope.requestCurrency = cryptoCoin; + + $scope.requestAmountSecondary = fiatAmount; + $scope.requestCurrencySecondary = fiatCurrrency; + } + } + }); + } + } + function getNextStep() { if ($scope.thirdParty) { $scope.params.thirdParty = JSON.stringify($scope.thirdParty) // re-stringify JSON-object @@ -83,7 +123,7 @@ angular.module('copayApp.controllers').controller('walletSelectorController', fu function handleThirdPartyIfBip70PaymentProtocol() { if ($scope.thirdParty.id === 'bip70PaymentProtocol') { $scope.coin = $scope.thirdParty.coin; - $scope.requestAmount = $scope.thirdParty.details. + $scope.requestAmount = unitsFromSatoshis * $scope.thirdParty.details.amount; console.log('paypro details:', $scope.thirdParty.details); } } diff --git a/src/js/services/paypro.service.js b/src/js/services/paypro.service.js index 4cdc78e7c..8f8db5f5b 100644 --- a/src/js/services/paypro.service.js +++ b/src/js/services/paypro.service.js @@ -1,5 +1,7 @@ 'use strict'; +// For BIP70 Payment Protocol + angular .module('copayApp.services') .factory('payproService', payproService); diff --git a/www/views/walletSelector.html b/www/views/walletSelector.html index 49a7ba208..3eecb1204 100644 --- a/www/views/walletSelector.html +++ b/www/views/walletSelector.html @@ -7,8 +7,8 @@
Paying
-
$... USD
-
{{requestAmount}} {{coin.toUpperCase()}}
+
{{requestAmount}} {{requestCurrency}}
+
{{requestAmountSecondary}} {{requestCurrencySecondary}}
From b0e46f18a1acda441d32b1e99f3bbfd73aec96a9 Mon Sep 17 00:00:00 2001 From: Brendon Duncan Date: Mon, 6 Aug 2018 16:45:00 +1200 Subject: [PATCH 133/256] The Origin screen can now display payment requests properly. --- .../controllers/walletSelectorController.js | 88 ++++++++++++++----- src/js/services/incomingData.js | 2 +- www/views/walletSelector.html | 4 +- 3 files changed, 71 insertions(+), 23 deletions(-) diff --git a/src/js/controllers/walletSelectorController.js b/src/js/controllers/walletSelectorController.js index 541794b22..1d52a715a 100644 --- a/src/js/controllers/walletSelectorController.js +++ b/src/js/controllers/walletSelectorController.js @@ -2,6 +2,7 @@ angular.module('copayApp.controllers').controller('walletSelectorController', function($scope, $rootScope, $state, $log, $ionicHistory, configService, gettextCatalog, profileService, txFormatService) { + var fromWalletId = ''; var priceDisplayAsFiat = false; var requestedSatoshis = 0; var unitDecimals = 0; @@ -29,6 +30,7 @@ angular.module('copayApp.controllers').controller('walletSelectorController', fu $scope.params = $state.params; $scope.coin = false; // Wallets to show (for destination screen or contacts) $scope.type = data.stateParams && data.stateParams['fromWalletId'] ? 'destination' : 'origin'; // origin || destination + fromWalletId = data.stateParams && data.stateParams.fromWalletId; if ($scope.params.coin) { $scope.coin = $scope.params.coin; // Contacts have a coin embedded @@ -51,30 +53,13 @@ angular.module('copayApp.controllers').controller('walletSelectorController', fu $scope.selectedPriceDisplay = config.wallet.settings.priceDisplay; }); - $scope.walletsEmpty = []; // empty wallets for origin screen - - if ($scope.type === 'origin') { - $scope.headerTitle = gettextCatalog.getString('Choose a wallet to send from'); - $scope.walletsEmpty = profileService.getWallets({coin: $scope.coin, hasNoFunds: true}); - } else if ($scope.type === 'destination') { - $scope.fromWallet = profileService.getWallet(data.stateParams.fromWalletId); - $scope.coin = $scope.fromWallet.coin; // Only show wallets with the select origin wallet coin - $scope.headerTitle = gettextCatalog.getString('Choose a wallet to send to'); - } - if ($scope.thirdParty) { // Third party services specific logic handleThirdPartyIfBip70PaymentProtocol(); handleThirdPartyIfShapeshift(); } - if (!$scope.coin || $scope.coin === 'bch') { // if no specific coin is set or coin is set to bch - $scope.walletsBch = profileService.getWallets({coin: 'bch', hasFunds: $scope.type==='origin'}); - } - if (!$scope.coin || $scope.coin === 'btc') { // if no specific coin is set or coin is set btc - $scope.walletsBtc = profileService.getWallets({coin: 'btc', hasFunds: $scope.type === 'origin'}); - } - + prepareWalletLists(); formatRequestedAmount(); }); @@ -116,14 +101,17 @@ angular.module('copayApp.controllers').controller('walletSelectorController', fu } else if (!$scope.params.amount) { // If we have no amount return 'tabs.send.amount'; } else { // If we do have them - return 'tabs.send.confirm'; + return 'tabs.send.review'; } } function handleThirdPartyIfBip70PaymentProtocol() { if ($scope.thirdParty.id === 'bip70PaymentProtocol') { + requestedSatoshis = $scope.thirdParty.details.amount; $scope.coin = $scope.thirdParty.coin; - $scope.requestAmount = unitsFromSatoshis * $scope.thirdParty.details.amount; + $scope.requestAmount = unitsFromSatoshis * requestedSatoshis; + $scope.params.amount = requestedSatoshis; + $scope.params.toAddr = $scope.thirdParty.details.toAddress; console.log('paypro details:', $scope.thirdParty.details); } } @@ -138,6 +126,66 @@ angular.module('copayApp.controllers').controller('walletSelectorController', fu } } + function prepareWalletLists() { + var walletsAll = []; + var walletsSufficientFunds = []; + $scope.walletsInsufficientFunds = []; // For origin screen + + if ($scope.type === 'origin') { + $scope.headerTitle = gettextCatalog.getString('Choose a wallet to send from'); + + if ($scope.params.amount) { + + walletsAll = profileService.getWallets({coin: $scope.coin}); + + walletsAll.forEach(function forWallet(wallet){ + if (wallet.status.availableBalanceSat > $scope.params.amount) { + walletsSufficientFunds.push(wallet); + } else { + $scope.walletsInsufficientFunds.push(wallet); + } + }); + + if ($scope.coin === 'btc') { + $scope.walletsBtc = walletsSufficientFunds; + } else { + $scope.walletsBch = walletsSufficientFunds; + } + + } else if ($scope.coin) { + walletsAll = profileService.getWallets({coin: $scope.coin}); + walletsAll.forEach(function forWallet(wallet){ + if (wallet.status.availableBalanceSat > 0) { + walletsSufficientFunds.push(wallet); + } else { + $scope.walletsInsufficientFunds.push(wallet); + } + }); + + if ($scope.coin === 'btc') { + $scope.walletsBtc = walletsSufficientFunds; + } else { + $scope.walletsBch = walletsSufficientFunds; + } + } else { + $scope.walletsBch = profileService.getWallets({coin: 'bch', hasFunds: true}); + $scope.walletsBtc = profileService.getWallets({coin: 'btc', hasFunds: true}); + $scope.walletsInsufficientFunds = profileService.getWallets({coin: $scope.coin, hasNoFunds: true}); + } + + } else if ($scope.type === 'destination') { + $scope.fromWallet = profileService.getWallet(fromWalletId); + $scope.coin = $scope.fromWallet.coin; // Only show wallets with the select origin wallet coin + $scope.headerTitle = gettextCatalog.getString('Choose a wallet to send to'); + + if ($scope.coin === 'btc') { // if no specific coin is set or coin is set btc + $scope.walletsBtc = profileService.getWallets({coin: $scope.coin}); + } else { + $scope.walletsBch = profileService.getWallets({coin: $scope.coin}); + } + } + } + $scope.useWallet = function(wallet) { diff --git a/src/js/services/incomingData.js b/src/js/services/incomingData.js index 72b1a70b5..fa5abd56b 100644 --- a/src/js/services/incomingData.js +++ b/src/js/services/incomingData.js @@ -427,7 +427,7 @@ angular.module('copayApp.services').factory('incomingData', function($log, $stat }; var stateParams = { amount: payProDetails.amount, - toAddr: payProDetails.toAddress, + toAddress: payProDetails.toAddress, thirdParty: JSON.stringify(thirdPartyData) }; diff --git a/www/views/walletSelector.html b/www/views/walletSelector.html index 3eecb1204..c863f4ea7 100644 --- a/www/views/walletSelector.html +++ b/www/views/walletSelector.html @@ -42,12 +42,12 @@
-
+
Insufficient funds
- From f1f8f6e0f51026b0c8b624c9eca9f25ffd8d1f71 Mon Sep 17 00:00:00 2001 From: Brendon Duncan Date: Mon, 6 Aug 2018 20:31:06 +1200 Subject: [PATCH 134/256] Tidied up third party data from BIP70 Payment Protocol. --- src/js/controllers/amount.js | 2 +- src/js/controllers/review.controller.js | 4 ++-- src/js/controllers/walletSelectorController.js | 16 +++++----------- src/js/routes.js | 2 +- src/js/services/incomingData.js | 15 +++++++++++++-- 5 files changed, 22 insertions(+), 17 deletions(-) diff --git a/src/js/controllers/amount.js b/src/js/controllers/amount.js index 576fb4500..db1bb52fe 100644 --- a/src/js/controllers/amount.js +++ b/src/js/controllers/amount.js @@ -470,7 +470,7 @@ function amountController(configService, $filter, gettextCatalog, $ionicHistory, amount: useSendMax ? undefined : satoshis, fromWalletId: passthroughParams.fromWalletId, sendMax: useSendMax, - toAddr: passthroughParams.toAddress, + toAddress: passthroughParams.toAddress, toWalletId: passthroughParams.toWalletId }; diff --git a/src/js/controllers/review.controller.js b/src/js/controllers/review.controller.js index 82ef2aa30..5c05ea6fa 100644 --- a/src/js/controllers/review.controller.js +++ b/src/js/controllers/review.controller.js @@ -67,7 +67,7 @@ function reviewController(addressbookService, bitcoinCashJsService, bitcore, bit defaults = configService.getDefaults(); originWalletId = data.stateParams.fromWalletId; satoshis = parseInt(data.stateParams.amount, 10); - toAddress = data.stateParams.toAddr; + toAddress = data.stateParams.toAddress; vm.originWallet = profileService.getWallet(originWalletId); vm.origin.currency = vm.originWallet.coin.toUpperCase(); @@ -218,7 +218,7 @@ function reviewController(addressbookService, bitcoinCashJsService, bitcore, bit amount: parseInt(data.stateParams.amount), sendMax: data.stateParams.sendMax === 'true' ? true : false, fromWalletId: data.stateParams.fromWalletId, - toAddress: data.stateParams.toAddr, + toAddress: data.stateParams.toAddress, feeLevel: configFeeLevel, spendUnconfirmed: config.wallet.spendUnconfirmed, diff --git a/src/js/controllers/walletSelectorController.js b/src/js/controllers/walletSelectorController.js index 1d52a715a..df733e11f 100644 --- a/src/js/controllers/walletSelectorController.js +++ b/src/js/controllers/walletSelectorController.js @@ -4,7 +4,6 @@ angular.module('copayApp.controllers').controller('walletSelectorController', fu var fromWalletId = ''; var priceDisplayAsFiat = false; - var requestedSatoshis = 0; var unitDecimals = 0; var unitsFromSatoshis = 0; @@ -39,8 +38,6 @@ angular.module('copayApp.controllers').controller('walletSelectorController', fu if ($scope.params.amount) { // There is an amount, so presume that it is a payment request $scope.sendFlowTitle = gettextCatalog.getString('Payment Request'); $scope.specificAmount = $scope.specificAlternativeAmount = ''; - //requestedAmountCrypto = (($state.params.amount) * (1 / config.unitToSatoshi)).toFixed(config.unitDecimals); - requestedSatoshis = $state.params.amount; $scope.isPaymentRequest = true; } if ($scope.params.thirdParty) { @@ -64,11 +61,11 @@ angular.module('copayApp.controllers').controller('walletSelectorController', fu }); function formatRequestedAmount() { - if (requestedSatoshis) { - var cryptoAmount = (unitsFromSatoshis * requestedSatoshis).toFixed(unitDecimals); + if ($scope.params.amount) { + var cryptoAmount = (unitsFromSatoshis * $scope.params.amount).toFixed(unitDecimals); var cryptoCoin = $scope.coin.toUpperCase(); - txFormatService.formatAlternativeStr($scope.coin, requestedSatoshis, function onFormatAlternativeStr(formatted){ + txFormatService.formatAlternativeStr($scope.coin, $scope.params.amount, function onFormatAlternativeStr(formatted){ if (formatted) { var fiatParts = formatted.split(' '); var fiatAmount = fiatParts[0]; @@ -107,12 +104,9 @@ angular.module('copayApp.controllers').controller('walletSelectorController', fu function handleThirdPartyIfBip70PaymentProtocol() { if ($scope.thirdParty.id === 'bip70PaymentProtocol') { - requestedSatoshis = $scope.thirdParty.details.amount; $scope.coin = $scope.thirdParty.coin; - $scope.requestAmount = unitsFromSatoshis * requestedSatoshis; - $scope.params.amount = requestedSatoshis; - $scope.params.toAddr = $scope.thirdParty.details.toAddress; - console.log('paypro details:', $scope.thirdParty.details); + $scope.requestAmount = unitsFromSatoshis * $scope.params.amount; + console.log('paypro details:', $scope.thirdParty); } } diff --git a/src/js/routes.js b/src/js/routes.js index 905683dcb..8a8adc964 100644 --- a/src/js/routes.js +++ b/src/js/routes.js @@ -345,7 +345,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr } }) .state('tabs.send.review', { - url: '/review/:thirdParty/:amount/:fromWalletId/:sendMax/:toAddr/:toWalletId', + url: '/review/:thirdParty/:amount/:fromWalletId/:sendMax/:toAddress/:toWalletId', views: { 'tab-send@tabs': { controller: 'reviewController', diff --git a/src/js/services/incomingData.js b/src/js/services/incomingData.js index fa5abd56b..3b4b024c4 100644 --- a/src/js/services/incomingData.js +++ b/src/js/services/incomingData.js @@ -421,9 +421,20 @@ angular.module('copayApp.services').factory('incomingData', function($log, $stat function handlePayPro(payProDetails, coin) { var thirdPartyData = { - id: 'bip70PaymentProtocol', + caName: payProDetails.caName, + caTrusted: payProDetails.caTrusted, coin: coin, - details: payProDetails + domain: payProDetails.domain, + expires: payProDetails.expires, + id: 'bip70PaymentProtocol', + memo: payProDetails.memo, + merchant_data: payProDetails.merchant_data, + network: payProDetails.network, + requiredFeeRate: payProDetails.requiredFeeRate, + selfSigned: payProDetails.selfSigned, + time: payProDetails.time, + url: payProDetails.url, + verified: payProDetails.verified }; var stateParams = { amount: payProDetails.amount, From 731cfebc8a336e91e107570e2bbf031b68f22375 Mon Sep 17 00:00:00 2001 From: Brendon Duncan Date: Mon, 6 Aug 2018 20:39:59 +1200 Subject: [PATCH 135/256] Fixed destination coin for Shapeshift. --- src/js/controllers/walletSelectorController.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/js/controllers/walletSelectorController.js b/src/js/controllers/walletSelectorController.js index df733e11f..e603032bd 100644 --- a/src/js/controllers/walletSelectorController.js +++ b/src/js/controllers/walletSelectorController.js @@ -168,8 +168,10 @@ angular.module('copayApp.controllers').controller('walletSelectorController', fu } } else if ($scope.type === 'destination') { - $scope.fromWallet = profileService.getWallet(fromWalletId); - $scope.coin = $scope.fromWallet.coin; // Only show wallets with the select origin wallet coin + if (!$scope.coin) { // Allow for the coin to be set by a third party + $scope.fromWallet = profileService.getWallet(fromWalletId); + $scope.coin = $scope.fromWallet.coin; // Only show wallets with the select origin wallet coin + } $scope.headerTitle = gettextCatalog.getString('Choose a wallet to send to'); if ($scope.coin === 'btc') { // if no specific coin is set or coin is set btc From ec354bd340414dda1f7271dfe0492a2946cc7a6d Mon Sep 17 00:00:00 2001 From: Sebastiaan Pasma Date: Mon, 6 Aug 2018 11:25:29 +0200 Subject: [PATCH 136/256] header css --- src/js/controllers/review.controller.js | 4 ++++ src/js/services/shapeshiftService.js | 19 +++++++++++++------ src/sass/views/shapeshift.scss | 2 +- 3 files changed, 18 insertions(+), 7 deletions(-) diff --git a/src/js/controllers/review.controller.js b/src/js/controllers/review.controller.js index 5c05ea6fa..c2e6be3de 100644 --- a/src/js/controllers/review.controller.js +++ b/src/js/controllers/review.controller.js @@ -105,6 +105,10 @@ function reviewController(addressbookService, bitcoinCashJsService, bitcore, bit } vm.approve = function() { + if (vm.thirdParty.id === 'shapeshift') { + shapeshiftService.shiftIt(); + return; + } if (!tx || !vm.originWallet) return; diff --git a/src/js/services/shapeshiftService.js b/src/js/services/shapeshiftService.js index 131df0cd0..317e72394 100644 --- a/src/js/services/shapeshiftService.js +++ b/src/js/services/shapeshiftService.js @@ -1,26 +1,32 @@ 'use strict'; -angular.module('copayApp.services').factory('shapeshiftService', function($http, $log, lodash, moment, ongoingProcess, shapeshiftApiService, storageService, configService, platformInfo, servicesService) { +angular.module('copayApp.services').factory('shapeshiftService', function($http, $interval, $log, lodash, moment, ongoingProcess, shapeshiftApiService, storageService, configService, incomingData, platformInfo, servicesService) { var root = {}; root.ShiftState = 'Shift'; root.withdrawalAddress = '' root.returnAddress = '' root.amount = ''; root.marketData = {} - this.withdrawalAddress = function(address) { + root.withdrawalAddress = function(address) { root.withdrawalAddress = address; }; - this.returnAddress = function(address) { + root.returnAddress = function(address) { root.returnAddress = address; }; - this.amount = function(amount) { + root.amount = function(amount) { root.amount = amount; }; - this.fromWalletId = function(id) { + root.fromWalletId = function(id) { root.fromWalletId = id; }; - this.toWalletId = function(id) { + root.toWalletId = function(id) { root.toWalletId = id; }; + root.coinIn = function(coinIn) { + root.coinIn = coinIn.toUpperCase(); + }; + root.coinOut = function(coinOut) { + root.coinOut = coinOut.toUpperCase(); + }; root.getMarketDataIn = function(coin) { if(coin === root.coinOut) return root.getMarketData(root.coinOut, root.coinIn); @@ -104,6 +110,7 @@ angular.module('copayApp.services').factory('shapeshiftService', function($http, var shapeshiftData = { fromWalletId: root.fromWalletId, + toWalletId: root.toWalletId, minAmount: root.marketData.minimum, maxAmount: root.marketData.maxLimit, orderId: root.depositInfo.orderId diff --git a/src/sass/views/shapeshift.scss b/src/sass/views/shapeshift.scss index ee4cd0b0f..5b63c0354 100644 --- a/src/sass/views/shapeshift.scss +++ b/src/sass/views/shapeshift.scss @@ -18,6 +18,6 @@ } } .header.shapeshift { - background: url(../img/shapeshiftbg.jpg) center center no-repeat #28394d; + background: url(../img/shapeshiftbg.jpg) center center repeat #28394d; opacity: 0.99; } \ No newline at end of file From cea77e910f2342a973f919a83278d72c8026b526 Mon Sep 17 00:00:00 2001 From: Brendon Duncan Date: Mon, 6 Aug 2018 21:46:03 +1200 Subject: [PATCH 137/256] One step closer to getting send max working. --- src/js/controllers/review.controller.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/js/controllers/review.controller.js b/src/js/controllers/review.controller.js index 5c05ea6fa..4fcb447e2 100644 --- a/src/js/controllers/review.controller.js +++ b/src/js/controllers/review.controller.js @@ -594,7 +594,7 @@ function reviewController(addressbookService, bitcoinCashJsService, bitcore, bit channel = "ga"; } // When displaying Fiat, if the formatting fails, the crypto will be the primary amount. - var amount = priceDisplayIsFiat ? vm.secondaryAmount || vm.primaryAmount : vm.primaryAmount; + var amount = unitFromSat * satoshis; var log = new window.BitAnalytics.LogEvent("transfer_success", [{ "coin": vm.originWallet.coin, "type": "outgoing", @@ -678,7 +678,8 @@ function reviewController(addressbookService, bitcoinCashJsService, bitcore, bit tx.sendMaxInfo = sendMaxInfo; tx.amount = tx.sendMaxInfo.amount; - updateAmount(); + satoshis = tx.amount; + updateSendAmounts(); ongoingProcess.set('calculatingFee', false); $timeout(function() { showSendMaxWarning(wallet, sendMaxInfo); From cc213956d08793bca81b7e8282d381515738c31b Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Dominguez Date: Mon, 6 Aug 2018 22:12:33 +0900 Subject: [PATCH 138/256] header bitpay on the wallet selector, incoming data fix, clean a bit --- app-template/bitcoincom/css/bitcoin.com.css | 23 ++++++++++++++++++- .../controllers/walletSelectorController.js | 7 +----- src/js/services/incomingData.js | 7 +++--- src/sass/views/review.scss | 2 +- www/css/bitcoin.com.css | 16 ++++++++++++- www/css/main.css | 6 +++-- www/img/bitpay_banner.svg | 13 +++++++++++ www/views/thirdparty/bitpay-header.html | 3 +++ www/views/walletSelector.html | 1 + 9 files changed, 64 insertions(+), 14 deletions(-) create mode 100644 www/img/bitpay_banner.svg create mode 100644 www/views/thirdparty/bitpay-header.html diff --git a/app-template/bitcoincom/css/bitcoin.com.css b/app-template/bitcoincom/css/bitcoin.com.css index e9b316761..19113dd2c 100644 --- a/app-template/bitcoincom/css/bitcoin.com.css +++ b/app-template/bitcoincom/css/bitcoin.com.css @@ -264,9 +264,30 @@ div.onboarding-topic { height: 5em; } +.shapeshift-banner { + background: url(../img/shapeshiftbg.jpg) center center no-repeat #28394d; + padding: 10px; + box-shadow: 0px 5px 10px 0px #cccccc; + height: 5em; +} + +.bitpay-banner { + background: center center no-repeat #1A3A8B; + padding: 10px; + box-shadow: 0px 5px 10px 0px #cccccc; + height: 5em; +} + +.bitpay-logo { + display: block; + max-height: 100%; + width: 100%; + height: 4em; +} + .shapeshift-logo { display: block; float: left; max-height: 100%; - max-width: 100%; + max-width: 100%; } diff --git a/src/js/controllers/walletSelectorController.js b/src/js/controllers/walletSelectorController.js index 1d52a715a..fd5b4f1cd 100644 --- a/src/js/controllers/walletSelectorController.js +++ b/src/js/controllers/walletSelectorController.js @@ -106,12 +106,7 @@ angular.module('copayApp.controllers').controller('walletSelectorController', fu } function handleThirdPartyIfBip70PaymentProtocol() { - if ($scope.thirdParty.id === 'bip70PaymentProtocol') { - requestedSatoshis = $scope.thirdParty.details.amount; - $scope.coin = $scope.thirdParty.coin; - $scope.requestAmount = unitsFromSatoshis * requestedSatoshis; - $scope.params.amount = requestedSatoshis; - $scope.params.toAddr = $scope.thirdParty.details.toAddress; + if ($scope.thirdParty.id === 'bitpay') { console.log('paypro details:', $scope.thirdParty.details); } } diff --git a/src/js/services/incomingData.js b/src/js/services/incomingData.js index fa5abd56b..e76627fcf 100644 --- a/src/js/services/incomingData.js +++ b/src/js/services/incomingData.js @@ -405,6 +405,7 @@ angular.module('copayApp.services').factory('incomingData', function($log, $stat return { amount: payProData.outputs[0].amount, caTrusted: true, + name: 'bitpay', domain: 'bitpay.com', expires: Math.floor(new Date(payProData.expires).getTime() / 1000), memo: payProData.memo, @@ -421,13 +422,13 @@ angular.module('copayApp.services').factory('incomingData', function($log, $stat function handlePayPro(payProDetails, coin) { var thirdPartyData = { - id: 'bip70PaymentProtocol', - coin: coin, + id: payProDetails.name, details: payProDetails }; var stateParams = { amount: payProDetails.amount, - toAddress: payProDetails.toAddress, + toAddr: payProDetails.toAddress, + coin: coin, thirdParty: JSON.stringify(thirdPartyData) }; diff --git a/src/sass/views/review.scss b/src/sass/views/review.scss index 22470a7b2..8bda83890 100644 --- a/src/sass/views/review.scss +++ b/src/sass/views/review.scss @@ -11,7 +11,7 @@ bottom: 92px; } - .shapeshift-banner { + .shapeshift-banner, .bitpay-banner { box-shadow: none; } } \ No newline at end of file diff --git a/www/css/bitcoin.com.css b/www/css/bitcoin.com.css index 9b69005c4..59e503ac7 100644 --- a/www/css/bitcoin.com.css +++ b/www/css/bitcoin.com.css @@ -314,9 +314,23 @@ div.slide-success__background.fill-screen { height: 5em; } +.bitpay-banner { + background: #1A3A8B; + padding: 10px; + box-shadow: 0px 5px 10px 0px #cccccc; + height: 5em; +} + +.bitpay-logo { + display: block; + max-height: 100%; + width: 100%; + height: 4em; +} + .shapeshift-logo { display: block; float: left; max-height: 100%; - max-width: 100%; + max-width: 100%; } diff --git a/www/css/main.css b/www/css/main.css index df39fda50..c2e4325f9 100644 --- a/www/css/main.css +++ b/www/css/main.css @@ -15262,7 +15262,7 @@ log-options #check-bar .checkbox-icon { #view-review .fee-summary { position: absolute; bottom: 92px; } - #view-review .shapeshift-banner { + #view-review .shapeshift-banner, #view-review .bitpay-banner { box-shadow: none; } .gravatar { @@ -15325,8 +15325,10 @@ ion-content.padded-bottom-cta-with-summary { .header { padding: 29px 12px 61px; - background-color: #FAB915; + background-color: #fab915; color: #FFFFFF; } + .header.btc { + background-color: #535353; } .header .title { font-size: 18px; font-weight: 400; diff --git a/www/img/bitpay_banner.svg b/www/img/bitpay_banner.svg new file mode 100644 index 000000000..cf5829899 --- /dev/null +++ b/www/img/bitpay_banner.svg @@ -0,0 +1,13 @@ + + + + Artboard + Created with Sketch. + + + + + + + + \ No newline at end of file diff --git a/www/views/thirdparty/bitpay-header.html b/www/views/thirdparty/bitpay-header.html new file mode 100644 index 000000000..a5ffcb3a5 --- /dev/null +++ b/www/views/thirdparty/bitpay-header.html @@ -0,0 +1,3 @@ +
+ +
\ No newline at end of file diff --git a/www/views/walletSelector.html b/www/views/walletSelector.html index c863f4ea7..15b4935fa 100644 --- a/www/views/walletSelector.html +++ b/www/views/walletSelector.html @@ -5,6 +5,7 @@
+
Paying
{{requestAmount}} {{requestCurrency}}
From bb3b00ae8d54b89103346bf2ff35715c27a8c88b Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Dominguez Date: Mon, 6 Aug 2018 22:20:51 +0900 Subject: [PATCH 139/256] Fix incomingData toAddress, mistake --- src/js/services/incomingData.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/js/services/incomingData.js b/src/js/services/incomingData.js index f541deb58..cfa6f0a03 100644 --- a/src/js/services/incomingData.js +++ b/src/js/services/incomingData.js @@ -438,10 +438,10 @@ angular.module('copayApp.services').factory('incomingData', function($log, $stat url: payProDetails.url, verified: payProDetails.verified }; - + var stateParams = { amount: payProDetails.amount, - toAddr: payProDetails.toAddress, + toAddress: payProDetails.toAddress, coin: coin, thirdParty: JSON.stringify(thirdPartyData) }; From 3652419b0dc681dfc6b6f404c1c5e01e29ae89cb Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Dominguez Date: Mon, 6 Aug 2018 22:21:40 +0900 Subject: [PATCH 140/256] Fix double id --- src/js/services/incomingData.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/js/services/incomingData.js b/src/js/services/incomingData.js index cfa6f0a03..ffa3e95f1 100644 --- a/src/js/services/incomingData.js +++ b/src/js/services/incomingData.js @@ -428,7 +428,6 @@ angular.module('copayApp.services').factory('incomingData', function($log, $stat coin: coin, domain: payProDetails.domain, expires: payProDetails.expires, - id: 'bip70PaymentProtocol', memo: payProDetails.memo, merchant_data: payProDetails.merchant_data, network: payProDetails.network, From 470868ade9baf9cca2f9a9ef65d8258e1cdb6e0e Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Dominguez Date: Mon, 6 Aug 2018 23:19:46 +0900 Subject: [PATCH 141/256] Review screen, cleaning in the same time --- src/js/controllers/review.controller.js | 11 +++++++++-- src/js/services/incomingData.js | 3 ++- www/css/main.css | 2 +- www/views/review.html | 19 ++++++++++++------- www/views/walletSelector.html | 2 +- 5 files changed, 25 insertions(+), 12 deletions(-) diff --git a/src/js/controllers/review.controller.js b/src/js/controllers/review.controller.js index 1a52fb56a..3143fabcf 100644 --- a/src/js/controllers/review.controller.js +++ b/src/js/controllers/review.controller.js @@ -43,6 +43,7 @@ function reviewController(addressbookService, bitcoinCashJsService, bitcore, bit vm.sendStatus = ''; vm.thirdParty = false; vm.wallet = null; + vm.memoExpanded = false; var config = null; var defaults = {}; @@ -83,6 +84,12 @@ function reviewController(addressbookService, bitcoinCashJsService, bitcore, bit } vm.thirdParty.data['fromWalletId'] = vm.fromWalletId; } + if (vm.thirdParty.id === 'bip70') { + if (vm.thirdParty.memo) { + vm.memo = 'Payment request for BitPay invoice.\n' + toAddress + ' for merchant'; + vm.memoExpanded = true; + } + } } } @@ -321,7 +328,7 @@ function reviewController(addressbookService, bitcoinCashJsService, bitcore, bit txp.outputs = [{ 'toAddress': tx.toAddress, 'amount': tx.amount, - 'message': tx.description + 'message': vm.memo }]; if (tx.sendMaxInfo) { @@ -333,7 +340,7 @@ function reviewController(addressbookService, bitcoinCashJsService, bitcore, bit } else txp.feeLevel = tx.feeLevel; } - txp.message = tx.description; + txp.message = vm.memo; if (tx.paypro) { txp.payProUrl = tx.paypro.url; diff --git a/src/js/services/incomingData.js b/src/js/services/incomingData.js index ffa3e95f1..be391edc3 100644 --- a/src/js/services/incomingData.js +++ b/src/js/services/incomingData.js @@ -422,7 +422,8 @@ angular.module('copayApp.services').factory('incomingData', function($log, $stat function handlePayPro(payProDetails, coin) { var thirdPartyData = { - id: payProDetails.name, + id: 'bip70', + name: payProDetails.name, caName: payProDetails.caName, caTrusted: payProDetails.caTrusted, coin: coin, diff --git a/www/css/main.css b/www/css/main.css index c2e4325f9..87333d1a6 100644 --- a/www/css/main.css +++ b/www/css/main.css @@ -12093,7 +12093,7 @@ a.item { color: #fff; } .header.shapeshift { - background: url(../img/shapeshiftbg.jpg) center center no-repeat #28394d; + background: url(../img/shapeshiftbg.jpg) center center repeat #28394d; opacity: 0.99; } #bitpayCard { diff --git a/www/views/review.html b/www/views/review.html index 631d1bec4..0ad5e2148 100644 --- a/www/views/review.html +++ b/www/views/review.html @@ -7,8 +7,7 @@ - +
@@ -47,7 +46,13 @@

{{vm.destination.name}} ({{vm.destination.currency}})

{{vm.destination.balanceAmount}} {{vm.destination.balanceCurrency}}

-
+
+ +

BitPay

+

Payment expired in XX:XX

+
+
{{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)}}
@@ -56,17 +61,17 @@
+ ng-class="{ 'expand-content-revealed': vm.memoExpanded }" + ng-click="vm.memoExpanded = !vm.memoExpanded"> Add personal note
+ ng-class="{ 'expand-content-revealed': vm.memoExpanded }">
Personal Note:
- +
diff --git a/www/views/walletSelector.html b/www/views/walletSelector.html index 15b4935fa..eeb7591a8 100644 --- a/www/views/walletSelector.html +++ b/www/views/walletSelector.html @@ -5,7 +5,7 @@
-
+
Paying
{{requestAmount}} {{requestCurrency}}
From caafec4625bb6bca860cd41c082bd98738f48f3f Mon Sep 17 00:00:00 2001 From: Sebastiaan Pasma Date: Mon, 6 Aug 2018 18:06:10 +0200 Subject: [PATCH 142/256] shapeshift controller --- src/js/controllers/amount.js | 25 +--- src/js/controllers/review.controller.js | 19 ++- .../controllers/walletSelectorController.js | 1 + src/js/services/shapeshiftService.js | 131 ++++++++++-------- www/views/review.html | 3 +- 5 files changed, 89 insertions(+), 90 deletions(-) diff --git a/src/js/controllers/amount.js b/src/js/controllers/amount.js index db1bb52fe..c8b7722f9 100644 --- a/src/js/controllers/amount.js +++ b/src/js/controllers/amount.js @@ -217,7 +217,7 @@ function amountController(configService, $filter, gettextCatalog, $ionicHistory, }; function goBack() { - if (vm.shapeshiftOrderId) { + if (vm.thirdParty && vm.thirdParty.id === 'shapeshift') { $state.go('tabs.send').then(function() { $ionicHistory.clearHistory(); $state.go('tabs.home').then(function() { @@ -483,29 +483,6 @@ function amountController(configService, $filter, gettextCatalog, $ionicHistory, if (!confirmData.fromWalletId) { $state.transitionTo('tabs.paymentRequest.confirm', confirmData); } else { - - if (vm.shapeshiftOrderId) { - var shapeshiftOrderUrl = 'https://www.shapeshift.io/#/status/'; - shapeshiftOrderUrl += vm.shapeshiftOrderId; - confirmData.description = shapeshiftOrderUrl; - - if (confirmData.sendMax) { - var wallet = lodash.find(profileService.getWallets({ coin: coin }), - function(w) { - return w.id == passthroughParams.fromWalletId; - }); - - var balance = parseFloat(wallet.cachedBalance.substring(0, wallet.cachedBalance.length-4)); - if (balance < vm.minAmount * 1.04) { - confirmData.sendMax = false; - confirmData.amount = vm.minAmount * unitToSatoshi; - } else if (balance > vm.maxAmount) { - confirmData.sendMax = false; - confirmData.amount = vm.maxAmount * unitToSatoshi * 0.99; - } - } - } - $state.transitionTo('tabs.send.review', confirmData); $scope.useSendMax = null; } diff --git a/src/js/controllers/review.controller.js b/src/js/controllers/review.controller.js index 3143fabcf..13f6e6cb1 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, $ionicHistory, $ionicLoading, $ionicModal, lodash, $log, ongoingProcess, platformInfo, popupService, profileService, $scope, soundService, $state, $timeout, txConfirmNotification, txFormatService, walletService) { +function reviewController(addressbookService, bitcoinCashJsService, bitcore, bitcoreCash, bwcError, configService, feeService, gettextCatalog, $ionicHistory, $ionicLoading, $ionicModal, lodash, $log, ongoingProcess, platformInfo, popupService, profileService, $scope, shapeshiftService, soundService, $state, $timeout, txConfirmNotification, txFormatService, walletService) { var vm = this; vm.buttonText = ''; @@ -82,7 +82,20 @@ function reviewController(addressbookService, bitcoinCashJsService, bitcore, bit if (!vm.thirdParty.data) { vm.thirdParty.data = {}; } - vm.thirdParty.data['fromWalletId'] = vm.fromWalletId; + + var toWallet = profileService.getWallet(data.stateParams.toWalletId); + $ionicLoading.show(); + walletService.getAddress(vm.originWallet, false, function onWalletAddress(err, returnAddr) { + walletService.getAddress(toWallet, false, function onWalletAddress(err, withdrawalAddr) { + $ionicLoading.hide(); + shapeshiftService.shiftIt(vm.originWallet.coin, toWallet.coin, withdrawalAddr, returnAddr, function(shapeshiftData) { + vm.memo = 'ShapeShift Order:\nhttps://www.shapeshift.io/#/status/'+shapeshiftData.orderId; + toAddress = shapeshiftData.toAddress; + vm.destination.address = toAddress; + vm.destination.kind = 'shapeshift'; + }); + }); + }); } if (vm.thirdParty.id === 'bip70') { if (vm.thirdParty.memo) { @@ -115,8 +128,6 @@ function reviewController(addressbookService, bitcoinCashJsService, bitcore, bit if (vm.thirdParty.id === 'shapeshift') { shapeshiftService.shiftIt(); return; - } - if (!tx || !vm.originWallet) return; if ($scope.paymentExpired) { diff --git a/src/js/controllers/walletSelectorController.js b/src/js/controllers/walletSelectorController.js index b251da987..824d0e6ca 100644 --- a/src/js/controllers/walletSelectorController.js +++ b/src/js/controllers/walletSelectorController.js @@ -103,6 +103,7 @@ angular.module('copayApp.controllers').controller('walletSelectorController', fu function handleThirdPartyIfShapeshift() { if ($scope.thirdParty.id === 'shapeshift' && $scope.type === 'destination') { // Shapeshift wants to know the + $scope.coin = profileService.getWallet(fromWalletId).coin; if ($scope.coin === 'bch') { $scope.coin = 'btc'; } else { diff --git a/src/js/services/shapeshiftService.js b/src/js/services/shapeshiftService.js index 317e72394..b3e307667 100644 --- a/src/js/services/shapeshiftService.js +++ b/src/js/services/shapeshiftService.js @@ -1,48 +1,44 @@ 'use strict'; -angular.module('copayApp.services').factory('shapeshiftService', function($http, $interval, $log, lodash, moment, ongoingProcess, shapeshiftApiService, storageService, configService, incomingData, platformInfo, servicesService) { +angular.module('copayApp.services').factory('shapeshiftService', function ($http, $interval, $log, lodash, moment, ongoingProcess, shapeshiftApiService, storageService, configService, incomingData, platformInfo, servicesService) { var root = {}; root.ShiftState = 'Shift'; - root.withdrawalAddress = '' - root.returnAddress = '' + root.coinIn = ''; + root.coinOut = ''; + root.withdrawalAddress = ''; + root.returnAddress = ''; root.amount = ''; - root.marketData = {} - root.withdrawalAddress = function(address) { + root.marketData = {}; + root.withdrawalAddress = function (address) { root.withdrawalAddress = address; }; - root.returnAddress = function(address) { + root.returnAddress = function (address) { root.returnAddress = address; }; - root.amount = function(amount) { + root.amount = function (amount) { root.amount = amount; }; - root.fromWalletId = function(id) { - root.fromWalletId = id; - }; - root.toWalletId = function(id) { - root.toWalletId = id; - }; - root.coinIn = function(coinIn) { + root.coinIn = function (coinIn) { root.coinIn = coinIn.toUpperCase(); }; - root.coinOut = function(coinOut) { + root.coinOut = function (coinOut) { root.coinOut = coinOut.toUpperCase(); }; - root.getMarketDataIn = function(coin) { - if(coin === root.coinOut) return root.getMarketData(root.coinOut, root.coinIn); + root.getMarketDataIn = function (coin) { + if (coin === root.coinOut) return root.getMarketData(root.coinOut, root.coinIn); return root.getMarketData(coin, root.coinOut); }; - root.getMarketDataOut = function(coin) { - if(coin === root.coinIn) return root.getMarketData(root.coinOut, root.coinIn); + root.getMarketDataOut = function (coin) { + if (coin === root.coinIn) return root.getMarketData(root.coinOut, root.coinIn); return root.getMarketData(root.coinIn, coin); }; - root.getMarketData = function(coinIn, coinOut, cb) { + root.getMarketData = function (coinIn, coinOut, cb) { root.coinIn = coinIn; - root.coinOut= coinOut; - if(root.coinIn === undefined || root.coinOut === undefined) return; + root.coinOut = coinOut; + if (root.coinIn === undefined || root.coinOut === undefined) return; shapeshiftApiService .marketInfo(root.coinIn, root.coinOut) - .then(function(marketData){ + .then(function (marketData) { root.marketData = marketData; root.rateString = root.marketData.rate.toString() + ' ' + coinOut.toUpperCase() + '/' + coinIn.toUpperCase(); if (cb) { @@ -59,43 +55,50 @@ angular.module('copayApp.services').factory('shapeshiftService', function($http, });*/ root.coins = { - 'BTC': { name: 'Bitcoin', symbol: 'BTC' }, - 'BCH': { name: 'Bitcoin Cash', symbol: 'BCH' } + 'BTC': {name: 'Bitcoin', symbol: 'BTC'}, + 'BCH': {name: 'Bitcoin Cash', symbol: 'BCH'} }; - function checkForError(data){ - if(data.error) return true; + function checkForError(data) { + if (data.error) return true; return false; } - root.shiftIt = function(){ + root.shiftIt = function (coinIn, coinOut, withdrawalAddress, returnAddress, cb) { ongoingProcess.set('connectingShapeshift', true); - var validate=shapeshiftApiService.ValidateAddress(root.withdrawalAddress, root.coinOut); - validate.then(function(valid){ - //console.log(root.withdrawalAddress) - //console.log(valid) + root.withdrawalAddress(withdrawalAddress); + root.returnAddress(returnAddress); + var validate = shapeshiftApiService.ValidateAddress(withdrawalAddress, coinOut); + validate.then(function (valid) { var tx = ShapeShift(); - tx.then(function(txData){ - if(txData['fixedTxData']){ + var coin; + console.log("Starting"); + tx.then(function (txData) { + console.log("Got txData", txData); + if (txData['fixedTxData']) { txData = txData.fixedTxData; - if(checkForError(txData)) return; + if (checkForError(txData)) return; //console.log(txData) - var coinPair=txData.pair.split('_'); + var coinPair = txData.pair.split('_'); txData.depositType = coinPair[0].toUpperCase(); txData.withdrawalType = coinPair[1].toUpperCase(); - var coin = root.coins[txData.depositType].name.toLowerCase(); - //console.log(coin) - txData.depositQR = coin + ":" + txData.deposit + "?amount=" + txData.depositAmount + coin = root.coins[txData.depositType].name.toLowerCase(); + + txData.depositQR = coin + ":" + txData.deposit + "?amount=" + txData.depositAmount; + root.txFixedPending = true; - } else if(txData['normalTxData']){ + + } else if (txData['normalTxData']) { + txData = txData.normalTxData; - if(checkForError(txData)) return; - var coin = root.coins[txData.depositType.toUpperCase()].name.toLowerCase(); + if (checkForError(txData)) return; + coin = root.coins[txData.depositType.toUpperCase()].name.toLowerCase(); txData.depositQR = coin + ":" + txData.deposit; - } else if(txData['cancelTxData']){ - if(checkForError(txData.cancelTxData)) return; - if(root.txFixedPending) { - $interval.cancel(root.txInterval); + + } else if (txData['cancelTxData']) { + + if (checkForError(txData.cancelTxData)) return; + if (root.txFixedPending) { root.txFixedPending = false; } root.ShiftState = 'Shift'; @@ -108,37 +111,43 @@ angular.module('copayApp.services').factory('shapeshiftService', function($http, if (sendAddress && sendAddress.indexOf('bitcoin cash') >= 0) sendAddress = sendAddress.replace('bitcoin cash', 'bitcoincash'); + ongoingProcess.set('connectingShapeshift', false); + + root.ShiftState = 'Cancel'; + root.GetStatus(); + root.txInterval=$interval(root.GetStatus, 8000); + var shapeshiftData = { - fromWalletId: root.fromWalletId, + coinIn: coinIn, + coinOut: coinOut, toWalletId: root.toWalletId, minAmount: root.marketData.minimum, maxAmount: root.marketData.maxLimit, - orderId: root.depositInfo.orderId + orderId: root.depositInfo.orderId, + toAddress: txData.deposit }; - - if (incomingData.redir(sendAddress, 'shapeshift', shapeshiftData)) { + // + // if (incomingData.redir(sendAddress, 'shapeshift', shapeshiftData)) { ongoingProcess.set('connectingShapeshift', false); - return; - } + // return; + // } + cb(shapeshiftData); - /*root.ShiftState = 'Cancel'; - root.GetStatus(); - root.txInterval=$interval(root.GetStatus, 8000);*/ }); }) }; function ShapeShift() { - if(root.ShiftState === 'Cancel') return shapeshiftApiService.CancelTx(root); - if(parseFloat(root.amount) > 0) return shapeshiftApiService.FixedAmountTx(root); + if (root.ShiftState === 'Cancel') return shapeshiftApiService.CancelTx(root); + if (parseFloat(root.amount) > 0) return shapeshiftApiService.FixedAmountTx(root); return shapeshiftApiService.NormalTx(root); } - root.GetStatus = function(){ + root.GetStatus = function () { var address = root.depositInfo.deposit - shapeshiftApiService.GetStatusOfDepositToAddress(address).then(function(data){ + shapeshiftApiService.GetStatusOfDepositToAddress(address).then(function (data) { root.DepositStatus = data; - if(root.DepositStatus.status === 'complete'){ + if (root.DepositStatus.status === 'complete') { $interval.cancel(root.txInterval); root.depositInfo = null; root.ShiftState = 'Shift' @@ -153,7 +162,7 @@ angular.module('copayApp.services').factory('shapeshiftService', function($http, sref: 'tabs.shapeshift', }; - var register = function() { + var register = function () { servicesService.register(servicesItem); }; register(); diff --git a/www/views/review.html b/www/views/review.html index 0ad5e2148..7317d7b68 100644 --- a/www/views/review.html +++ b/www/views/review.html @@ -32,13 +32,14 @@
+
To:
- +
From 5b6f48e6a2d8bb34a8d94fd197386f1ef3f04d24 Mon Sep 17 00:00:00 2001 From: Sebastiaan Pasma Date: Mon, 6 Aug 2018 18:11:37 +0200 Subject: [PATCH 143/256] Check min max on shapeshift flow --- src/js/controllers/amount.js | 14 +++----------- src/js/controllers/review.controller.js | 3 +-- src/js/controllers/walletSelectorController.js | 1 + 3 files changed, 5 insertions(+), 13 deletions(-) diff --git a/src/js/controllers/amount.js b/src/js/controllers/amount.js index c8b7722f9..c53d49061 100644 --- a/src/js/controllers/amount.js +++ b/src/js/controllers/amount.js @@ -20,7 +20,6 @@ function amountController(configService, $filter, gettextCatalog, $ionicHistory, vm.lastUsedPopularList = []; vm.maxAmount = 0; vm.minAmount = 0; - vm.shapeshiftOrderId = ''; vm.thirdParty = false; vm.unit = ''; @@ -95,14 +94,9 @@ function amountController(configService, $filter, gettextCatalog, $ionicHistory, vm.thirdParty.data['minAmount'] = vm.minAmount = parseFloat(data.minimum); vm.thirdParty.data['maxAmount'] = vm.maxAmount = parseFloat(data.maxLimit); }); - - // if (vm.thirdParty.data['shapeshiftOrderId'] && data.stateParams.shapeshiftOrderId.length > 0) { - // vm.shapeshiftOrderId = vm.thirdParty.data['shapeshiftOrderId']; - // } } } } - // vm.shapeshiftOrderId = data.stateParams.thirdPartyOrderId; vm.isRequestingSpecificAmount = !data.stateParams.fromWalletId; @@ -371,8 +365,7 @@ function amountController(configService, $filter, gettextCatalog, $ionicHistory, vm.alternativeAmount = txFormatService.formatAmount(amountInSatoshis, true); vm.allowSend = lodash.isNumber(a) && a > 0 - && (!vm.shapeshiftOrderId - || (a >= vm.minAmount && a <= vm.maxAmount)) + && (a >= vm.minAmount && a <= vm.maxAmount) && !vm.fundsAreInsufficient; } else { if (result) { @@ -392,8 +385,7 @@ function amountController(configService, $filter, gettextCatalog, $ionicHistory, vm.alternativeAmount = $filter('formatFiatAmount')(toFiat(result)); vm.allowSend = lodash.isNumber(result) && result > 0 - && (!vm.shapeshiftOrderId - || (result >= vm.minAmount && result <= vm.maxAmount)) + && (result >= vm.minAmount && result <= vm.maxAmount) && !vm.fundsAreInsufficient; } @@ -404,7 +396,7 @@ function amountController(configService, $filter, gettextCatalog, $ionicHistory, if (vm.fundsAreInsufficient) { vm.errorMessage = gettextCatalog.getString('Not enough available funds'); - } else if (amountInCrypto && vm.shapeshiftOrderId) { + } else if (amountInCrypto && vm.thirdParty && vm.thirdParty.id === 'shapeshift') { if (amountInCrypto < vm.minAmount) { vm.errorMessage = gettextCatalog.getString('Amount is below minimum'); diff --git a/src/js/controllers/review.controller.js b/src/js/controllers/review.controller.js index 13f6e6cb1..19bab5a2e 100644 --- a/src/js/controllers/review.controller.js +++ b/src/js/controllers/review.controller.js @@ -125,8 +125,7 @@ function reviewController(addressbookService, bitcoinCashJsService, bitcore, bit } vm.approve = function() { - if (vm.thirdParty.id === 'shapeshift') { - shapeshiftService.shiftIt(); + if (vm.thirdParty.id === 'shapeshift') return; if (!tx || !vm.originWallet) return; diff --git a/src/js/controllers/walletSelectorController.js b/src/js/controllers/walletSelectorController.js index 824d0e6ca..a4ff3ab3e 100644 --- a/src/js/controllers/walletSelectorController.js +++ b/src/js/controllers/walletSelectorController.js @@ -102,6 +102,7 @@ angular.module('copayApp.controllers').controller('walletSelectorController', fu } function handleThirdPartyIfShapeshift() { + console.log($scope.thirdParty, $scope.coin); if ($scope.thirdParty.id === 'shapeshift' && $scope.type === 'destination') { // Shapeshift wants to know the $scope.coin = profileService.getWallet(fromWalletId).coin; if ($scope.coin === 'bch') { From d183077a203d36a1482631fc167bb4092ca77a4b Mon Sep 17 00:00:00 2001 From: Brendon Duncan Date: Tue, 7 Aug 2018 09:39:48 +1200 Subject: [PATCH 144/256] Countdown timer for BIP70 invoices. --- src/js/controllers/review.controller.js | 154 ++++++++++++++---------- src/js/services/incomingData.js | 2 +- www/views/review.html | 2 +- 3 files changed, 94 insertions(+), 64 deletions(-) diff --git a/src/js/controllers/review.controller.js b/src/js/controllers/review.controller.js index 19bab5a2e..5785ee831 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, $ionicHistory, $ionicLoading, $ionicModal, lodash, $log, ongoingProcess, platformInfo, popupService, profileService, $scope, shapeshiftService, soundService, $state, $timeout, txConfirmNotification, txFormatService, walletService) { +function reviewController(addressbookService, bitcoinCashJsService, bitcore, bitcoreCash, bwcError, configService, feeService, gettextCatalog, $interval, $ionicHistory, $ionicLoading, $ionicModal, lodash, $log, ongoingProcess, platformInfo, popupService, profileService, $scope, shapeshiftService, soundService, $state, $timeout, txConfirmNotification, txFormatService, walletService) { var vm = this; vm.buttonText = ''; @@ -33,19 +33,27 @@ function reviewController(addressbookService, bitcoinCashJsService, bitcore, bit currencyColor: '', }; vm.originWallet = null; + vm.paymentExpired = false; vm.primaryAmount = ''; vm.primaryCurrency = ''; vm.usingMerchantFee = false; vm.readyToSend = false; + vm.remainingTimeStr = ''; vm.secondaryAmount = ''; vm.secondaryCurrency = ''; vm.sendingTitle = gettextCatalog.getString('You are sending'); vm.sendStatus = ''; + vm.showAddress = true; vm.thirdParty = false; vm.wallet = null; vm.memoExpanded = false; + + // Functions + vm.onSuccessConfirm = onSuccessConfirm; + var config = null; + var countDown = null; var defaults = {}; var coin = ''; var countDown = null; @@ -57,6 +65,7 @@ function reviewController(addressbookService, bitcoinCashJsService, bitcore, bit var satoshis = null; var toAddress = ''; var tx = {}; + var txPayproData = null; var unitFromSat = 0; var FEE_TOO_HIGH_LIMIT_PERCENTAGE = 15; @@ -77,32 +86,8 @@ function reviewController(addressbookService, bitcoinCashJsService, bitcore, bit if (data.stateParams.thirdParty) { vm.thirdParty = JSON.parse(data.stateParams.thirdParty); // Parse stringified JSON-object if (vm.thirdParty) { - if (vm.thirdParty.id === 'shapeshift') { - vm.sendingTitle = gettextCatalog.getString('You are shifting'); - if (!vm.thirdParty.data) { - vm.thirdParty.data = {}; - } - - var toWallet = profileService.getWallet(data.stateParams.toWalletId); - $ionicLoading.show(); - walletService.getAddress(vm.originWallet, false, function onWalletAddress(err, returnAddr) { - walletService.getAddress(toWallet, false, function onWalletAddress(err, withdrawalAddr) { - $ionicLoading.hide(); - shapeshiftService.shiftIt(vm.originWallet.coin, toWallet.coin, withdrawalAddr, returnAddr, function(shapeshiftData) { - vm.memo = 'ShapeShift Order:\nhttps://www.shapeshift.io/#/status/'+shapeshiftData.orderId; - toAddress = shapeshiftData.toAddress; - vm.destination.address = toAddress; - vm.destination.kind = 'shapeshift'; - }); - }); - }); - } - if (vm.thirdParty.id === 'bip70') { - if (vm.thirdParty.memo) { - vm.memo = 'Payment request for BitPay invoice.\n' + toAddress + ' for merchant'; - vm.memoExpanded = true; - } - } + handleThirdPartyInitIfBip70(); + handleThirdPartyInitIfShapeshift(); } } @@ -240,6 +225,8 @@ function reviewController(addressbookService, bitcoinCashJsService, bitcore, bit sendMax: data.stateParams.sendMax === 'true' ? true : false, fromWalletId: data.stateParams.fromWalletId, toAddress: data.stateParams.toAddress, + paypro: txPayproData, + feeLevel: configFeeLevel, spendUnconfirmed: config.wallet.spendUnconfirmed, @@ -253,6 +240,8 @@ function reviewController(addressbookService, bitcoinCashJsService, bitcore, bit txp: {}, }; + + if (data.stateParams.requiredFeeRate) { vm.usingMerchantFee = true; tx.feeRate = parseInt(data.stateParams.requiredFeeRate); @@ -454,6 +443,80 @@ function reviewController(addressbookService, bitcoinCashJsService, bitcore, bit vm.destination.balanceCurrency = balanceText.currency; } + function handleThirdPartyInitIfBip70() { + if (vm.thirdParty.id === 'bip70') { + if (vm.thirdParty.memo) { + // Why not the whole memo? + vm.memo = 'Payment request for BitPay invoice.\n' + toAddress + ' for merchant'; + vm.memoExpanded = true; + } + txPayproData = { + caTrusted: vm.thirdParty.caTrusted, + domain: vm.thirdParty.domain, + expires: vm.thirdParty.expires, + toAddress: toAddress, + url: vm.thirdParty.url, + verified: vm.thirdParty.verified, + }; + } + } + + function handleThirdPartyInitIfShapeshift() { + if (vm.thirdParty.id === 'shapeshift') { + vm.sendingTitle = gettextCatalog.getString('You are shifting'); + if (!vm.thirdParty.data) { + vm.thirdParty.data = {}; + } + + var toWallet = profileService.getWallet(data.stateParams.toWalletId); + $ionicLoading.show(); + walletService.getAddress(vm.originWallet, false, function onWalletAddress(err, returnAddr) { + walletService.getAddress(toWallet, false, function onWalletAddress(err, withdrawalAddr) { + $ionicLoading.hide(); + shapeshiftService.shiftIt(vm.originWallet.coin, toWallet.coin, withdrawalAddr, returnAddr, function(shapeshiftData) { + vm.memo = 'ShapeShift Order:\nhttps://www.shapeshift.io/#/status/' + shapeshiftData.orderId; + toAddress = shapeshiftData.toAddress; + vm.destination.address = toAddress; + vm.destination.kind = 'shapeshift'; + }); + }); + }); + } + } + + function startExpirationTimer(expirationTime) { + vm.paymentExpired = false; + setExpirationTime(); + + countDown = $interval(function() { + setExpirationTime(); + }, 1000); + + function setExpirationTime() { + console.log('setExpirationTime()'); + var now = Math.floor(Date.now() / 1000); + + if (now > expirationTime) { + setExpiredValues(); + return; + } + + var totalSecs = expirationTime - now; + var m = Math.floor(totalSecs / 60); + var s = totalSecs % 60; + vm.remainingTimeStr = m + ":" + ('0' + s).slice(-2); + }; + + function setExpiredValues() { + vm.paymentExpired = true; + vm.remainingTimeStr = gettextCatalog.getString('Expired'); + if (countDown) $interval.cancel(countDown); + $timeout(function() { + $scope.$apply(); + }); + }; + }; + function updateSendAmounts() { if (typeof satoshis !== 'number') { return; @@ -497,7 +560,7 @@ function reviewController(addressbookService, bitcoinCashJsService, bitcore, bit }); } - vm.onSuccessConfirm = function() { + function onSuccessConfirm() { vm.sendStatus = ''; $ionicHistory.nextViewOptions({ disableAnimate: true, @@ -565,14 +628,13 @@ function reviewController(addressbookService, bitcoinCashJsService, bitcore, bit } }); - // Other Scope vars vm.showAddress = false; setButtonText(vm.originWallet.credentials.m > 1, !!tx.paypro); if (tx.paypro) - _paymentTimeControl(tx.paypro.expires); + startExpirationTimer(tx.paypro.expires); updateTx(tx, vm.originWallet, { dryRun: true @@ -765,36 +827,4 @@ function reviewController(addressbookService, bitcoinCashJsService, bitcore, bit }); } - function _paymentTimeControl(expirationTime) { - $scope.paymentExpired = false; - setExpirationTime(); - - countDown = $interval(function() { - setExpirationTime(); - }, 1000); - - function setExpirationTime() { - var now = Math.floor(Date.now() / 1000); - - if (now > expirationTime) { - setExpiredValues(); - return; - } - - var totalSecs = expirationTime - now; - var m = Math.floor(totalSecs / 60); - var s = totalSecs % 60; - $scope.remainingTimeStr = ('0' + m).slice(-2) + ":" + ('0' + s).slice(-2); - }; - - function setExpiredValues() { - $scope.paymentExpired = true; - $scope.remainingTimeStr = gettextCatalog.getString('Expired'); - if (countDown) $interval.cancel(countDown); - $timeout(function() { - $scope.$apply(); - }); - }; - }; - } diff --git a/src/js/services/incomingData.js b/src/js/services/incomingData.js index be391edc3..703056f03 100644 --- a/src/js/services/incomingData.js +++ b/src/js/services/incomingData.js @@ -134,7 +134,7 @@ angular.module('copayApp.services').factory('incomingData', function($log, $stat } }); } else { - payproService.getPayProDetails(data, coin, function(err, details) { + payproService.getPayProDetails(data, coin, function onGetPayProDetails(err, details) { if (err) { popupService.showAlert(gettextCatalog.getString('Error'), err); } else { diff --git a/www/views/review.html b/www/views/review.html index 7317d7b68..c401b8c34 100644 --- a/www/views/review.html +++ b/www/views/review.html @@ -51,7 +51,7 @@ ng-if="vm.thirdParty && vm.thirdParty.id === 'bip70' && vm.thirdParty.name === 'bitpay'">

BitPay

-

Payment expired in XX:XX

+

Payment expires: {{vm.remainingTimeStr}}

From e29f97eddf4564322d912ab0a964049394aec84c Mon Sep 17 00:00:00 2001 From: Brendon Duncan Date: Tue, 7 Aug 2018 11:07:19 +1200 Subject: [PATCH 145/256] Payment request expiration. --- src/js/controllers/review.controller.js | 1 + www/views/review.html | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/js/controllers/review.controller.js b/src/js/controllers/review.controller.js index 5785ee831..fe1eac2cd 100644 --- a/src/js/controllers/review.controller.js +++ b/src/js/controllers/review.controller.js @@ -510,6 +510,7 @@ function reviewController(addressbookService, bitcoinCashJsService, bitcore, bit function setExpiredValues() { vm.paymentExpired = true; vm.remainingTimeStr = gettextCatalog.getString('Expired'); + vm.readyToSend = false; if (countDown) $interval.cancel(countDown); $timeout(function() { $scope.$apply(); diff --git a/www/views/review.html b/www/views/review.html index c401b8c34..c6631fd19 100644 --- a/www/views/review.html +++ b/www/views/review.html @@ -51,7 +51,8 @@ ng-if="vm.thirdParty && vm.thirdParty.id === 'bip70' && vm.thirdParty.name === 'bitpay'">

BitPay

-

Payment expires: {{vm.remainingTimeStr}}

+

Payment expires: {{vm.remainingTimeStr}}

+

Payment request has expired

From 09f627ea5118b0dfdd2b18601e73958fb02f8a52 Mon Sep 17 00:00:00 2001 From: Brendon Duncan Date: Tue, 7 Aug 2018 11:27:05 +1200 Subject: [PATCH 146/256] Suggested by merchant. --- src/sass/components/fee-summary.scss | 26 ++++++++++++++++---------- src/sass/views/review.scss | 4 ++++ www/views/review.html | 11 +++++++---- 3 files changed, 27 insertions(+), 14 deletions(-) diff --git a/src/sass/components/fee-summary.scss b/src/sass/components/fee-summary.scss index 404643a82..47fe2f6d1 100644 --- a/src/sass/components/fee-summary.scss +++ b/src/sass/components/fee-summary.scss @@ -1,7 +1,7 @@ .fee-summary { position: relative; display: flex; - justify-content: space-between; + flex-direction: column; width: 100%; padding: 5px 12px 15px; box-sizing: border-box; @@ -17,17 +17,23 @@ background: linear-gradient(to bottom, rgba(242,242,242,0) 0%,rgba(242,242,242,1) 100%); } - .fee-fiat { - &.positive { - color: #70955F; + .amount { + display: flex; + flex-direction: row; + justify-content: space-between; + + .fee-fiat { + &.positive { + color: #70955F; + } + + &.negative { + color: #C24633; + } } - &.negative { - color: #C24633; + .fee-crypto { + color: #A7A7A7; } } - - .fee-crypto { - color: #A7A7A7; - } } \ No newline at end of file diff --git a/src/sass/views/review.scss b/src/sass/views/review.scss index 8bda83890..44b634697 100644 --- a/src/sass/views/review.scss +++ b/src/sass/views/review.scss @@ -14,4 +14,8 @@ .shapeshift-banner, .bitpay-banner { box-shadow: none; } + + .warning { + color: $v-warning-color-2; + } } \ No newline at end of file diff --git a/www/views/review.html b/www/views/review.html index c6631fd19..4eb4763d7 100644 --- a/www/views/review.html +++ b/www/views/review.html @@ -82,10 +82,13 @@
-
Fee: Less than 1 cent
-
Fee: {{vm.feeFiat}} {{vm.feeCurrency}}
-
- {{vm.feeCrypto}} {{vm.origin.currency}} +
Suggested by merchant:
+
+
Fee: Less than 1 cent
+
Fee: {{vm.feeFiat}} {{vm.feeCurrency}}
+
+ {{vm.feeCrypto}} {{vm.origin.currency}} +
From 7d1fff424ac68fa75fd5e6f5d90eb9fba0316596 Mon Sep 17 00:00:00 2001 From: Brendon Duncan Date: Tue, 7 Aug 2018 11:34:35 +1200 Subject: [PATCH 147/256] Streamlined display of memo. --- src/js/controllers/review.controller.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/js/controllers/review.controller.js b/src/js/controllers/review.controller.js index fe1eac2cd..49c4d51ab 100644 --- a/src/js/controllers/review.controller.js +++ b/src/js/controllers/review.controller.js @@ -445,11 +445,9 @@ function reviewController(addressbookService, bitcoinCashJsService, bitcore, bit function handleThirdPartyInitIfBip70() { if (vm.thirdParty.id === 'bip70') { - if (vm.thirdParty.memo) { - // Why not the whole memo? - vm.memo = 'Payment request for BitPay invoice.\n' + toAddress + ' for merchant'; - vm.memoExpanded = true; - } + vm.memo = vm.thirdParty.memo; + vm.memoExpanded = !!vm.memo; + txPayproData = { caTrusted: vm.thirdParty.caTrusted, domain: vm.thirdParty.domain, From 38852d32d4b300d82e8251b5a28a0f26cdc8b6f6 Mon Sep 17 00:00:00 2001 From: Brendon Duncan Date: Tue, 7 Aug 2018 11:59:36 +1200 Subject: [PATCH 148/256] Sending BIP70 payments. --- src/js/controllers/amount.js | 6 ++++-- src/js/controllers/review.controller.js | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/js/controllers/amount.js b/src/js/controllers/amount.js index c53d49061..e6913a2cb 100644 --- a/src/js/controllers/amount.js +++ b/src/js/controllers/amount.js @@ -365,7 +365,8 @@ function amountController(configService, $filter, gettextCatalog, $ionicHistory, vm.alternativeAmount = txFormatService.formatAmount(amountInSatoshis, true); vm.allowSend = lodash.isNumber(a) && a > 0 - && (a >= vm.minAmount && a <= vm.maxAmount) + && (!vm.minAmount || a >= vm.minAmount) + && (!vm.maxAmount || a <= vm.maxAmount) && !vm.fundsAreInsufficient; } else { if (result) { @@ -385,7 +386,8 @@ function amountController(configService, $filter, gettextCatalog, $ionicHistory, vm.alternativeAmount = $filter('formatFiatAmount')(toFiat(result)); vm.allowSend = lodash.isNumber(result) && result > 0 - && (result >= vm.minAmount && result <= vm.maxAmount) + && (!vm.minAmount || result >= vm.minAmount) + && (!vm.maxAmount || result <= vm.maxAmount) && !vm.fundsAreInsufficient; } diff --git a/src/js/controllers/review.controller.js b/src/js/controllers/review.controller.js index 49c4d51ab..73af91188 100644 --- a/src/js/controllers/review.controller.js +++ b/src/js/controllers/review.controller.js @@ -110,13 +110,14 @@ function reviewController(addressbookService, bitcoinCashJsService, bitcore, bit } vm.approve = function() { + if (vm.thirdParty.id === 'shapeshift') return; if (!tx || !vm.originWallet) return; - if ($scope.paymentExpired) { + if (vm.paymentExpired) { popupService.showAlert(null, gettextCatalog.getString('This bitcoin payment request has expired.')); - $scope.sendStatus = ''; + vm.sendStatus = ''; $timeout(function() { $scope.$apply(); }); @@ -445,6 +446,7 @@ function reviewController(addressbookService, bitcoinCashJsService, bitcore, bit function handleThirdPartyInitIfBip70() { if (vm.thirdParty.id === 'bip70') { + vm.sendingTitle = gettextCatalog.getString('You are paying'); vm.memo = vm.thirdParty.memo; vm.memoExpanded = !!vm.memo; From 6dfbbb15d44b8e612ba6427eee4af7ffb116095f Mon Sep 17 00:00:00 2001 From: Brendon Duncan Date: Tue, 7 Aug 2018 12:16:59 +1200 Subject: [PATCH 149/256] Added showSendMaxWarning(). --- src/js/controllers/review.controller.js | 40 +++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/src/js/controllers/review.controller.js b/src/js/controllers/review.controller.js index 73af91188..7c8bd784d 100644 --- a/src/js/controllers/review.controller.js +++ b/src/js/controllers/review.controller.js @@ -659,6 +659,46 @@ function reviewController(addressbookService, bitcoinCashJsService, bitcore, bit // }); } + function showSendMaxWarning(wallet, sendMaxInfo) { + var feeAlternative = '', + msg = ''; + + function verifyExcludedUtxos() { + var warningMsg = []; + if (sendMaxInfo.utxosBelowFee > 0) { + warningMsg.push(gettextCatalog.getString("A total of {{amountBelowFeeStr}} were excluded. These funds come from UTXOs smaller than the network fee provided.", { + amountBelowFeeStr: txFormatService.formatAmountStr(wallet.coin, sendMaxInfo.amountBelowFee) + })); + } + + if (sendMaxInfo.utxosAboveMaxSize > 0) { + warningMsg.push(gettextCatalog.getString("A total of {{amountAboveMaxSizeStr}} were excluded. The maximum size allowed for a transaction was exceeded.", { + amountAboveMaxSizeStr: txFormatService.formatAmountStr(vm.originWallet.coin, sendMaxInfo.amountAboveMaxSize) + })); + } + return warningMsg.join('\n'); + }; + + feeAlternative = txFormatService.formatAlternativeStr(vm.originWallet.coin, sendMaxInfo.fee); + if (feeAlternative) { + msg = gettextCatalog.getString("{{feeAlternative}} will be deducted for bitcoin networking fees ({{fee}}).", { + fee: txFormatService.formatAmountStr(vm.originWallet.coin, sendMaxInfo.fee), + feeAlternative: feeAlternative + }); + } else { + msg = gettextCatalog.getString("{{fee}} will be deducted for bitcoin networking fees).", { + fee: txFormatService.formatAmountStr(vm.originWallet.coin, sendMaxInfo.fee) + }); + } + + var warningMsg = verifyExcludedUtxos(); + + if (!lodash.isEmpty(warningMsg)) + msg += '\n' + warningMsg; + + popupService.showAlert(null, msg, function() {}); + }; + function statusChangeHandler(processName, showName, isOn) { $log.debug('statusChangeHandler: ', processName, showName, isOn); if ( From 6c46ec2bcab7315df92dbefd417bd13682e3ee09 Mon Sep 17 00:00:00 2001 From: Brendon Duncan Date: Tue, 7 Aug 2018 14:23:53 +1200 Subject: [PATCH 150/256] Fix for some changes which broke Shapeshift flow. --- src/js/controllers/review.controller.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/js/controllers/review.controller.js b/src/js/controllers/review.controller.js index 7c8bd784d..ce453cd8a 100644 --- a/src/js/controllers/review.controller.js +++ b/src/js/controllers/review.controller.js @@ -78,6 +78,7 @@ function reviewController(addressbookService, bitcoinCashJsService, bitcore, bit originWalletId = data.stateParams.fromWalletId; satoshis = parseInt(data.stateParams.amount, 10); toAddress = data.stateParams.toAddress; + destinationWalletId = data.stateParams.toWalletId; vm.originWallet = profileService.getWallet(originWalletId); vm.origin.currency = vm.originWallet.coin.toUpperCase(); @@ -257,7 +258,7 @@ function reviewController(addressbookService, bitcoinCashJsService, bitcore, bit try { if (vm.destination.kind === 'wallet') { // This is a wallet-to-wallet transfer $ionicLoading.show(); - var toWallet = profileService.getWallet(data.stateParams.toWalletId); + var toWallet = profileService.getWallet(destinationWalletId); // We need an address to send to, so we ask the walletService to create a new address for the toWallet. console.log('Getting address for wallet...'); @@ -468,7 +469,7 @@ function reviewController(addressbookService, bitcoinCashJsService, bitcore, bit vm.thirdParty.data = {}; } - var toWallet = profileService.getWallet(data.stateParams.toWalletId); + var toWallet = profileService.getWallet(destinationWalletId); $ionicLoading.show(); walletService.getAddress(vm.originWallet, false, function onWalletAddress(err, returnAddr) { walletService.getAddress(toWallet, false, function onWalletAddress(err, withdrawalAddr) { From db7eee984bfe8304c309c32600171e61b18d5997 Mon Sep 17 00:00:00 2001 From: Brendon Duncan Date: Tue, 7 Aug 2018 14:48:43 +1200 Subject: [PATCH 151/256] Error handling for Shapeshift, and UI for destination wallet. --- src/js/controllers/review.controller.js | 21 ++++++++++++++++++--- www/views/review.html | 2 +- 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/src/js/controllers/review.controller.js b/src/js/controllers/review.controller.js index ce453cd8a..6ae2a51c0 100644 --- a/src/js/controllers/review.controller.js +++ b/src/js/controllers/review.controller.js @@ -470,11 +470,26 @@ function reviewController(addressbookService, bitcoinCashJsService, bitcore, bit } var toWallet = profileService.getWallet(destinationWalletId); + vm.destination.name = toWallet.name; + vm.destination.color = toWallet.color; + vm.destination.currency = toWallet.coin.toUpperCase(); + $ionicLoading.show(); - walletService.getAddress(vm.originWallet, false, function onWalletAddress(err, returnAddr) { - walletService.getAddress(toWallet, false, function onWalletAddress(err, withdrawalAddr) { + walletService.getAddress(vm.originWallet, false, function onReturnWalletAddress(err, returnAddr) { + if (err) { $ionicLoading.hide(); - shapeshiftService.shiftIt(vm.originWallet.coin, toWallet.coin, withdrawalAddr, returnAddr, function(shapeshiftData) { + popupService.showAlert(gettextCatalog.getString('Shapeshift Error'), err.toString()); + return; + } + walletService.getAddress(toWallet, false, function onWithdrawalWalletAddress(err, withdrawalAddr) { + if (err) { + $ionicLoading.hide(); + popupService.showAlert(gettextCatalog.getString('Shapeshift Error'), err.toString()); + return; + } + + $ionicLoading.hide(); + shapeshiftService.shiftIt(vm.originWallet.coin, toWallet.coin, withdrawalAddr, returnAddr, function onShiftIt(shapeshiftData) { vm.memo = 'ShapeShift Order:\nhttps://www.shapeshift.io/#/status/' + shapeshiftData.orderId; toAddress = shapeshiftData.toAddress; vm.destination.address = toAddress; diff --git a/www/views/review.html b/www/views/review.html index 4eb4763d7..9edd672ec 100644 --- a/www/views/review.html +++ b/www/views/review.html @@ -37,7 +37,7 @@
To:
+ ng-if="vm.destination.kind === 'contact' || vm.destination.kind === 'wallet' || vm.destination.kind == 'shapeshift'">
Date: Tue, 7 Aug 2018 13:56:56 +0900 Subject: [PATCH 152/256] incomingData, bip70 & bitpay --- src/js/services/incomingData.js | 116 +++++++++++++++----------------- 1 file changed, 54 insertions(+), 62 deletions(-) diff --git a/src/js/services/incomingData.js b/src/js/services/incomingData.js index 703056f03..a41fcb5f4 100644 --- a/src/js/services/incomingData.js +++ b/src/js/services/incomingData.js @@ -82,37 +82,33 @@ angular.module('copayApp.services').factory('incomingData', function($log, $stat }); // Timeout is required to enable the "Back" button $timeout(function() { + var params = {}; + if (amount) { - $state.transitionTo('tabs.send.origin', { - amount: amount, - toAddress: addr, - description: message, - coin: coin - }); - } else { - var params = { - toAddress: addr, - coin: coin, - displayAddress: originalAddress ? originalAddress : addr, - noPrefix: noPrefixInAddress - }; - if (serviceId) { - if (!params['thirdParty']) { - params['thirdParty'] = []; - } - params['thirdParty']['id'] = serviceId; - } + params.amount = amount; + } - if (serviceData) { - params['thirdParty']['data'] = serviceData; - // params['thirdParty']['minShapeshiftAmount'] = serviceData.minAmount; - // params['thirdParty']['maxShapeshiftAmount'] = serviceData.maxAmount; - // params['thirdParty']['shapeshiftOrderId'] = serviceData.orderId; - params['thirdParty'] = JSON.stringify(params['thirdParty']); - $state.transitionTo('tabs.send.amount', params); - } else { - $state.transitionTo('tabs.send.origin', params); - } + if (addr) { + params.toAddress = addr; + params.displayAddress = originalAddress ? originalAddress : addr; + } + + if (coin) { + params.coin = coin; + } + + if (noPrefixInAddress) { + params.noPrefixInAddress = noPrefixInAddress; + } + + if (serviceId) { + params.thirdParty = []; + params.thirdParty.id = serviceId; + params.thirdParty.data = serviceData; + params.thirdParty = JSON.stringify(params.thirdParty); + $state.transitionTo('tabs.send.amount', params); + } else { + $state.transitionTo('tabs.send.origin', params); } }, 100); } @@ -130,7 +126,7 @@ angular.module('copayApp.services').factory('incomingData', function($log, $stat } popupService.showAlert(gettextCatalog.getString('Error'), message) } else { - handlePayPro(createBchPayProObject(details), coin); + handlePayPro(details, coin); } }); } else { @@ -399,14 +395,30 @@ angular.module('copayApp.services').factory('incomingData', function($log, $stat }, 100); } - function createBchPayProObject(payProData) { - var displayAddr = payProData.outputs[0].address; - var toAddr = bitcoinCashJsService.readAddress('bitcoincash:' + displayAddr).legacy; - return { - amount: payProData.outputs[0].amount, + function handlePayPro(payProData, coin) { + + var toAddr = payProData.toAddress; + var amount = payProData.amount; + var paymentUrl = payProData.url; + + if (coin === 'bch') { + var displayAddr = payProData.outputs[0].address; + toAddr = bitcoinCashJsService.readAddress('bitcoincash:' + displayAddr).legacy; + amount = payProData.outputs[0].amount; + paymentUrl = payProData.paymentUrl; + } + + var name = payProData.domain; + if (paymentUrl.indexOf('https://bitpay.com') > -1) { + name = 'bitpay'; + } + + var thirdPartyData = { + id: 'bip70', + amount: amount, caTrusted: true, - name: 'bitpay', - domain: 'bitpay.com', + name: name, + domain: payProData.domain, expires: Math.floor(new Date(payProData.expires).getTime() / 1000), memo: payProData.memo, network: 'livenet', @@ -415,40 +427,20 @@ angular.module('copayApp.services').factory('incomingData', function($log, $stat time: Math.ceil(new Date(payProData.time).getTime() / 1000), displayAddress: displayAddr, toAddress: toAddr, - url: payProData.paymentUrl, + url: paymentUrl, verified: true }; - } - - function handlePayPro(payProDetails, coin) { - var thirdPartyData = { - id: 'bip70', - name: payProDetails.name, - caName: payProDetails.caName, - caTrusted: payProDetails.caTrusted, - coin: coin, - domain: payProDetails.domain, - expires: payProDetails.expires, - memo: payProDetails.memo, - merchant_data: payProDetails.merchant_data, - network: payProDetails.network, - requiredFeeRate: payProDetails.requiredFeeRate, - selfSigned: payProDetails.selfSigned, - time: payProDetails.time, - url: payProDetails.url, - verified: payProDetails.verified - }; var stateParams = { - amount: payProDetails.amount, - toAddress: payProDetails.toAddress, + amount: thirdPartyData.amount, + toAddress: thirdPartyData.toAddress, coin: coin, thirdParty: JSON.stringify(thirdPartyData) }; // fee - if (payProDetails.requiredFeeRate) { - stateParams.requiredFeeRate = payProDetails.requiredFeeRate * 1024; + if (thirdPartyData.requiredFeeRate) { + stateParams.requiredFeeRate = thirdPartyData.requiredFeeRate * 1024; } scannerService.pausePreview(); From a9711c257537bbbf7278ca96905f13773898efca Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Dominguez Date: Tue, 7 Aug 2018 14:02:53 +0900 Subject: [PATCH 153/256] Fix incomingData, expires different depending on btc or bch (bitpay...) --- src/js/services/incomingData.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/js/services/incomingData.js b/src/js/services/incomingData.js index a41fcb5f4..e42661115 100644 --- a/src/js/services/incomingData.js +++ b/src/js/services/incomingData.js @@ -400,12 +400,14 @@ angular.module('copayApp.services').factory('incomingData', function($log, $stat var toAddr = payProData.toAddress; var amount = payProData.amount; var paymentUrl = payProData.url; + var expires = payProData.expires if (coin === 'bch') { var displayAddr = payProData.outputs[0].address; toAddr = bitcoinCashJsService.readAddress('bitcoincash:' + displayAddr).legacy; amount = payProData.outputs[0].amount; paymentUrl = payProData.paymentUrl; + expires = Math.floor(new Date(expires).getTime() / 1000) } var name = payProData.domain; @@ -419,7 +421,7 @@ angular.module('copayApp.services').factory('incomingData', function($log, $stat caTrusted: true, name: name, domain: payProData.domain, - expires: Math.floor(new Date(payProData.expires).getTime() / 1000), + expires: expires, memo: payProData.memo, network: 'livenet', requiredFeeRate: payProData.requiredFeeRate, From 886204d8b02ae067ea8c1e60a0e8e8a5a2c99de1 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Dominguez Date: Tue, 7 Aug 2018 14:34:02 +0900 Subject: [PATCH 154/256] incomingData time for bch --- src/js/services/incomingData.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/js/services/incomingData.js b/src/js/services/incomingData.js index e42661115..2b9f5db25 100644 --- a/src/js/services/incomingData.js +++ b/src/js/services/incomingData.js @@ -400,7 +400,8 @@ angular.module('copayApp.services').factory('incomingData', function($log, $stat var toAddr = payProData.toAddress; var amount = payProData.amount; var paymentUrl = payProData.url; - var expires = payProData.expires + var expires = payProData.expires; + var time = payProData.time; if (coin === 'bch') { var displayAddr = payProData.outputs[0].address; @@ -408,6 +409,7 @@ angular.module('copayApp.services').factory('incomingData', function($log, $stat amount = payProData.outputs[0].amount; paymentUrl = payProData.paymentUrl; expires = Math.floor(new Date(expires).getTime() / 1000) + time = Math.ceil(new Date(time).getTime() / 1000) } var name = payProData.domain; @@ -426,7 +428,7 @@ angular.module('copayApp.services').factory('incomingData', function($log, $stat network: 'livenet', requiredFeeRate: payProData.requiredFeeRate, selfSigned: 0, - time: Math.ceil(new Date(payProData.time).getTime() / 1000), + time: time, displayAddress: displayAddr, toAddress: toAddr, url: paymentUrl, From 59d1704673266051a3f0c3cdae61e8c0ac0c8fbb Mon Sep 17 00:00:00 2001 From: Brendon Duncan Date: Tue, 7 Aug 2018 17:34:28 +1200 Subject: [PATCH 155/256] Fix for display of fee when not for a BIP70 invoice. --- src/sass/components/fee-summary.scss | 1 + 1 file changed, 1 insertion(+) diff --git a/src/sass/components/fee-summary.scss b/src/sass/components/fee-summary.scss index 47fe2f6d1..e09af4be3 100644 --- a/src/sass/components/fee-summary.scss +++ b/src/sass/components/fee-summary.scss @@ -21,6 +21,7 @@ display: flex; flex-direction: row; justify-content: space-between; + width: 100%; .fee-fiat { &.positive { From 91487cf74c9f10d0a0796e9620d0f480c6bc7fd8 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Dominguez Date: Tue, 7 Aug 2018 15:02:29 +0900 Subject: [PATCH 156/256] shapeshift add the toAddress in the tx. Sending works. --- src/js/controllers/review.controller.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/js/controllers/review.controller.js b/src/js/controllers/review.controller.js index 6ae2a51c0..eb3fde53e 100644 --- a/src/js/controllers/review.controller.js +++ b/src/js/controllers/review.controller.js @@ -111,9 +111,7 @@ function reviewController(addressbookService, bitcoinCashJsService, bitcore, bit } vm.approve = function() { - - if (vm.thirdParty.id === 'shapeshift') - return; + if (!tx || !vm.originWallet) return; if (vm.paymentExpired) { @@ -491,7 +489,7 @@ function reviewController(addressbookService, bitcoinCashJsService, bitcore, bit $ionicLoading.hide(); shapeshiftService.shiftIt(vm.originWallet.coin, toWallet.coin, withdrawalAddr, returnAddr, function onShiftIt(shapeshiftData) { vm.memo = 'ShapeShift Order:\nhttps://www.shapeshift.io/#/status/' + shapeshiftData.orderId; - toAddress = shapeshiftData.toAddress; + tx.toAddress = shapeshiftData.toAddress; vm.destination.address = toAddress; vm.destination.kind = 'shapeshift'; }); From d26a96500b73c6ebf81cba9fd38e279adc795d34 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Dominguez Date: Tue, 7 Aug 2018 15:30:28 +0900 Subject: [PATCH 157/256] eGifter incomingData --- src/js/services/incomingData.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/js/services/incomingData.js b/src/js/services/incomingData.js index 1a2601fda..946144dce 100644 --- a/src/js/services/incomingData.js +++ b/src/js/services/incomingData.js @@ -397,6 +397,8 @@ angular.module('copayApp.services').factory('incomingData', function($log, $stat function handlePayPro(payProData, coin) { + console.log(payProData); + var toAddr = payProData.toAddress; var amount = payProData.amount; var paymentUrl = payProData.url; @@ -413,7 +415,10 @@ angular.module('copayApp.services').factory('incomingData', function($log, $stat } var name = payProData.domain; - if (paymentUrl.indexOf('https://bitpay.com') > -1) { + + if (payProData.memo.indexOf('eGifter') > -1) { + name = 'eGifter' + } else if (paymentUrl.indexOf('https://bitpay.com') > -1) { name = 'BitPay'; } From 1aa31b69352e49ba1207f9d68e346b1508028600 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Dominguez Date: Tue, 7 Aug 2018 16:36:33 +0900 Subject: [PATCH 158/256] egifter template, waiting the logo in svg. --- app-template/bitcoincom/css/bitcoin.com.css | 29 +++++++++++++-------- src/sass/views/review.scss | 2 +- www/css/bitcoin.com.css | 24 +++++++++++++---- www/css/main.css | 23 ++++++++++------ www/views/thirdparty/egifter-header.html | 3 +++ www/views/walletSelector.html | 3 ++- 6 files changed, 58 insertions(+), 26 deletions(-) create mode 100644 www/views/thirdparty/egifter-header.html diff --git a/app-template/bitcoincom/css/bitcoin.com.css b/app-template/bitcoincom/css/bitcoin.com.css index 19113dd2c..793276e25 100644 --- a/app-template/bitcoincom/css/bitcoin.com.css +++ b/app-template/bitcoincom/css/bitcoin.com.css @@ -264,15 +264,15 @@ div.onboarding-topic { height: 5em; } -.shapeshift-banner { - background: url(../img/shapeshiftbg.jpg) center center no-repeat #28394d; - padding: 10px; - box-shadow: 0px 5px 10px 0px #cccccc; - height: 5em; +.shapeshift-logo { + display: block; + float: left; + max-height: 100%; + max-width: 100%; } .bitpay-banner { - background: center center no-repeat #1A3A8B; + background: #1A3A8B; padding: 10px; box-shadow: 0px 5px 10px 0px #cccccc; height: 5em; @@ -285,9 +285,16 @@ div.onboarding-topic { height: 4em; } -.shapeshift-logo { - display: block; - float: left; - max-height: 100%; - max-width: 100%; +.egifter-banner { + background: #1A3A8B; + padding: 10px; + box-shadow: 0px 5px 10px 0px #cccccc; + height: 5em; +} + +.egifter-logo { + display: block; + max-height: 100%; + width: 100%; + height: 4em; } diff --git a/src/sass/views/review.scss b/src/sass/views/review.scss index 44b634697..79bca1896 100644 --- a/src/sass/views/review.scss +++ b/src/sass/views/review.scss @@ -11,7 +11,7 @@ bottom: 92px; } - .shapeshift-banner, .bitpay-banner { + .shapeshift-banner, .bitpay-banner, .egifter-banner { box-shadow: none; } diff --git a/www/css/bitcoin.com.css b/www/css/bitcoin.com.css index 59e503ac7..0cb170440 100644 --- a/www/css/bitcoin.com.css +++ b/www/css/bitcoin.com.css @@ -314,6 +314,13 @@ div.slide-success__background.fill-screen { height: 5em; } +.shapeshift-logo { + display: block; + float: left; + max-height: 100%; + max-width: 100%; +} + .bitpay-banner { background: #1A3A8B; padding: 10px; @@ -328,9 +335,16 @@ div.slide-success__background.fill-screen { height: 4em; } -.shapeshift-logo { - display: block; - float: left; - max-height: 100%; - max-width: 100%; +.egifter-banner { + background: #1A3A8B; + padding: 10px; + box-shadow: 0px 5px 10px 0px #cccccc; + height: 5em; +} + +.egifter-logo { + display: block; + max-height: 100%; + width: 100%; + height: 4em; } diff --git a/www/css/main.css b/www/css/main.css index 87333d1a6..350d5bbce 100644 --- a/www/css/main.css +++ b/www/css/main.css @@ -15262,8 +15262,10 @@ log-options #check-bar .checkbox-icon { #view-review .fee-summary { position: absolute; bottom: 92px; } - #view-review .shapeshift-banner, #view-review .bitpay-banner { + #view-review .shapeshift-banner, #view-review .bitpay-banner, #view-review .egifter-banner { box-shadow: none; } + #view-review .warning { + color: #b7664d; } .gravatar { border-radius: 3px; @@ -15410,7 +15412,7 @@ ion-content.padded-bottom-cta-with-summary { .fee-summary { position: relative; display: flex; - justify-content: space-between; + flex-direction: column; width: 100%; padding: 5px 12px 15px; box-sizing: border-box; @@ -15423,12 +15425,17 @@ ion-content.padded-bottom-cta-with-summary { width: 100%; height: 15px; background: linear-gradient(to bottom, rgba(242, 242, 242, 0) 0%, #f2f2f2 100%); } - .fee-summary .fee-fiat.positive { - color: #70955F; } - .fee-summary .fee-fiat.negative { - color: #C24633; } - .fee-summary .fee-crypto { - color: #A7A7A7; } + .fee-summary .amount { + display: flex; + flex-direction: row; + justify-content: space-between; + width: 100%; } + .fee-summary .amount .fee-fiat.positive { + color: #70955F; } + .fee-summary .amount .fee-fiat.negative { + color: #C24633; } + .fee-summary .amount .fee-crypto { + color: #A7A7A7; } .amount .start, .amount .middle, diff --git a/www/views/thirdparty/egifter-header.html b/www/views/thirdparty/egifter-header.html new file mode 100644 index 000000000..97d38603f --- /dev/null +++ b/www/views/thirdparty/egifter-header.html @@ -0,0 +1,3 @@ +
+ +
\ No newline at end of file diff --git a/www/views/walletSelector.html b/www/views/walletSelector.html index eeb7591a8..b375ddb8c 100644 --- a/www/views/walletSelector.html +++ b/www/views/walletSelector.html @@ -5,7 +5,8 @@
-
+
+
Paying
{{requestAmount}} {{requestCurrency}}
From 37614f08118cecc86dd5ff29c1b25b843da7d65a Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Dominguez Date: Tue, 7 Aug 2018 16:45:58 +0900 Subject: [PATCH 159/256] Change to svg for egifter --- www/views/thirdparty/egifter-header.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/www/views/thirdparty/egifter-header.html b/www/views/thirdparty/egifter-header.html index 97d38603f..a260e0726 100644 --- a/www/views/thirdparty/egifter-header.html +++ b/www/views/thirdparty/egifter-header.html @@ -1,3 +1,3 @@
- +
\ No newline at end of file From 83b1977a6f93922b9ee67730c1559fae6ed67b02 Mon Sep 17 00:00:00 2001 From: Sebastiaan Pasma Date: Tue, 7 Aug 2018 09:47:37 +0200 Subject: [PATCH 160/256] Shapeshift controller useless functions removed --- src/js/services/shapeshiftService.js | 21 ++++----------------- 1 file changed, 4 insertions(+), 17 deletions(-) diff --git a/src/js/services/shapeshiftService.js b/src/js/services/shapeshiftService.js index b3e307667..329cadbb3 100644 --- a/src/js/services/shapeshiftService.js +++ b/src/js/services/shapeshiftService.js @@ -8,21 +8,6 @@ angular.module('copayApp.services').factory('shapeshiftService', function ($http root.returnAddress = ''; root.amount = ''; root.marketData = {}; - root.withdrawalAddress = function (address) { - root.withdrawalAddress = address; - }; - root.returnAddress = function (address) { - root.returnAddress = address; - }; - root.amount = function (amount) { - root.amount = amount; - }; - root.coinIn = function (coinIn) { - root.coinIn = coinIn.toUpperCase(); - }; - root.coinOut = function (coinOut) { - root.coinOut = coinOut.toUpperCase(); - }; root.getMarketDataIn = function (coin) { if (coin === root.coinOut) return root.getMarketData(root.coinOut, root.coinIn); @@ -66,8 +51,10 @@ angular.module('copayApp.services').factory('shapeshiftService', function ($http root.shiftIt = function (coinIn, coinOut, withdrawalAddress, returnAddress, cb) { ongoingProcess.set('connectingShapeshift', true); - root.withdrawalAddress(withdrawalAddress); - root.returnAddress(returnAddress); + root.withdrawalAddress = withdrawalAddress; + root.returnAddress = returnAddress; + root.coinIn = coinIn; + root.coinOut = coinOut; var validate = shapeshiftApiService.ValidateAddress(withdrawalAddress, coinOut); validate.then(function (valid) { var tx = ShapeShift(); From 485039223fa72ce6bde1f70a18cbfe405c135588 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Dominguez Date: Tue, 7 Aug 2018 17:37:23 +0900 Subject: [PATCH 161/256] egifter template --- app-template/bitcoincom/css/bitcoin.com.css | 6 +++--- www/css/bitcoin.com.css | 8 ++++---- www/img/egifter_banner.png | Bin 0 -> 9837 bytes www/img/icon-egifter.png | Bin 0 -> 8025 bytes www/views/review.html | 6 ++++-- www/views/thirdparty/egifter-header.html | 2 +- 6 files changed, 12 insertions(+), 10 deletions(-) create mode 100644 www/img/egifter_banner.png create mode 100644 www/img/icon-egifter.png diff --git a/app-template/bitcoincom/css/bitcoin.com.css b/app-template/bitcoincom/css/bitcoin.com.css index 793276e25..cb20ff48d 100644 --- a/app-template/bitcoincom/css/bitcoin.com.css +++ b/app-template/bitcoincom/css/bitcoin.com.css @@ -289,12 +289,12 @@ div.onboarding-topic { background: #1A3A8B; padding: 10px; box-shadow: 0px 5px 10px 0px #cccccc; - height: 5em; + height: 5em; + text-align: center; } .egifter-logo { - display: block; max-height: 100%; - width: 100%; + max-width: 100%; height: 4em; } diff --git a/www/css/bitcoin.com.css b/www/css/bitcoin.com.css index 0cb170440..f0d7eab30 100644 --- a/www/css/bitcoin.com.css +++ b/www/css/bitcoin.com.css @@ -336,15 +336,15 @@ div.slide-success__background.fill-screen { } .egifter-banner { - background: #1A3A8B; + background: #066EAA; padding: 10px; box-shadow: 0px 5px 10px 0px #cccccc; - height: 5em; + height: 5em; + text-align: center; } .egifter-logo { - display: block; max-height: 100%; - width: 100%; + max-width: 100%; height: 4em; } diff --git a/www/img/egifter_banner.png b/www/img/egifter_banner.png new file mode 100644 index 0000000000000000000000000000000000000000..cb2e7c11e4a793788a9420258fae00c48b5c0f91 GIT binary patch literal 9837 zcmYLPcRbtQ*GJQowkl}VrWCb05PQ}tYE?z-po+vOirURrhpo$~+0s&C6MI(ey%N<5 zwFzRy9#5>_^ABF1d)#yG8TX#^J|{#^N1gg2^F=Z;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rUdZx}SSy^-|<^E^;|tCTbU zI+B!EWR}mVJ}?*{brjD2;RPME59ST*u|W-t_5L90o%Q6%C^TUSz_9cO22Fft^7T@Y z#v#0s-}KkGLfFpo(qu}R4#SOGsN1I|n#bs^`+h6!dW1nJ!7Q z0x@7{5p7JoAkLz*i}K*Kr7}ZDIST7#OfvOTIq55bB%?`vt@d-W+VK}u|ECH)Ef^jc z#(^J9|LlEshK`&0#q|Q!#scPfW}DP~`<9)V-6fEaNoUl5P@naDUT z*dHKjTKl|99?o<~FN~DC~<%o38)vjaYAn2PP_!ntKz85b9yxJQRh$UpP0IowAtBLP735Avyh+| zvzVX~=FCWXT+5YWR;Bpw95hP|G(PQs7VporqQ|?yZj&Z1VjSP?JmoJno=+?fUM`7O z%;kk38cszRi&P8-;&q_iPzUaGCHz-uPi=lXn`)cW35UCH>h!5Gj4Dtx=nJy2$42;A zxP>Dlqt-Vvi{Hm$2=R5%6<-OC(g;cZmlS;9qWUKKrTf(G~ z`P7i5=AeH5f1s1Agj9u!fsS0qdTcY#?RnX$OTVmxQ<#cFQD6TZ!L}#jOj7p1re>c} z|L?hJj& z|F<;{D7RiZMhtnThGk|_4VI??Mjm(INk_RGRwqu)P&+1%y19HZ071egqeYaT!cBOF_P?x}k iy|Wu~Olj$-NKz@BaWAaL>H} literal 0 HcmV?d00001 diff --git a/www/img/icon-egifter.png b/www/img/icon-egifter.png new file mode 100644 index 0000000000000000000000000000000000000000..42ebb25c5cf0aa23812f3380c950fdccb44f6326 GIT binary patch literal 8025 zcmV-fAEw}mP)lakCUw+F;fMP)}xmKw^EHC(nz;U~Lzz~d7`IHXzUo4lsDxD!MHdTK!cH|Uw7mx4&WV$4nQ#N@cRDqnhP@}*GNj1^5ml<)sb6wla$ z5Hxn>CR*q@N6jf-8xI>jy&}A%s_X}V?OHSF|E2;1eFFN&1y*iN_F573YR0fOUr<)| z_3vGA)N@E#W%>D_8A*?O3)3sY97s9-8f;!ey{+UwJ-n{e2YG{sIxqe~vzCp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2%DYM%vxa@0?+=T5KV@{R1>RB*X0>TMht)**pyobgZ8>cW_fe^+_(~5 zVCw|rsw0eRzxYqqTP5la_R0!b2g(J(QdPn2eW{Qw;5C)M bn$!LbT?UmdRe+dG00000NkvXXu0mjf^}=3S literal 0 HcmV?d00001 diff --git a/www/views/review.html b/www/views/review.html index 69c0c31f0..e9e5c6d7c 100644 --- a/www/views/review.html +++ b/www/views/review.html @@ -48,8 +48,10 @@

{{vm.destination.balanceAmount}} {{vm.destination.balanceCurrency}}

- + ng-if="vm.thirdParty && vm.thirdParty.id === 'bip70' + && (vm.thirdParty.name === 'BitPay' || vm.thirdParty.name === 'eGifter')"> + +

{{vm.destination.name}}

Payment expires: {{vm.remainingTimeStr}}

Payment request has expired

diff --git a/www/views/thirdparty/egifter-header.html b/www/views/thirdparty/egifter-header.html index a260e0726..97d38603f 100644 --- a/www/views/thirdparty/egifter-header.html +++ b/www/views/thirdparty/egifter-header.html @@ -1,3 +1,3 @@
- +
\ No newline at end of file From 9420b6372825ee6e01ae4af41c7dc3662cb23a23 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Dominguez Date: Tue, 7 Aug 2018 20:11:21 +0900 Subject: [PATCH 162/256] Fix shapeshift, remove the cancelTx. Remove the timer with the getStatus --- src/js/controllers/review.controller.js | 16 ++++++++++------ src/js/services/shapeshiftService.js | 24 +++++++++--------------- 2 files changed, 19 insertions(+), 21 deletions(-) diff --git a/src/js/controllers/review.controller.js b/src/js/controllers/review.controller.js index 919ac3542..62b5fa1b6 100644 --- a/src/js/controllers/review.controller.js +++ b/src/js/controllers/review.controller.js @@ -487,12 +487,16 @@ function reviewController(addressbookService, bitcoinCashJsService, bitcore, bit return; } - $ionicLoading.hide(); - shapeshiftService.shiftIt(vm.originWallet.coin, toWallet.coin, withdrawalAddr, returnAddr, function onShiftIt(shapeshiftData) { - vm.memo = 'ShapeShift Order:\nhttps://www.shapeshift.io/#/status/' + shapeshiftData.orderId; - tx.toAddress = shapeshiftData.toAddress; - vm.destination.address = toAddress; - vm.destination.kind = 'shapeshift'; + shapeshiftService.shiftIt(vm.originWallet.coin, toWallet.coin, withdrawalAddr, returnAddr, function onShiftIt(err, shapeshiftData) { + if (err && err != null) { + $ionicLoading.hide(); + popupService.showAlert(gettextCatalog.getString('Shapeshift Error'), err.toString()); + } else { + vm.memo = 'ShapeShift Order:\nhttps://www.shapeshift.io/#/status/' + shapeshiftData.orderId; + tx.toAddress = shapeshiftData.toAddress; + vm.destination.address = toAddress; + vm.destination.kind = 'shapeshift'; + } }); }); }); diff --git a/src/js/services/shapeshiftService.js b/src/js/services/shapeshiftService.js index 329cadbb3..4a77d8db0 100644 --- a/src/js/services/shapeshiftService.js +++ b/src/js/services/shapeshiftService.js @@ -45,7 +45,7 @@ angular.module('copayApp.services').factory('shapeshiftService', function ($http }; function checkForError(data) { - if (data.error) return true; + if (data.err) return true; return false; } @@ -55,8 +55,7 @@ angular.module('copayApp.services').factory('shapeshiftService', function ($http root.returnAddress = returnAddress; root.coinIn = coinIn; root.coinOut = coinOut; - var validate = shapeshiftApiService.ValidateAddress(withdrawalAddress, coinOut); - validate.then(function (valid) { + shapeshiftApiService.ValidateAddress(withdrawalAddress, coinOut).then(function (valid) { var tx = ShapeShift(); var coin; console.log("Starting"); @@ -64,7 +63,7 @@ angular.module('copayApp.services').factory('shapeshiftService', function ($http console.log("Got txData", txData); if (txData['fixedTxData']) { txData = txData.fixedTxData; - if (checkForError(txData)) return; + if (checkForError(txData)) return cb(txData.err); //console.log(txData) var coinPair = txData.pair.split('_'); txData.depositType = coinPair[0].toUpperCase(); @@ -76,20 +75,17 @@ angular.module('copayApp.services').factory('shapeshiftService', function ($http root.txFixedPending = true; } else if (txData['normalTxData']) { - txData = txData.normalTxData; - if (checkForError(txData)) return; + if (checkForError(txData)) return cb(txData.err); coin = root.coins[txData.depositType.toUpperCase()].name.toLowerCase(); txData.depositQR = coin + ":" + txData.deposit; - } else if (txData['cancelTxData']) { - - if (checkForError(txData.cancelTxData)) return; + txData = txData.cancelTxData; + if (checkForError(txData)) return cb(txData.err); if (root.txFixedPending) { root.txFixedPending = false; } root.ShiftState = 'Shift'; - return; } root.depositInfo = txData; //console.log(root.marketData); @@ -101,8 +97,8 @@ angular.module('copayApp.services').factory('shapeshiftService', function ($http ongoingProcess.set('connectingShapeshift', false); root.ShiftState = 'Cancel'; - root.GetStatus(); - root.txInterval=$interval(root.GetStatus, 8000); + //root.GetStatus(); + //root.txInterval=$interval(root.GetStatus, 8000); var shapeshiftData = { coinIn: coinIn, @@ -118,14 +114,12 @@ angular.module('copayApp.services').factory('shapeshiftService', function ($http ongoingProcess.set('connectingShapeshift', false); // return; // } - cb(shapeshiftData); - + cb(null, shapeshiftData); }); }) }; function ShapeShift() { - if (root.ShiftState === 'Cancel') return shapeshiftApiService.CancelTx(root); if (parseFloat(root.amount) > 0) return shapeshiftApiService.FixedAmountTx(root); return shapeshiftApiService.NormalTx(root); } From af90c53e502759a1432360338082f1d77fd0d432 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Dominguez Date: Tue, 7 Aug 2018 20:14:48 +0900 Subject: [PATCH 163/256] Add memo expended --- src/js/controllers/review.controller.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/js/controllers/review.controller.js b/src/js/controllers/review.controller.js index 62b5fa1b6..bb160b3d1 100644 --- a/src/js/controllers/review.controller.js +++ b/src/js/controllers/review.controller.js @@ -492,6 +492,7 @@ function reviewController(addressbookService, bitcoinCashJsService, bitcore, bit $ionicLoading.hide(); popupService.showAlert(gettextCatalog.getString('Shapeshift Error'), err.toString()); } else { + vm.memoExpanded = !!vm.memo; vm.memo = 'ShapeShift Order:\nhttps://www.shapeshift.io/#/status/' + shapeshiftData.orderId; tx.toAddress = shapeshiftData.toAddress; vm.destination.address = toAddress; From 07ac4e77387dedf63b871bc3b65eae82ad5ad441 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Dominguez Date: Tue, 7 Aug 2018 20:50:56 +0900 Subject: [PATCH 164/256] Show memo for shapeshift --- src/js/controllers/review.controller.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/js/controllers/review.controller.js b/src/js/controllers/review.controller.js index bb160b3d1..9004ce585 100644 --- a/src/js/controllers/review.controller.js +++ b/src/js/controllers/review.controller.js @@ -492,8 +492,8 @@ function reviewController(addressbookService, bitcoinCashJsService, bitcore, bit $ionicLoading.hide(); popupService.showAlert(gettextCatalog.getString('Shapeshift Error'), err.toString()); } else { - vm.memoExpanded = !!vm.memo; vm.memo = 'ShapeShift Order:\nhttps://www.shapeshift.io/#/status/' + shapeshiftData.orderId; + vm.memoExpanded = !!vm.memo; tx.toAddress = shapeshiftData.toAddress; vm.destination.address = toAddress; vm.destination.kind = 'shapeshift'; From 9f418583abd989dfbc98452cbdc46cfb036e1494 Mon Sep 17 00:00:00 2001 From: Sebastiaan Pasma Date: Tue, 7 Aug 2018 16:11:47 +0200 Subject: [PATCH 165/256] formatted amount controller update + css + renames + included in views --- src/js/directives/formattedAmount.js | 29 +++++++++++++------ src/sass/components/components.scss | 2 +- .../{amount.scss => formatted-amount.scss} | 4 ++- www/views/amount.html | 12 ++++---- www/views/includes/formatted-amount.html | 2 +- www/views/includes/walletHistory.html | 5 ++-- www/views/includes/walletList.html | 8 +++-- www/views/tx-details.html | 8 ++--- www/views/walletDetails.html | 27 ++++++++--------- 9 files changed, 58 insertions(+), 39 deletions(-) rename src/sass/components/{amount.scss => formatted-amount.scss} (89%) diff --git a/src/js/directives/formattedAmount.js b/src/js/directives/formattedAmount.js index ac74afd2b..3c787521a 100644 --- a/src/js/directives/formattedAmount.js +++ b/src/js/directives/formattedAmount.js @@ -15,16 +15,27 @@ angular.module('bitcoincom.directives') return { restrict: 'E', scope: { - value: '=', - currency: '=', - sizeEqual: '=' + value: '@', + currency: '@', + sizeEqual: '@' }, templateUrl: 'views/includes/formatted-amount.html', controller: function($scope, $timeout) { + if (!$scope.currency && $scope.value) { // If there is no currency available.. + // Try to extract currency from value.. + var currencySplit = $scope.value.split(" "); + if (currencySplit.length === 2) { + $scope.value = currencySplit[0]; + $scope.currency = currencySplit[1]; + } + } + $scope.displaySizeEqual = !!$scope.sizeEqual; configService.whenAvailable(function(config) { + console.log("WAIT!!"); $timeout(function() { + console.log("FIRED!!"); var decimalPlaces = { '0': ['BIF', 'CLP', 'DJF', 'GNF', 'ILS', 'JPY', 'KMF', 'KRW', 'MGA', 'PYG', 'RWF', 'UGX', 'VND', 'VUV', 'XAF', 'XOF', 'XPF'], '3': ['BHD', 'IQD', 'JOD', 'KWD', 'OMR', 'TND'], @@ -44,9 +55,9 @@ angular.module('bitcoincom.directives') }; var getDecimalPlaces = function(currency) { - if (decimalPlaces['0'].indexOf($scope.currency.toUpperCase()) > -1) return '0'; - if (decimalPlaces['3'].indexOf($scope.currency.toUpperCase()) > -1) return '3'; - if (decimalPlaces['8'].indexOf($scope.currency.toUpperCase()) > -1) return '8'; + if (decimalPlaces['0'].indexOf(currency.toUpperCase()) > -1) return '0'; + if (decimalPlaces['3'].indexOf(currency.toUpperCase()) > -1) return '3'; + if (decimalPlaces['8'].indexOf(currency.toUpperCase()) > -1) return '8'; return '2'; }; @@ -59,7 +70,7 @@ angular.module('bitcoincom.directives') case '3': var valueProcessing = parseFloat(parseFloat(value).toFixed(3)); - var valueFormatted = localizeNumbers(valueProcessing); + var valueFormatted = localizeNumbers(valueProcessing, 3); buildAmount(valueFormatted, '', ''); break; @@ -78,11 +89,11 @@ angular.module('bitcoincom.directives') default: var valueProcessing = parseFloat(parseFloat(value).toFixed(2)); - var valueFormatted = localizeNumbers(valueProcessing); + var valueFormatted = localizeNumbers(valueProcessing, 2); buildAmount(valueFormatted, '', ''); break; } - } + }; formatNumbers($scope.currency, $scope.value); $scope.$watchGroup(['currency', 'value'], function() { diff --git a/src/sass/components/components.scss b/src/sass/components/components.scss index 0af55e5be..fb53508b0 100644 --- a/src/sass/components/components.scss +++ b/src/sass/components/components.scss @@ -8,4 +8,4 @@ @import "action-minor"; @import "expand-content"; @import "fee-summary"; -@import "amount.scss"; +@import "formatted-amount"; diff --git a/src/sass/components/amount.scss b/src/sass/components/formatted-amount.scss similarity index 89% rename from src/sass/components/amount.scss rename to src/sass/components/formatted-amount.scss index 363d38a20..6678572c9 100644 --- a/src/sass/components/amount.scss +++ b/src/sass/components/formatted-amount.scss @@ -1,4 +1,6 @@ -.amount { +.formatted-amount { + display: inline-block; + .start, .middle, .end, diff --git a/www/views/amount.html b/www/views/amount.html index 48637ec1b..ee969762a 100644 --- a/www/views/amount.html +++ b/www/views/amount.html @@ -16,11 +16,13 @@
- {{vm.amount || '0'}} {{vm.unit}} + + +
- {{vm.globalResult}} {{vm.unit}} +
- {{vm.alternativeAmount || '0.00'}} {{vm.alternativeUnit}} +
@@ -43,7 +45,7 @@
- Available Funds:{{vm.availableFunds}} + Available Funds:
@@ -53,7 +55,7 @@
diff --git a/www/views/includes/formatted-amount.html b/www/views/includes/formatted-amount.html index 361dededc..20063458d 100644 --- a/www/views/includes/formatted-amount.html +++ b/www/views/includes/formatted-amount.html @@ -1,4 +1,4 @@ -
{{start}}{{middle}}{{end}}{{currency}}
\ No newline at end of file diff --git a/www/views/includes/walletHistory.html b/www/views/includes/walletHistory.html index 4a40e93d8..296b35b1a 100644 --- a/www/views/includes/walletHistory.html +++ b/www/views/includes/walletHistory.html @@ -64,17 +64,16 @@ - (possible double spend) - {{btx.amountValueStr}} {{btx.amountUnitStr}} +
- {{btx.alternativeAmountStr}} +
diff --git a/www/views/includes/walletList.html b/www/views/includes/walletList.html index f7a061740..d5fb65302 100644 --- a/www/views/includes/walletList.html +++ b/www/views/includes/walletList.html @@ -7,8 +7,12 @@ Incomplete - {{wallet.status.totalBalanceStr ? wallet.status.totalBalanceStr : ( wallet.cachedBalance ? wallet.cachedBalance + (wallet.cachedBalanceUpdatedOn ? ' · ' + ( wallet.cachedBalanceUpdatedOn * 1000 | amTimeAgo) : '') : '' ) }} - {{wallet.status.totalBalanceAlternative ? wallet.status.totalBalanceAlternative : ( wallet.cachedBalance ? wallet.cachedBalance + (wallet.cachedBalanceUpdatedOn ? ' · ' + ( wallet.cachedBalanceUpdatedOn * 1000 | amTimeAgo) : '') : '' ) }} {{wallet.status.alternativeIsoCode}} + + + + + + Scanning funds... [Balance Hidden] diff --git a/www/views/tx-details.html b/www/views/tx-details.html index e3a7a06b4..467ce28e3 100644 --- a/www/views/tx-details.html +++ b/www/views/tx-details.html @@ -24,13 +24,13 @@ Receiving
-
{{btx.amountValueStr}} {{btx.amountUnitStr}}
+
- {{btx.alternativeAmountStr}} + ... - {{rate| currency:'':2}} {{alternativeIsoCode}} ({{rateDate | amDateFormat:'MM/DD/YYYY HH:mm a'}}) + ({{rateDate | amDateFormat:'MM/DD/YYYY HH:mm a'}})
@@ -115,7 +115,7 @@ Fee {{btx.feeStr || '...'}} - {{btx.feeFiatStr || '...'}} - {{btx.feeRateStr}} of the transaction + ...- {{btx.feeRateStr}} of the transaction
diff --git a/www/views/walletDetails.html b/www/views/walletDetails.html index 0f9e4961c..12506e05d 100644 --- a/www/views/walletDetails.html +++ b/www/views/walletDetails.html @@ -34,12 +34,12 @@ on-hold="hideToggle()" ng-style="{'transform': amountScale}" ng-class="{amount__balance: amountIsCollapsible}"> - {{status.totalBalanceAlternative}} {{status.alternativeIsoCode}} +
- {{status.totalBalanceStr}} +
@@ -47,13 +47,14 @@ ng-show="selectedPriceDisplay=='crypto' && !updateStatusError && !wallet.balanceHidden && !wallet.scanning" on-hold="hideToggle()" ng-style="{'transform': amountScale}" + ng-if="status.totalBalanceStr" ng-class="{amount__balance: amountIsCollapsible}"> - {{status.totalBalanceStr}} +
- {{status.totalBalanceAlternative}} {{status.alternativeIsoCode}} +
@@ -86,7 +87,7 @@   - {{status.spendableBalanceAlternative}} {{status.alternativeIsoCode}} +
@@ -127,12 +128,12 @@ on-hold="hideToggle()" ng-style="{'transform': amountScale}" ng-class="{amount__balance: amountIsCollapsible}"> - {{status.totalBalanceStr}} +
- {{status.totalBalanceAlternative}} {{status.alternativeIsoCode}} +
@@ -142,12 +143,12 @@ on-hold="hideToggle()" ng-style="{'transform': amountScale}" ng-class="{amount__balance: amountIsCollapsible}"> - {{status.totalBalanceAlternative}} {{status.alternativeIsoCode}} +
- {{status.totalBalanceStr}} +
@@ -180,7 +181,7 @@   - {{status.spendableBalanceAlternative}} {{status.alternativeIsoCode}} +
@@ -189,7 +190,7 @@
@@ -95,8 +95,8 @@ {{wallet.name || wallet.id}}

- {{wallet.status.totalBalanceAlternative}} {{wallet.status.alternativeIsoCode}} - {{wallet.status.totalBalanceStr}} + + [Balance Hidden] From 29a5a37c0274e8d81f011f9060c0981a6e875d11 Mon Sep 17 00:00:00 2001 From: Brendon Duncan Date: Wed, 8 Aug 2018 12:24:13 +1200 Subject: [PATCH 167/256] Formatter displays blank amount when value is NaN. --- src/js/directives/formattedAmount.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/js/directives/formattedAmount.js b/src/js/directives/formattedAmount.js index 3c787521a..e223a8fd5 100644 --- a/src/js/directives/formattedAmount.js +++ b/src/js/directives/formattedAmount.js @@ -62,6 +62,11 @@ angular.module('bitcoincom.directives') }; var formatNumbers = function(currency, value) { + if (isNaN(parseFloat($scope.value))) { + buildAmount('', '', ''); + return; + } + switch (getDecimalPlaces(currency)) { case '0': var valueFormatted = localizeNumbers(Math.round(parseFloat(value))); From 12aa9a3b18f51937b890f6801376d1a7da1cf269 Mon Sep 17 00:00:00 2001 From: Brendon Duncan Date: Wed, 8 Aug 2018 13:28:44 +1200 Subject: [PATCH 168/256] formatted-amount displays "-.--" when it does not have a value. --- src/js/directives/formattedAmount.js | 56 +++++++++++++++++++--------- 1 file changed, 39 insertions(+), 17 deletions(-) diff --git a/src/js/directives/formattedAmount.js b/src/js/directives/formattedAmount.js index e223a8fd5..ccf6c1963 100644 --- a/src/js/directives/formattedAmount.js +++ b/src/js/directives/formattedAmount.js @@ -60,46 +60,68 @@ angular.module('bitcoincom.directives') if (decimalPlaces['8'].indexOf(currency.toUpperCase()) > -1) return '8'; return '2'; }; + + var getDecimalSeparator = function() { + var testNum = 1.5; + var testString = testNum.toLocaleString(uxLanguage.getCurrentLanguage()); + // Some environments let you set decimal separators that are more than one character + var separator = /^1(.+)5$/.exec(testString)[1] + return separator; + }; var formatNumbers = function(currency, value) { - if (isNaN(parseFloat($scope.value))) { - buildAmount('', '', ''); - return; - } + var parsed = parseFloat(value); + var valueFormatted = ''; + var valueProcessing = ''; switch (getDecimalPlaces(currency)) { case '0': - var valueFormatted = localizeNumbers(Math.round(parseFloat(value))); - buildAmount(valueFormatted, '', ''); + if (isNaN(parsed)) { + buildAmount('-', '', ''); + } else { + valueFormatted = localizeNumbers(Math.round(parsed)); + buildAmount(valueFormatted, '', ''); + } break; case '3': - var valueProcessing = parseFloat(parseFloat(value).toFixed(3)); - var valueFormatted = localizeNumbers(valueProcessing, 3); - buildAmount(valueFormatted, '', ''); + if (isNaN(parsed)) { + buildAmount('-' + getDecimalSeparator() + '---', '', ''); + } else { + valueProcessing = parsed.toFixed(3); + valueFormatted = localizeNumbers(valueProcessing, 3); + buildAmount(valueFormatted, '', ''); + } break; case '8': - var valueFormatted = parseFloat(value).toFixed(8); - if (parseFloat(value) == 0) { + if (isNaN(parsed)) { + buildAmount('-' + getDecimalSeparator() + '---', '', ''); + } else if (parsed === 0) { buildAmount('0', '', ''); } else { - var valueFormatted = localizeNumbers(valueFormatted, 8); + valueFormatted = parsed.toFixed(8); + valueFormatted = localizeNumbers(valueFormatted, 8); var start = valueFormatted.slice(0, -5); var middle = valueFormatted.slice(-5, -2); var end = valueFormatted.substr(valueFormatted.length - 2); buildAmount(start, middle, end); + } break; - default: - var valueProcessing = parseFloat(parseFloat(value).toFixed(2)); - var valueFormatted = localizeNumbers(valueProcessing, 2); - buildAmount(valueFormatted, '', ''); + default: // 2 + if (isNaN(parsed)) { + buildAmount('-' + getDecimalSeparator() + '--', '', ''); + } else { + valueProcessing = parseFloat(parsed.toFixed(2)); + valueFormatted = localizeNumbers(valueProcessing, 2); + buildAmount(valueFormatted, '', ''); + } break; } }; - + formatNumbers($scope.currency, $scope.value); $scope.$watchGroup(['currency', 'value'], function() { formatNumbers($scope.currency, $scope.value); From 820c1a393358900820dd7f21d4d355177687a900 Mon Sep 17 00:00:00 2001 From: Brendon Duncan Date: Wed, 8 Aug 2018 13:31:02 +1200 Subject: [PATCH 169/256] Wallet details does not display any balance text if it does not have balance yet. --- www/views/walletDetails.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/www/views/walletDetails.html b/www/views/walletDetails.html index 12506e05d..1ebc5929f 100644 --- a/www/views/walletDetails.html +++ b/www/views/walletDetails.html @@ -30,7 +30,7 @@

@@ -44,7 +44,7 @@
Date: Wed, 8 Aug 2018 13:38:43 +1200 Subject: [PATCH 170/256] More selective display of balances Wallet Details screen when fiat balance isn't available. --- www/views/walletDetails.html | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/www/views/walletDetails.html b/www/views/walletDetails.html index 1ebc5929f..74ac4da7b 100644 --- a/www/views/walletDetails.html +++ b/www/views/walletDetails.html @@ -30,11 +30,13 @@
- + + +
- + + +
Date: Wed, 8 Aug 2018 15:36:18 +1200 Subject: [PATCH 171/256] ShapeshiftService fix for app startup. --- src/js/services/shapeshiftService.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/js/services/shapeshiftService.js b/src/js/services/shapeshiftService.js index 5396f4fa5..1ce9672ce 100644 --- a/src/js/services/shapeshiftService.js +++ b/src/js/services/shapeshiftService.js @@ -136,4 +136,6 @@ angular.module('copayApp.services').factory('shapeshiftService', function ($http } }); }; + + return root; }); From 5d3e11b7bbb0a48f1ecd3eae76ecf1b7ffabd22c Mon Sep 17 00:00:00 2001 From: Brendon Duncan Date: Wed, 8 Aug 2018 16:10:58 +1200 Subject: [PATCH 172/256] Fixed alignment of buttons in Wallet Details on wide screens.. --- src/sass/views/walletDetails.scss | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/sass/views/walletDetails.scss b/src/sass/views/walletDetails.scss index 6b760bbc4..0843a1c07 100644 --- a/src/sass/views/walletDetails.scss +++ b/src/sass/views/walletDetails.scss @@ -193,7 +193,10 @@ } .send-receive-buttons { - max-width: 600px; + display: flex; + flex-direction: row; + justify-content: space-evenly; + width: 100%; position: absolute; bottom: 20px; @@ -207,6 +210,7 @@ padding: 0 15px 0 15px; text-align: center; width: 100%; + max-width: 300px; font-size: 19px; font-weight: bolder; min-height: auto; From 939263c3856a8fbeb8d2aa4183350ec4f70baa61 Mon Sep 17 00:00:00 2001 From: Brendon Duncan Date: Wed, 8 Aug 2018 16:30:57 +1200 Subject: [PATCH 173/256] Alignment and size of Receive and Send buttons on the Home tab matches the Wallet Details tab: equal spacing. --- src/sass/views/tab-home.scss | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/sass/views/tab-home.scss b/src/sass/views/tab-home.scss index 708ff4fad..55080ab7b 100644 --- a/src/sass/views/tab-home.scss +++ b/src/sass/views/tab-home.scss @@ -70,8 +70,12 @@ } } .buttons { + display: flex; + flex-direction: row; + justify-content: space-evenly; margin: 6px auto -12px; - max-width: 600px; + text-align: center; + width: 100%; >.col { padding: 5px 10px; margin-bottom: 0; @@ -82,6 +86,7 @@ padding: 0 15px 0 15px; text-align: center; width: 100%; + max-width: 300px; font-size: 19px; font-weight: bolder; min-height: auto; From fcb4d4b004e4ccede6874b9dd088f332ac4d1e69 Mon Sep 17 00:00:00 2001 From: Brendon Duncan Date: Wed, 8 Aug 2018 18:22:43 +1200 Subject: [PATCH 174/256] Text is now visible on Send and Receive buttons in Wallet Details screen when activated. --- src/sass/views/walletDetails.scss | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/sass/views/walletDetails.scss b/src/sass/views/walletDetails.scss index 0843a1c07..79326951e 100644 --- a/src/sass/views/walletDetails.scss +++ b/src/sass/views/walletDetails.scss @@ -261,6 +261,12 @@ .no-alternative { padding-top: 45px; } + + .button-white-outline.button-outline.activated { + color: $v-primary-color; + border-color: white; + } + .item.item-footer { font-weight: lighter; } From 6981a5af9fd44bc72f5ff7306b58aa5238cca14e Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Dominguez Date: Wed, 8 Aug 2018 15:52:20 +0900 Subject: [PATCH 175/256] show only when it is ready --- src/js/directives/formattedAmount.js | 3 +++ www/views/includes/formatted-amount.html | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/js/directives/formattedAmount.js b/src/js/directives/formattedAmount.js index ccf6c1963..b990596c4 100644 --- a/src/js/directives/formattedAmount.js +++ b/src/js/directives/formattedAmount.js @@ -21,6 +21,8 @@ angular.module('bitcoincom.directives') }, templateUrl: 'views/includes/formatted-amount.html', controller: function($scope, $timeout) { + $scope.canShow = false; + if (!$scope.currency && $scope.value) { // If there is no currency available.. // Try to extract currency from value.. var currencySplit = $scope.value.split(" "); @@ -120,6 +122,7 @@ angular.module('bitcoincom.directives') } break; } + $scope.canShow = true; }; formatNumbers($scope.currency, $scope.value); diff --git a/www/views/includes/formatted-amount.html b/www/views/includes/formatted-amount.html index 20063458d..24149849d 100644 --- a/www/views/includes/formatted-amount.html +++ b/www/views/includes/formatted-amount.html @@ -1,4 +1,4 @@
+ ng-class="{ 'size-equal': displaySizeEqual }" ng-show="canShow"> {{start}}{{middle}}{{end}}{{currency}}
\ No newline at end of file From 3d9b24575b44de7912fc9dd110f5d35a2024f057 Mon Sep 17 00:00:00 2001 From: Brendon Duncan Date: Wed, 8 Aug 2018 18:57:55 +1200 Subject: [PATCH 176/256] In Review Transaction screen, the note is now visible above the fees. --- src/sass/views/review.scss | 4 ++++ www/views/review.html | 1 + 2 files changed, 5 insertions(+) diff --git a/src/sass/views/review.scss b/src/sass/views/review.scss index 79bca1896..110090ebc 100644 --- a/src/sass/views/review.scss +++ b/src/sass/views/review.scss @@ -11,6 +11,10 @@ bottom: 92px; } + .fee-summary-spacer { + height: 15px; + } + .shapeshift-banner, .bitpay-banner, .egifter-banner { box-shadow: none; } diff --git a/www/views/review.html b/www/views/review.html index e9e5c6d7c..8444142d1 100644 --- a/www/views/review.html +++ b/www/views/review.html @@ -80,6 +80,7 @@
+
From ae6dcea81a378613a7fefc7439ccf8a2f71eadb1 Mon Sep 17 00:00:00 2001 From: Brendon Duncan Date: Wed, 8 Aug 2018 18:58:26 +1200 Subject: [PATCH 177/256] Fix for getting Shapeshift working. --- src/js/services/shapeshiftService.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/js/services/shapeshiftService.js b/src/js/services/shapeshiftService.js index 5396f4fa5..1ce9672ce 100644 --- a/src/js/services/shapeshiftService.js +++ b/src/js/services/shapeshiftService.js @@ -136,4 +136,6 @@ angular.module('copayApp.services').factory('shapeshiftService', function ($http } }); }; + + return root; }); From ab13478f799af7f763233bcd4ca3a8b28c7a3a6a Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Dominguez Date: Wed, 8 Aug 2018 16:03:34 +0900 Subject: [PATCH 178/256] Add shapeshift service item --- src/js/services/shapeshiftService.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/js/services/shapeshiftService.js b/src/js/services/shapeshiftService.js index 1ce9672ce..7cf6b4e03 100644 --- a/src/js/services/shapeshiftService.js +++ b/src/js/services/shapeshiftService.js @@ -137,5 +137,17 @@ angular.module('copayApp.services').factory('shapeshiftService', function ($http }); }; + var servicesItem = { + name: 'shapeshift', + title: 'Shapeshift', + icon: 'icon-shapeshift', + sref: 'tabs.shapeshift', + }; + + var register = function() { + servicesService.register(servicesItem); + }; + + register(); return root; }); From 644b3e6113b3d67bded857339cd4a0b8e2d61572 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Dominguez Date: Wed, 8 Aug 2018 16:24:47 +0900 Subject: [PATCH 179/256] height space in the bottom (wallet selection & review) --- src/sass/shame.scss | 4 + src/sass/views/review.scss | 4 - www/css/main.css | 174 ++++++++++++++++++++++++++++------ www/views/review.html | 2 +- www/views/walletSelector.html | 1 + 5 files changed, 153 insertions(+), 32 deletions(-) diff --git a/src/sass/shame.scss b/src/sass/shame.scss index 5a17c5f1f..dbbc222d7 100644 --- a/src/sass/shame.scss +++ b/src/sass/shame.scss @@ -468,3 +468,7 @@ input[type=file] { .white-space-initial { white-space: initial; } + +.height-spacer { + height: 15px; +} diff --git a/src/sass/views/review.scss b/src/sass/views/review.scss index 110090ebc..79bca1896 100644 --- a/src/sass/views/review.scss +++ b/src/sass/views/review.scss @@ -11,10 +11,6 @@ bottom: 92px; } - .fee-summary-spacer { - height: 15px; - } - .shapeshift-banner, .bitpay-banner, .egifter-banner { box-shadow: none; } diff --git a/www/css/main.css b/www/css/main.css index 350d5bbce..9845340ae 100644 --- a/www/css/main.css +++ b/www/css/main.css @@ -10253,6 +10253,46 @@ ion-view.deflash-blue:before, ion-view#view-amount:before, ion-view#view-confirm color: #fff; } .button-white.activated { color: #FFF; } + .button-white-outline { + border-color: #FFFFFF; + background-color: transparent; + color: #FFFFFF; + background: none; + box-shadow: none; } + .button-white-outline:hover { + color: #FFFFFF; + text-decoration: none; } + .button-white-outline.active, .button-white-outline.activated { + border-color: #FFF; + background-color: #FAFAFA; } + .button-white-outline.button-outline { + border-color: #FFFFFF; + background: transparent; + color: #FFFFFF; } + .button-white-outline.button-outline.active, .button-white-outline.button-outline.activated { + background-color: #FFFFFF; + box-shadow: none; + color: #fff; } + .button-grey-outline { + border-color: #727272; + background-color: transparent; + color: #727272; + background: none; + box-shadow: none; } + .button-grey-outline:hover { + color: #727272; + text-decoration: none; } + .button-grey-outline.active, .button-grey-outline.activated { + border-color: #727272; + background-color: #FAFAFA; } + .button-grey-outline.button-outline { + border-color: #727272; + background: transparent; + color: #727272; } + .button-grey-outline.button-outline.active, .button-grey-outline.button-outline.activated { + background-color: #727272; + box-shadow: none; + color: #fff; } .button-clear { background: none !important; } @@ -10271,8 +10311,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; } @@ -10886,6 +10926,28 @@ qrcode { width: 100%; display: block; } +#tab-home .buttons { + display: flex; + flex-direction: row; + justify-content: space-evenly; + margin: 6px auto -12px; + text-align: center; + width: 100%; } + #tab-home .buttons > .col { + padding: 5px 10px; + margin-bottom: 0; } + #tab-home .buttons .button { + border: 2px solid; + border-radius: 47px; + padding: 0 15px 0 15px; + text-align: center; + width: 100%; + max-width: 300px; + font-size: 19px; + font-weight: bolder; + min-height: auto; + line-height: 36px; } + #tab-home .wallet-coin-logo { vertical-align: middle; margin-right: 5px; } @@ -11871,10 +11933,11 @@ qrcode { height: 100%; height: calc(100% - env(safe-area-inset-bottom) * 2); } #walletDetails .bp-content.status-bar { - margin-top: 20px; } + margin-top: 20px; + margin-top: env(safe-area-inset-top); } #walletDetails .bar-header { border: 0; - background: none; } + background: #eeb640; } #walletDetails .bar-header .title, #walletDetails .bar-header .button { color: #fff; } #walletDetails .bar-header .button { @@ -11886,7 +11949,7 @@ qrcode { top: 0; margin-bottom: 16px; } #walletDetails ion-content.collapsible { - margin-top: 210px; } + margin-top: 230px; } #walletDetails ion-content .scroll { background: #f8f8f9; min-height: 300px; } @@ -11911,11 +11974,32 @@ qrcode { height: 200px; -webkit-transform: translateY(100px); transform: translateY(100px); } + #walletDetails .amount-wrapper .send-receive-buttons { + display: flex; + flex-direction: row; + justify-content: space-evenly; + width: 100%; + position: absolute; + bottom: 20px; } + #walletDetails .amount-wrapper .send-receive-buttons > .col { + padding: 5px 10px; + margin-bottom: 0; } + #walletDetails .amount-wrapper .send-receive-buttons .button { + border: 2px solid; + border-radius: 47px; + padding: 0 15px 0 15px; + text-align: center; + width: 100%; + max-width: 300px; + font-size: 19px; + font-weight: bolder; + min-height: auto; + line-height: 36px; } #walletDetails .amount { width: 100%; text-align: center; color: #fff; - height: 210px; + height: 230px; padding-top: 40px; display: block; align-items: center; @@ -13975,11 +14059,6 @@ slide-to-accept-success { display: flex; align-items: center; justify-content: center; } - slide-to-accept-success .slide-success__windows-background { - background: #11D1A6; - height: 100%; - width: 100%; - position: fixed; } slide-to-accept-success .slide-success__background { height: 10vmax; width: 10vmax; @@ -13996,8 +14075,10 @@ slide-to-accept-success { slide-to-accept-success .slide-success__content { position: relative; z-index: 1; - margin-top: -20vh; } + margin-top: -10vh; } slide-to-accept-success .slide-success__content > img { + width: 45vw; + max-width: 166px; margin-bottom: 1.8rem; -webkit-transform: translateY(5rem); transform: translateY(5rem); @@ -14010,7 +14091,7 @@ slide-to-accept-success { opacity: 1; } slide-to-accept-success .slide-success__content__header { color: #FFFFFF; - font-size: 26px; + font-size: 29px; -webkit-transform: translateY(5rem); transform: translateY(5rem); opacity: 0; @@ -14020,6 +14101,22 @@ slide-to-accept-success { -webkit-transform: translateY(0); transform: translateY(0); opacity: 1; } + slide-to-accept-success .slide-success__content__share { + transition: transform 400ms ease, opacity 400ms ease; + transition-delay: 600ms; + opacity: 0; + margin-top: 15vh; } + slide-to-accept-success .slide-success__content__share span { + color: #FFF; + font-size: 22px; + height: 28px; } + slide-to-accept-success .slide-success__content__share img { + height: 28px; + width: auto; + vertical-align: bottom; + margin-right: 4px; } + slide-to-accept-success .slide-success__content__share.reveal { + opacity: 0.79; } slide-to-accept-success .slide-success__footer { position: absolute; left: 0; @@ -14042,11 +14139,11 @@ slide-to-accept-success { slide-to-accept-success .slide-success__footer__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, 0.45); + padding: 2rem 0 2.1rem; + border-top: 1px solid rgba(255, 255, 255, 0.25); cursor: pointer; } #tx-details .action-created.action-accepted { @@ -14988,17 +15085,10 @@ account-selector { height: 100%; } #custom-amount .address .qr-code { text-align: center; - margin-top: 24vh; - margin-bottom: 7vh; } - @media (max-height: 800px) { - #custom-amount .address .qr-code { - margin-top: 18vh; } } - @media (max-height: 700px) { - #custom-amount .address .qr-code { - margin-top: 14vh; } } - @media (max-height: 600px) { - #custom-amount .address .qr-code { - margin-top: 8vh; } } + margin-top: 6px; } + #custom-amount .address .qr-code qrcode canvas { + height: 30vh; + max-height: 220px; } #custom-amount .address .info { position: absolute; width: 100%; @@ -15038,6 +15128,28 @@ account-selector { margin-left: 10px; } #custom-amount .address .address-types { text-align: center; } + #custom-amount .address .amount { + margin-top: 20vh; + margin-bottom: 4vh; + width: 100%; + text-align: center; + display: block; + align-items: center; + justify-content: center; } + @media (max-height: 800px) { + #custom-amount .address .amount { + margin-top: 12vh; + margin-bottom: 6vh; } } + @media (max-height: 700px) { + #custom-amount .address .amount { + margin-top: 10vh; + margin-bottom: 4vh; } } + @media (max-height: 600px) { + #custom-amount .address .amount { + margin-top: 6vh; + margin-bottom: 2vh; } } + #custom-amount .address .amount-alternative { + line-height: 36px; } #pin { background-color: #FAFAFA; @@ -15262,6 +15374,8 @@ log-options #check-bar .checkbox-icon { #view-review .fee-summary { position: absolute; bottom: 92px; } + #view-review .fee-summary-spacer { + height: 15px; } #view-review .shapeshift-banner, #view-review .bitpay-banner, #view-review .egifter-banner { box-shadow: none; } #view-review .warning { @@ -15644,6 +15758,9 @@ input[type=number]::-webkit-inner-spin-button, input[type=number]::-webkit-outer .size-24 { font-size: 24px; } +.size-25 { + font-size: 25px; } + .size-28 { font-size: 28px; } @@ -15818,3 +15935,6 @@ input[type=file] { .white-space-initial { white-space: initial; } + +.height-spacer { + height: 15px; } diff --git a/www/views/review.html b/www/views/review.html index 8444142d1..2349c315d 100644 --- a/www/views/review.html +++ b/www/views/review.html @@ -80,7 +80,7 @@
-
+
diff --git a/www/views/walletSelector.html b/www/views/walletSelector.html index b375ddb8c..2da97eadb 100644 --- a/www/views/walletSelector.html +++ b/www/views/walletSelector.html @@ -55,5 +55,6 @@
+
\ No newline at end of file From 60028c44bba14440c26c55a6f552ac71a1d88020 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Dominguez Date: Wed, 8 Aug 2018 16:59:00 +0900 Subject: [PATCH 180/256] remove the header for shapeshift in the amount view --- www/views/amount.html | 1 - 1 file changed, 1 deletion(-) diff --git a/www/views/amount.html b/www/views/amount.html index 48637ec1b..270dbb3fb 100644 --- a/www/views/amount.html +++ b/www/views/amount.html @@ -6,7 +6,6 @@ -
From 753d2aea69a2e1daed1e244a0abea2062778eb96 Mon Sep 17 00:00:00 2001 From: Sebastiaan Pasma Date: Wed, 8 Aug 2018 15:31:36 +0200 Subject: [PATCH 184/256] remove bottom menu on wallet selector + remove swipe back feature on review screen --- www/views/review.html | 2 +- www/views/walletSelector.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/www/views/review.html b/www/views/review.html index 2349c315d..cb7f21fbc 100644 --- a/www/views/review.html +++ b/www/views/review.html @@ -1,4 +1,4 @@ - + {{'Review Transaction' | translate}} diff --git a/www/views/walletSelector.html b/www/views/walletSelector.html index 2da97eadb..2e4c4bc31 100644 --- a/www/views/walletSelector.html +++ b/www/views/walletSelector.html @@ -1,4 +1,4 @@ - + {{sendFlowTitle}} From 51921a1a1d4207013a9fa89bdc5340ab6e3bead4 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Dominguez Date: Wed, 8 Aug 2018 22:32:18 +0900 Subject: [PATCH 185/256] Fix shapeshift flow go back available --- src/js/controllers/shapeshift.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/js/controllers/shapeshift.js b/src/js/controllers/shapeshift.js index ade7afb5b..4bf3db764 100644 --- a/src/js/controllers/shapeshift.js +++ b/src/js/controllers/shapeshift.js @@ -1,6 +1,6 @@ 'use strict'; -angular.module('copayApp.controllers').controller('shapeshiftController', function($scope, $state, $interval, profileService, walletService, popupService, lodash, $ionicNavBarDelegate) { +angular.module('copayApp.controllers').controller('shapeshiftController', function($scope, $state, $timeout, $ionicHistory, profileService, walletService, popupService, lodash, $ionicNavBarDelegate) { var walletsBtc = []; var walletsBch = []; @@ -66,8 +66,14 @@ angular.module('copayApp.controllers').controller('shapeshiftController', functi var params = { thirdParty: JSON.stringify({id: 'shapeshift'}) }; + $state.go('tabs.home').then(function() { - $state.transitionTo('tabs.send.origin', params); + $ionicHistory.clearHistory(); + $state.go('tabs.send').then(function() { + $timeout(function () { + $state.transitionTo('tabs.send.origin', params); + }, 60); + }); }); } }); From 8229d51fdd4590ce932ae57d7bfbd23e57602a11 Mon Sep 17 00:00:00 2001 From: Sebastiaan Pasma Date: Wed, 8 Aug 2018 16:35:49 +0200 Subject: [PATCH 186/256] sendflow service --- src/js/services/sendFlowService.js | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 src/js/services/sendFlowService.js diff --git a/src/js/services/sendFlowService.js b/src/js/services/sendFlowService.js new file mode 100644 index 000000000..d5c4df109 --- /dev/null +++ b/src/js/services/sendFlowService.js @@ -0,0 +1,24 @@ +'use strict'; + +angular.module('copayApp.services').factory('sendFlowService', function ($log) { + var vm = this; + + vm.amount = false; + vm.fromWalletId = false; + vm.thirdParty = false; + vm.sendMax = false; + vm.toAddress = false; + vm.toWalletId = false; + + vm.initialize = function() { + $log.debug("Reinitialize Send Flow variables"); + vm.amount = false; + vm.fromWalletId = false; + vm.thirdParty = false; + vm.sendMax = false; + vm.toAddress = false; + vm.toWalletId = false; + }; + + return vm; +}); \ No newline at end of file From f7ecdb2f2fee02c47b38c4c54fbadee711a9b9fa Mon Sep 17 00:00:00 2001 From: Sebastiaan Pasma Date: Wed, 8 Aug 2018 17:10:47 +0200 Subject: [PATCH 187/256] sendflow service integrated into flow --- src/js/controllers/amount.js | 69 ++++++++++--------- src/js/controllers/review.controller.js | 30 ++++---- src/js/controllers/tab-send.js | 2 +- src/js/controllers/walletDetails.js | 7 +- .../controllers/walletSelectorController.js | 12 ++-- src/js/services/incomingData.js | 6 +- src/js/services/sendFlowService.js | 7 ++ 7 files changed, 73 insertions(+), 60 deletions(-) diff --git a/src/js/controllers/amount.js b/src/js/controllers/amount.js index 8438260bc..68d4e869b 100644 --- a/src/js/controllers/amount.js +++ b/src/js/controllers/amount.js @@ -2,7 +2,7 @@ angular.module('copayApp.controllers').controller('amountController', amountController); -function amountController(configService, $filter, gettextCatalog, $ionicHistory, $ionicModal, $ionicScrollDelegate, lodash, $log, nodeWebkitService, rateService, $scope, $state, $timeout, shapeshiftService, txFormatService, platformInfo, profileService, walletService, $window) { +function amountController(configService, $filter, gettextCatalog, $ionicHistory, $ionicModal, $ionicScrollDelegate, lodash, $log, nodeWebkitService, rateService, $scope, $state, $timeout, sendFlowService, shapeshiftService, txFormatService, platformInfo, profileService, walletService, $window) { var vm = this; vm.allowSend = false; @@ -69,12 +69,12 @@ function amountController(configService, $filter, gettextCatalog, $ionicHistory, initCurrencies(); - passthroughParams = data.stateParams; + passthroughParams = sendFlowService; - vm.fromWalletId = data.stateParams.fromWalletId; - vm.toWalletId = data.stateParams.toWalletId; - vm.minAmount = parseFloat(data.stateParams.minAmount); - vm.maxAmount = parseFloat(data.stateParams.maxAmount); + vm.fromWalletId = passthroughParams.fromWalletId; + vm.toWalletId = passthroughParams.toWalletId; + vm.minAmount = parseFloat(passthroughParams.minAmount); + vm.maxAmount = parseFloat(passthroughParams.maxAmount); if (passthroughParams.thirdParty) { vm.thirdParty = JSON.parse(passthroughParams.thirdParty); // Parse stringified JSON-object @@ -96,7 +96,7 @@ function amountController(configService, $filter, gettextCatalog, $ionicHistory, } } - vm.isRequestingSpecificAmount = !data.stateParams.fromWalletId; + vm.isRequestingSpecificAmount = !passthroughParams.fromWalletId; var config = configService.getSync().wallet.settings; @@ -177,8 +177,8 @@ function amountController(configService, $filter, gettextCatalog, $ionicHistory, // currency have preference var fiatName; - if (data.stateParams.currency) { - fiatCode = data.stateParams.currency; + if (passthroughParams.currency) { + fiatCode = passthroughParams.currency; altUnitIndex = unitIndex unitIndex = availableUnits.length; } else { @@ -205,8 +205,8 @@ function amountController(configService, $filter, gettextCatalog, $ionicHistory, var fromWallet = profileService.getWallet(passthroughParams.fromWalletId); updateAvailableFundsFromWallet(fromWallet); } - }; - }; + } + } function goBack() { if (vm.thirdParty && vm.thirdParty.id === 'shapeshift') { @@ -227,18 +227,18 @@ function amountController(configService, $filter, gettextCatalog, $ionicHistory, $timeout(function() { $scope.$apply(); }); - }; + } function processClipboard() { if (!isNW) return; var value = nodeWebkitService.readFromClipboard(); if (value && evaluate(value) > 0) paste(evaluate(value)); - }; + } function sendMax() { useSendMax = true; finish(); - }; + } function updateUnitUI() { vm.unit = availableUnits[unitIndex].shortName; @@ -246,7 +246,7 @@ function amountController(configService, $filter, gettextCatalog, $ionicHistory, processAmount(); $log.debug('Update unit coin @amount unit:' + vm.unit + " alternativeUnit:" + vm.alternativeUnit); - }; + } function changeUnit() { @@ -267,7 +267,7 @@ function amountController(configService, $filter, gettextCatalog, $ionicHistory, updateAvailableFundsStringIfNeeded(); updateUnitUI(); - }; + } function pushDigit(digit) { if (vm.amount && digit != '.') { @@ -291,7 +291,7 @@ function amountController(configService, $filter, gettextCatalog, $ionicHistory, vm.amount = (vm.amount + digit).replace('..', '.'); processAmount(); - }; + } function pushOperator(operator) { if (!vm.amount || vm.amount.length == 0) return; @@ -303,18 +303,18 @@ function amountController(configService, $filter, gettextCatalog, $ionicHistory, } else { return val.slice(0, -1) + operator; } - }; - }; + } + } function isOperator(val) { var regex = /[\/\-\+\x\*]/; return regex.test(val); - }; + } function isExpression(val) { var regex = /^\.?\d+(\.?\d+)?([\/\-\+\*x]\d?\.?\d+)+$/; return regex.test(val); - }; + } function removeDigit() { vm.amount = (vm.amount).toString().slice(0, -1); @@ -339,7 +339,7 @@ function amountController(configService, $filter, gettextCatalog, $ionicHistory, function close() { altCurrencyModal.remove(); altCurrencyModal = null; - }; + } function processAmount() { var formatedValue = format(vm.amount); @@ -409,22 +409,22 @@ function amountController(configService, $filter, gettextCatalog, $ionicHistory, } else { vm.errorMessage = ''; } - }; + } function processResult(val) { if (availableUnits[unitIndex].isFiat) return $filter('formatFiatAmount')(val); else return txFormatService.formatAmount(val.toFixed(unitDecimals) * unitToSatoshi, true); - }; + } function fromFiat(val) { return parseFloat((rateService.fromFiat(val, fiatCode, availableUnits[altUnitIndex].id) * satToUnit).toFixed(unitDecimals)); - }; + } function toFiat(val) { if (!rateService.getRate(fiatCode)) return; return parseFloat((rateService.toFiat(val * unitToSatoshi, fiatCode, availableUnits[unitIndex].id)).toFixed(2)); - }; + } function evaluate(val) { var result; @@ -435,7 +435,7 @@ function amountController(configService, $filter, gettextCatalog, $ionicHistory, } if (!lodash.isFinite(result)) return 0; return result; - }; + } function format(val) { if (!val) return; @@ -445,7 +445,7 @@ function amountController(configService, $filter, gettextCatalog, $ionicHistory, if (isOperator(lodash.last(val))) result = result.slice(0, -1); return result.replace('x', '*'); - }; + } function finish() { var unit = availableUnits[unitIndex]; @@ -467,16 +467,18 @@ function amountController(configService, $filter, gettextCatalog, $ionicHistory, }; if (vm.thirdParty) { - confirmData['thirdParty'] = JSON.stringify(this.thirdParty); + confirmData['thirdParty'] = this.thirdParty; } + sendFlowService.map(confirmData); + if (!confirmData.fromWalletId) { $state.transitionTo('tabs.paymentRequest.confirm', confirmData); } else { $state.transitionTo('tabs.send.review', confirmData); $scope.useSendMax = null; } - }; + } // Currency @@ -495,7 +497,7 @@ function amountController(configService, $filter, gettextCatalog, $ionicHistory, {isoCode: 'CNY', order: 7}, {isoCode: 'KRW', order: 8}, {isoCode: 'HKD', order: 9}, - ] + ]; function initCurrencies() { var unusedCurrencyList = [{ @@ -558,7 +560,7 @@ function amountController(configService, $filter, gettextCatalog, $ionicHistory, $timeout(function() { $scope.$apply(); }); - }; + } function save(newAltCurrency) { var opts = { @@ -584,7 +586,7 @@ function amountController(configService, $filter, gettextCatalog, $ionicHistory, updateUnitUI(); close(); }); - }; + } function updateAvailableFundsStringIfNeeded() { if (passthroughParams.fromWalletId && availableSatoshis !== null) { @@ -639,5 +641,4 @@ function amountController(configService, $filter, gettextCatalog, $ionicHistory, vm.availableFunds = availableFundsInCrypto; } } - } diff --git a/src/js/controllers/review.controller.js b/src/js/controllers/review.controller.js index f565448ee..858e115c1 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, shapeshiftService, soundService, $state, $timeout, txConfirmNotification, txFormatService, walletService) { +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) { var vm = this; vm.buttonText = ''; @@ -51,7 +51,7 @@ function reviewController(addressbookService, bitcoinCashJsService, bitcore, bit // Functions vm.onSuccessConfirm = onSuccessConfirm; - + var sendFlowData; var config = null; var countDown = null; var defaults = {}; @@ -75,17 +75,18 @@ function reviewController(addressbookService, bitcoinCashJsService, bitcore, bit function onBeforeEnter(event, data) { defaults = configService.getDefaults(); - originWalletId = data.stateParams.fromWalletId; - satoshis = parseInt(data.stateParams.amount, 10); - toAddress = data.stateParams.toAddress; - destinationWalletId = data.stateParams.toWalletId; + sendFlowData = sendFlowService; + originWalletId = sendFlowData.fromWalletId; + satoshis = parseInt(sendFlowData.amount, 10); + toAddress = sendFlowData.toAddress; + destinationWalletId = sendFlowData.toWalletId; vm.originWallet = profileService.getWallet(originWalletId); vm.origin.currency = vm.originWallet.coin.toUpperCase(); coin = vm.originWallet.coin; - if (data.stateParams.thirdParty) { - vm.thirdParty = JSON.parse(data.stateParams.thirdParty); // Parse stringified JSON-object + if (sendFlowData.thirdParty) { + // vm.thirdParty = JSON.parse(sendFlowData.thirdParty); // Parse stringified JSON-object if (vm.thirdParty) { handleThirdPartyInitIfBip70(); handleThirdPartyInitIfShapeshift(); @@ -105,7 +106,7 @@ function reviewController(addressbookService, bitcoinCashJsService, bitcore, bit updateSendAmounts(); getOriginWalletBalance(vm.originWallet); handleDestinationAsAddress(toAddress, coin); - handleDestinationAsWallet(data.stateParams.toWalletId); + handleDestinationAsWallet(sendFlowData.toWalletId); createVanityTransaction(data); }); } @@ -221,10 +222,10 @@ function reviewController(addressbookService, bitcoinCashJsService, bitcore, bit // Grab stateParams tx = { - amount: parseInt(data.stateParams.amount), - sendMax: data.stateParams.sendMax === 'true' ? true : false, - fromWalletId: data.stateParams.fromWalletId, - toAddress: data.stateParams.toAddress, + amount: parseInt(sendFlowData.amount), + sendMax: sendFlowData.sendMax === 'true' ? true : false, + fromWalletId: sendFlowData.fromWalletId, + toAddress: sendFlowData.toAddress, paypro: txPayproData, feeLevel: configFeeLevel, @@ -241,7 +242,6 @@ function reviewController(addressbookService, bitcoinCashJsService, bitcore, bit }; - if (data.stateParams.requiredFeeRate) { vm.usingMerchantFee = true; tx.feeRate = parseInt(data.stateParams.requiredFeeRate); @@ -251,7 +251,7 @@ function reviewController(addressbookService, bitcoinCashJsService, bitcore, bit tx.feeLevel = 'normal'; } - var B = data.stateParams.coin === 'bch' ? bitcoreCash : bitcore; + var B = tx.coin === 'bch' ? bitcoreCash : bitcore; var networkName; try { if (vm.destination.kind === 'wallet') { // This is a wallet-to-wallet transfer diff --git a/src/js/controllers/tab-send.js b/src/js/controllers/tab-send.js index 465941c35..0c0c1bfe1 100644 --- a/src/js/controllers/tab-send.js +++ b/src/js/controllers/tab-send.js @@ -1,6 +1,6 @@ 'use strict'; -angular.module('copayApp.controllers').controller('tabSendController', function($scope, $rootScope, $log, $timeout, $ionicScrollDelegate, $ionicLoading, addressbookService, profileService, lodash, $state, walletService, incomingData, popupService, platformInfo, bwcError, gettextCatalog, scannerService, configService, bitcoinCashJsService, $ionicPopup, $ionicNavBarDelegate, clipboardService) { +angular.module('copayApp.controllers').controller('tabSendController', function($scope, $rootScope, $log, $timeout, $ionicScrollDelegate, $ionicLoading, addressbookService, profileService, lodash, $state, walletService, incomingData, popupService, platformInfo, sendFlowService, bwcError, gettextCatalog, scannerService, configService, bitcoinCashJsService, $ionicPopup, $ionicNavBarDelegate, clipboardService) { var clipboardHasAddress = false; var clipboardHasContent = false; var originalList; diff --git a/src/js/controllers/walletDetails.js b/src/js/controllers/walletDetails.js index d3308ff1e..9eef7a5c9 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, platformInfo, walletService, txpModalService, externalLinkService, popupService, addressbookService, sendFlowService, storageService, $ionicScrollDelegate, $window, bwcError, gettextCatalog, timeService, feeService, appConfigService, rateService) { var HISTORY_SHOW_LIMIT = 10; var currentTxHistoryPage = 0; @@ -471,9 +471,8 @@ angular.module('copayApp.controllers').controller('walletDetailsController', fun return "#" + componentToHex(r) + componentToHex(g) + componentToHex(b); } $scope.goToSend = function() { - $state.go('tabs.home', { - walletId: $scope.wallet.id - }).then(function () { + sendFlowService.fromWalletId = $scope.wallet.id; + $state.go('tabs.home').then(function () { $ionicHistory.clearHistory(); $state.go('tabs.send'); }); diff --git a/src/js/controllers/walletSelectorController.js b/src/js/controllers/walletSelectorController.js index a4ff3ab3e..a26e07d8f 100644 --- a/src/js/controllers/walletSelectorController.js +++ b/src/js/controllers/walletSelectorController.js @@ -1,6 +1,6 @@ 'use strict'; -angular.module('copayApp.controllers').controller('walletSelectorController', function($scope, $rootScope, $state, $log, $ionicHistory, configService, gettextCatalog, profileService, txFormatService) { +angular.module('copayApp.controllers').controller('walletSelectorController', function($scope, $rootScope, $state, $log, $ionicHistory, sendFlowService, configService, gettextCatalog, profileService, txFormatService) { var fromWalletId = ''; var priceDisplayAsFiat = false; @@ -26,10 +26,14 @@ angular.module('copayApp.controllers').controller('walletSelectorController', fu // nop } - $scope.params = $state.params; + $scope.params = sendFlowService; $scope.coin = false; // Wallets to show (for destination screen or contacts) - $scope.type = data.stateParams && data.stateParams['fromWalletId'] ? 'destination' : 'origin'; // origin || destination - fromWalletId = data.stateParams && data.stateParams.fromWalletId; + $scope.type = $scope.params['fromWalletId'] ? 'destination' : 'origin'; // origin || destination + fromWalletId = $scope.params['fromWalletId']; + + if ($scope.type === 'destination' && $scope.params.toAddress) { + $state.transitionTo(getNextStep()); + } if ($scope.params.coin) { $scope.coin = $scope.params.coin; // Contacts have a coin embedded diff --git a/src/js/services/incomingData.js b/src/js/services/incomingData.js index 946144dce..91de99cf3 100644 --- a/src/js/services/incomingData.js +++ b/src/js/services/incomingData.js @@ -1,6 +1,6 @@ 'use strict'; -angular.module('copayApp.services').factory('incomingData', function($log, $state, $timeout, $ionicHistory, bitcore, bitcoreCash, $rootScope, payproService, scannerService, appConfigService, popupService, gettextCatalog, bitcoinCashJsService) { +angular.module('copayApp.services').factory('incomingData', function($log, $state, $timeout, $ionicHistory, bitcore, bitcoreCash, $rootScope, payproService, scannerService, sendFlowService, appConfigService, popupService, gettextCatalog, bitcoinCashJsService) { var root = {}; @@ -105,9 +105,10 @@ angular.module('copayApp.services').factory('incomingData', function($log, $stat params.thirdParty = []; params.thirdParty.id = serviceId; params.thirdParty.data = serviceData; - params.thirdParty = JSON.stringify(params.thirdParty); + sendFlowService.map(params); $state.transitionTo('tabs.send.amount', params); } else { + sendFlowService.map(params); $state.transitionTo('tabs.send.origin', params); } }, 100); @@ -458,6 +459,7 @@ angular.module('copayApp.services').factory('incomingData', function($log, $stat 'notify': $state.current.name == 'tabs.send' ? false : true }).then(function() { $timeout(function() { + sendFlowService.map(stateParams); $state.transitionTo('tabs.send.origin', stateParams); }); }); diff --git a/src/js/services/sendFlowService.js b/src/js/services/sendFlowService.js index d5c4df109..09e55e7ec 100644 --- a/src/js/services/sendFlowService.js +++ b/src/js/services/sendFlowService.js @@ -20,5 +20,12 @@ angular.module('copayApp.services').factory('sendFlowService', function ($log) { vm.toWalletId = false; }; + vm.map = function(params) { + Object.keys(params).map(function(key, index) { + vm[key] = params[key]; + }); + console.log(vm); + }; + return vm; }); \ No newline at end of file From 220610271558cff7fe347da994eedc0319108fdc Mon Sep 17 00:00:00 2001 From: Sebastiaan Pasma Date: Wed, 8 Aug 2018 17:27:15 +0200 Subject: [PATCH 188/256] sendflow service integrated into flow --- .../controllers/walletSelectorController.js | 1 + src/js/services/sendFlowService.js | 21 +++++++++++++++++-- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/src/js/controllers/walletSelectorController.js b/src/js/controllers/walletSelectorController.js index a26e07d8f..69430dbb9 100644 --- a/src/js/controllers/walletSelectorController.js +++ b/src/js/controllers/walletSelectorController.js @@ -191,6 +191,7 @@ angular.module('copayApp.controllers').controller('walletSelectorController', fu }; $scope.goBack = function() { + sendFlowService.previousState(); $ionicHistory.goBack(); } diff --git a/src/js/services/sendFlowService.js b/src/js/services/sendFlowService.js index 09e55e7ec..58b457b3a 100644 --- a/src/js/services/sendFlowService.js +++ b/src/js/services/sendFlowService.js @@ -4,13 +4,15 @@ angular.module('copayApp.services').factory('sendFlowService', function ($log) { var vm = this; vm.amount = false; + vm.fromWalletId = false; + vm.previousStates = []; vm.thirdParty = false; vm.sendMax = false; vm.toAddress = false; vm.toWalletId = false; - vm.initialize = function() { + vm.clear = function() { $log.debug("Reinitialize Send Flow variables"); vm.amount = false; vm.fromWalletId = false; @@ -18,13 +20,28 @@ angular.module('copayApp.services').factory('sendFlowService', function ($log) { vm.sendMax = false; vm.toAddress = false; vm.toWalletId = false; + vm.previousStates = []; }; vm.map = function(params) { + + var tempState = {}; + Object.keys(vm).map(function(key, index) { + if (typeof vm[key] !== 'function' && key !== 'previousStates') { + tempState[key] = vm[key]; + } + }); + vm.previousStates.push(tempState); + Object.keys(params).map(function(key, index) { vm[key] = params[key]; }); - console.log(vm); + }; + + vm.previousState = function() { + if (vm.previousStates.length) { + vm.map(vm.previousStates.pop()); + } }; return vm; From 02e8e0fbf026f44f5e999eaabb867ae835fa231f Mon Sep 17 00:00:00 2001 From: Sebastiaan Pasma Date: Wed, 8 Aug 2018 17:29:28 +0200 Subject: [PATCH 189/256] clear send flow on home and wallet details --- src/js/controllers/tab-home.js | 4 +++- src/js/controllers/walletDetails.js | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/js/controllers/tab-home.js b/src/js/controllers/tab-home.js index 07b01b974..7671d524a 100644 --- a/src/js/controllers/tab-home.js +++ b/src/js/controllers/tab-home.js @@ -1,7 +1,7 @@ 'use strict'; angular.module('copayApp.controllers').controller('tabHomeController', - function($rootScope, $timeout, $scope, $state, $stateParams, $ionicModal, $ionicScrollDelegate, $window, gettextCatalog, lodash, popupService, ongoingProcess, bannerService, externalLinkService, latestReleaseService, profileService, walletService, configService, $log, platformInfo, storageService, txpModalService, appConfigService, startupService, addressbookService, bwcError, nextStepsService, buyAndSellService, homeIntegrationsService, bitpayCardService, pushNotificationsService, timeService, bitcoincomService, pricechartService, firebaseEventsService, servicesService, shapeshiftService, $ionicNavBarDelegate, signVerifyMessageService) { + function($rootScope, $timeout, $scope, $state, $stateParams, $ionicModal, $ionicScrollDelegate, $window, gettextCatalog, lodash, popupService, ongoingProcess, bannerService, externalLinkService, latestReleaseService, profileService, walletService, configService, $log, platformInfo, sendFlowService, storageService, txpModalService, appConfigService, startupService, addressbookService, bwcError, nextStepsService, buyAndSellService, homeIntegrationsService, bitpayCardService, pushNotificationsService, timeService, bitcoincomService, pricechartService, firebaseEventsService, servicesService, shapeshiftService, $ionicNavBarDelegate, signVerifyMessageService) { var wallet; var listeners = []; var notifications = []; @@ -31,6 +31,8 @@ angular.module('copayApp.controllers').controller('tabHomeController', }); $scope.$on("$ionicView.beforeEnter", function(event, data) { + sendFlowService.clear(); + if (!$scope.homeTip) { storageService.getHomeTipAccepted(function(error, value) { $scope.homeTip = (value == 'accepted') ? false : true; diff --git a/src/js/controllers/walletDetails.js b/src/js/controllers/walletDetails.js index 9eef7a5c9..5200c5987 100644 --- a/src/js/controllers/walletDetails.js +++ b/src/js/controllers/walletDetails.js @@ -374,6 +374,7 @@ angular.module('copayApp.controllers').controller('walletDetailsController', fun }); $scope.$on("$ionicView.beforeEnter", function(event, data) { + sendFlowService.clear(); configService.whenAvailable(function (config) { $scope.selectedPriceDisplay = config.wallet.settings.priceDisplay; From d81f194f87a262d4de7b43e2fa3401c7cdc52017 Mon Sep 17 00:00:00 2001 From: Brendon Duncan Date: Thu, 9 Aug 2018 07:35:47 +1200 Subject: [PATCH 190/256] Fix for when an amount changes from having a separate currency value, to the currency being one string with the amount. --- src/js/directives/formattedAmount.js | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/js/directives/formattedAmount.js b/src/js/directives/formattedAmount.js index c5b2dfcd4..c39007d66 100644 --- a/src/js/directives/formattedAmount.js +++ b/src/js/directives/formattedAmount.js @@ -63,14 +63,15 @@ angular.module('bitcoincom.directives') }; var formatNumbers = function() { - - if (!$scope.currency && $scope.value) { // If there is no currency available.. - // Try to extract currency from value.. - var currencySplit = $scope.value.split(" "); - if (currencySplit.length === 2) { - $scope.currency = currencySplit[1]; - } + + // During watch, may be changed from having a separate currency value, + // to both being in value. Don't want to use previous currency value. + // Try to extract currency from value.. + var currencySplit = $scope.value.split(" "); + if (currencySplit.length === 2) { + $scope.currency = currencySplit[1]; } + var parsed = parseFloat($scope.value); var valueFormatted = ''; From 1c3b11322238da4677371833f18b32fee368a814 Mon Sep 17 00:00:00 2001 From: Brendon Duncan Date: Thu, 9 Aug 2018 07:49:13 +1200 Subject: [PATCH 191/256] Removed unused config service. --- src/js/directives/formattedAmount.js | 203 +++++++++++++-------------- 1 file changed, 100 insertions(+), 103 deletions(-) diff --git a/src/js/directives/formattedAmount.js b/src/js/directives/formattedAmount.js index c39007d66..6269954fb 100644 --- a/src/js/directives/formattedAmount.js +++ b/src/js/directives/formattedAmount.js @@ -11,7 +11,7 @@ * @example */ angular.module('bitcoincom.directives') - .directive('formattedAmount', function(configService, uxLanguage) { + .directive('formattedAmount', function(uxLanguage) { return { restrict: 'E', scope: { @@ -25,110 +25,107 @@ angular.module('bitcoincom.directives') $scope.displaySizeEqual = !!$scope.sizeEqual; - configService.whenAvailable(function onConfigServiceAvailable(config) { + $timeout(function onFormattedAmountTimeout() { - $timeout(function onFormattedAmountTimeout() { - - var decimalPlaces = { - '0': ['BIF', 'CLP', 'DJF', 'GNF', 'ILS', 'JPY', 'KMF', 'KRW', 'MGA', 'PYG', 'RWF', 'UGX', 'VND', 'VUV', 'XAF', 'XOF', 'XPF'], - '3': ['BHD', 'IQD', 'JOD', 'KWD', 'OMR', 'TND'], - '8': ['BCH', 'BTC'] - }; - var localizeNumbers = function(x, minimumFractionDigits = 0, useGrouping = true) { - return parseFloat(x).toLocaleString(uxLanguage.getCurrentLanguage(), { - minimumFractionDigits: minimumFractionDigits, - useGrouping: useGrouping - }); - }; - - var buildAmount = function(start, middle, end) { - $scope.start = start; - $scope.middle = middle; - $scope.end = end; - }; - - var getDecimalPlaces = function(currency) { - if (decimalPlaces['0'].indexOf(currency.toUpperCase()) > -1) return '0'; - if (decimalPlaces['3'].indexOf(currency.toUpperCase()) > -1) return '3'; - if (decimalPlaces['8'].indexOf(currency.toUpperCase()) > -1) return '8'; - return '2'; - }; - - var getDecimalSeparator = function() { - var testNum = 1.5; - var testString = testNum.toLocaleString(uxLanguage.getCurrentLanguage()); - // Some environments let you set decimal separators that are more than one character - var separator = /^1(.+)5$/.exec(testString)[1] - return separator; - }; - - var formatNumbers = function() { - - // During watch, may be changed from having a separate currency value, - // to both being in value. Don't want to use previous currency value. - // Try to extract currency from value.. - var currencySplit = $scope.value.split(" "); - if (currencySplit.length === 2) { - $scope.currency = currencySplit[1]; - } - - - var parsed = parseFloat($scope.value); - var valueFormatted = ''; - var valueProcessing = ''; - switch (getDecimalPlaces($scope.currency)) { - case '0': - if (isNaN(parsed)) { - buildAmount('-', '', ''); - } else { - valueFormatted = localizeNumbers(Math.round(parsed)); - buildAmount(valueFormatted, '', ''); - } - break; - - case '3': - if (isNaN(parsed)) { - buildAmount('-' + getDecimalSeparator() + '---', '', ''); - } else { - valueProcessing = parsed.toFixed(3); - valueFormatted = localizeNumbers(valueProcessing, 3); - buildAmount(valueFormatted, '', ''); - } - break; - - case '8': - if (isNaN(parsed)) { - buildAmount('-' + getDecimalSeparator() + '---', '', ''); - } else if (parsed === 0) { - buildAmount('0', '', ''); - } else { - valueFormatted = parsed.toFixed(8); - valueFormatted = localizeNumbers(valueFormatted, 8); - var start = valueFormatted.slice(0, -5); - var middle = valueFormatted.slice(-5, -2); - var end = valueFormatted.substr(valueFormatted.length - 2); - buildAmount(start, middle, end); - - } - break; - - default: // 2 - if (isNaN(parsed)) { - buildAmount('-' + getDecimalSeparator() + '--', '', ''); - } else { - valueProcessing = parseFloat(parsed.toFixed(2)); - valueFormatted = localizeNumbers(valueProcessing, 2); - buildAmount(valueFormatted, '', ''); - } - break; - } - $scope.canShow = true; - }; - - formatNumbers(); - $scope.$watchGroup(['currency', 'value'], function onFormattedAmountWatch() { - formatNumbers(); + var decimalPlaces = { + '0': ['BIF', 'CLP', 'DJF', 'GNF', 'ILS', 'JPY', 'KMF', 'KRW', 'MGA', 'PYG', 'RWF', 'UGX', 'VND', 'VUV', 'XAF', 'XOF', 'XPF'], + '3': ['BHD', 'IQD', 'JOD', 'KWD', 'OMR', 'TND'], + '8': ['BCH', 'BTC'] + }; + var localizeNumbers = function(x, minimumFractionDigits = 0, useGrouping = true) { + return parseFloat(x).toLocaleString(uxLanguage.getCurrentLanguage(), { + minimumFractionDigits: minimumFractionDigits, + useGrouping: useGrouping }); + }; + + var buildAmount = function(start, middle, end) { + $scope.start = start; + $scope.middle = middle; + $scope.end = end; + }; + + var getDecimalPlaces = function(currency) { + if (decimalPlaces['0'].indexOf(currency.toUpperCase()) > -1) return '0'; + if (decimalPlaces['3'].indexOf(currency.toUpperCase()) > -1) return '3'; + if (decimalPlaces['8'].indexOf(currency.toUpperCase()) > -1) return '8'; + return '2'; + }; + + var getDecimalSeparator = function() { + var testNum = 1.5; + var testString = testNum.toLocaleString(uxLanguage.getCurrentLanguage()); + // Some environments let you set decimal separators that are more than one character + var separator = /^1(.+)5$/.exec(testString)[1] + return separator; + }; + + var formatNumbers = function() { + + // During watch, may be changed from having a separate currency value, + // to both being in value. Don't want to use previous currency value. + // Try to extract currency from value.. + var currencySplit = $scope.value.split(" "); + if (currencySplit.length === 2) { + $scope.currency = currencySplit[1]; + } + + + var parsed = parseFloat($scope.value); + var valueFormatted = ''; + var valueProcessing = ''; + switch (getDecimalPlaces($scope.currency)) { + case '0': + if (isNaN(parsed)) { + buildAmount('-', '', ''); + } else { + valueFormatted = localizeNumbers(Math.round(parsed)); + buildAmount(valueFormatted, '', ''); + } + break; + + case '3': + if (isNaN(parsed)) { + buildAmount('-' + getDecimalSeparator() + '---', '', ''); + } else { + valueProcessing = parsed.toFixed(3); + valueFormatted = localizeNumbers(valueProcessing, 3); + buildAmount(valueFormatted, '', ''); + } + break; + + case '8': + if (isNaN(parsed)) { + buildAmount('-' + getDecimalSeparator() + '---', '', ''); + } else if (parsed === 0) { + buildAmount('0', '', ''); + } else { + valueFormatted = parsed.toFixed(8); + valueFormatted = localizeNumbers(valueFormatted, 8); + var start = valueFormatted.slice(0, -5); + var middle = valueFormatted.slice(-5, -2); + var end = valueFormatted.substr(valueFormatted.length - 2); + buildAmount(start, middle, end); + + } + break; + + default: // 2 + if (isNaN(parsed)) { + buildAmount('-' + getDecimalSeparator() + '--', '', ''); + } else { + valueProcessing = parseFloat(parsed.toFixed(2)); + valueFormatted = localizeNumbers(valueProcessing, 2); + buildAmount(valueFormatted, '', ''); + } + break; + } + $scope.canShow = true; + }; + + formatNumbers(); + $scope.$watchGroup(['currency', 'value'], function onFormattedAmountWatch() { + formatNumbers(); }); }); } From 58d99231ae449d140e01a6b5cd5722fc973c570a Mon Sep 17 00:00:00 2001 From: Brendon Duncan Date: Thu, 9 Aug 2018 10:46:07 +1200 Subject: [PATCH 192/256] Handle undefined currency. --- src/js/directives/formattedAmount.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/js/directives/formattedAmount.js b/src/js/directives/formattedAmount.js index 6269954fb..5bd307de3 100644 --- a/src/js/directives/formattedAmount.js +++ b/src/js/directives/formattedAmount.js @@ -69,6 +69,7 @@ angular.module('bitcoincom.directives') if (currencySplit.length === 2) { $scope.currency = currencySplit[1]; } + $scope.currency = $scope.currency || ''; var parsed = parseFloat($scope.value); From dff0d51ef3699df1d5ccaa5299637510b63c0ab6 Mon Sep 17 00:00:00 2001 From: Brendon Duncan Date: Thu, 9 Aug 2018 11:10:26 +1200 Subject: [PATCH 193/256] Refactored sendFlowService and cleared its state before entering the send tab. --- src/js/controllers/addressbookView.js | 3 +- src/js/controllers/amount.js | 1 + src/js/controllers/shapeshift.js | 3 +- src/js/controllers/tab-home.js | 8 +- src/js/controllers/tab-send.js | 7 ++ src/js/controllers/tabsController.js | 9 ++- src/js/controllers/walletDetails.js | 10 ++- src/js/services/sendFlowService.js | 106 +++++++++++++++++--------- www/views/tab-home.html | 2 +- www/views/tab-send.html | 21 ++++- www/views/tabs.html | 2 +- 11 files changed, 124 insertions(+), 48 deletions(-) diff --git a/src/js/controllers/addressbookView.js b/src/js/controllers/addressbookView.js index aab6fb5b4..5f6881d10 100644 --- a/src/js/controllers/addressbookView.js +++ b/src/js/controllers/addressbookView.js @@ -1,6 +1,6 @@ 'use strict'; -angular.module('copayApp.controllers').controller('addressbookViewController', function($scope, $state, $timeout, lodash, addressbookService, popupService, $ionicHistory, platformInfo, gettextCatalog, configService, bitcoinCashJsService) { +angular.module('copayApp.controllers').controller('addressbookViewController', function($scope, sendFlowService, $state, $timeout, lodash, addressbookService, popupService, $ionicHistory, platformInfo, gettextCatalog, configService, bitcoinCashJsService) { var config = configService.getSync(); var defaults = configService.getDefaults(); @@ -22,6 +22,7 @@ angular.module('copayApp.controllers').controller('addressbookViewController', f $scope.sendTo = function() { $ionicHistory.removeBackView(); + sendFlowService.clear(); $state.go('tabs.send'); $timeout(function() { var to = ''; diff --git a/src/js/controllers/amount.js b/src/js/controllers/amount.js index 68d4e869b..8ff214d87 100644 --- a/src/js/controllers/amount.js +++ b/src/js/controllers/amount.js @@ -209,6 +209,7 @@ function amountController(configService, $filter, gettextCatalog, $ionicHistory, } function goBack() { + sendFlowService.previousState(); if (vm.thirdParty && vm.thirdParty.id === 'shapeshift') { $state.go('tabs.send').then(function() { $ionicHistory.clearHistory(); diff --git a/src/js/controllers/shapeshift.js b/src/js/controllers/shapeshift.js index 4bf3db764..fcb43026d 100644 --- a/src/js/controllers/shapeshift.js +++ b/src/js/controllers/shapeshift.js @@ -1,6 +1,6 @@ 'use strict'; -angular.module('copayApp.controllers').controller('shapeshiftController', function($scope, $state, $timeout, $ionicHistory, profileService, walletService, popupService, lodash, $ionicNavBarDelegate) { +angular.module('copayApp.controllers').controller('shapeshiftController', function($scope, sendFlowService, $state, $timeout, $ionicHistory, profileService, walletService, popupService, lodash, $ionicNavBarDelegate) { var walletsBtc = []; var walletsBch = []; @@ -67,6 +67,7 @@ angular.module('copayApp.controllers').controller('shapeshiftController', functi thirdParty: JSON.stringify({id: 'shapeshift'}) }; + sendFlowService.clear(); $state.go('tabs.home').then(function() { $ionicHistory.clearHistory(); $state.go('tabs.send').then(function() { diff --git a/src/js/controllers/tab-home.js b/src/js/controllers/tab-home.js index 7671d524a..3d63ae41f 100644 --- a/src/js/controllers/tab-home.js +++ b/src/js/controllers/tab-home.js @@ -1,7 +1,7 @@ 'use strict'; angular.module('copayApp.controllers').controller('tabHomeController', - function($rootScope, $timeout, $scope, $state, $stateParams, $ionicModal, $ionicScrollDelegate, $window, gettextCatalog, lodash, popupService, ongoingProcess, bannerService, externalLinkService, latestReleaseService, profileService, walletService, configService, $log, platformInfo, sendFlowService, storageService, txpModalService, appConfigService, startupService, addressbookService, bwcError, nextStepsService, buyAndSellService, homeIntegrationsService, bitpayCardService, pushNotificationsService, timeService, bitcoincomService, pricechartService, firebaseEventsService, servicesService, shapeshiftService, $ionicNavBarDelegate, signVerifyMessageService) { + function($rootScope, sendFlowService, $timeout, $scope, $state, $stateParams, $ionicModal, $ionicScrollDelegate, $window, gettextCatalog, lodash, popupService, ongoingProcess, bannerService, externalLinkService, latestReleaseService, profileService, walletService, configService, $log, platformInfo, storageService, txpModalService, appConfigService, startupService, addressbookService, bwcError, nextStepsService, buyAndSellService, homeIntegrationsService, bitpayCardService, pushNotificationsService, timeService, bitcoincomService, pricechartService, firebaseEventsService, servicesService, shapeshiftService, $ionicNavBarDelegate, signVerifyMessageService) { var wallet; var listeners = []; var notifications = []; @@ -31,7 +31,6 @@ angular.module('copayApp.controllers').controller('tabHomeController', }); $scope.$on("$ionicView.beforeEnter", function(event, data) { - sendFlowService.clear(); if (!$scope.homeTip) { storageService.getHomeTipAccepted(function(error, value) { @@ -119,6 +118,11 @@ angular.module('copayApp.controllers').controller('tabHomeController', return timeService.withinPastDay(time); }; + $scope.startFreshSend = function() { + sendFlowService.clear(); + $state.go('tabs.send'); + } + $scope.openExternalLink = function() { var url = 'https://github.com/Bitcoin-com/Wallet/releases/latest'; var optIn = true; diff --git a/src/js/controllers/tab-send.js b/src/js/controllers/tab-send.js index 0c0c1bfe1..33befb8f2 100644 --- a/src/js/controllers/tab-send.js +++ b/src/js/controllers/tab-send.js @@ -187,6 +187,13 @@ angular.module('copayApp.controllers').controller('tabSendController', function( }); }; + $scope.startWalletToWalletTransfer = function() { + console.log('startWalletToWalletTransfer()'); + $state.transitionTo('tabs.send.wallet-to-wallet', { + fromWalletId: sendFlowService.fromWalletId + }); + } + // This could probably be enhanced refactoring the routes abstract states $scope.createWallet = function() { $state.go('tabs.home').then(function() { diff --git a/src/js/controllers/tabsController.js b/src/js/controllers/tabsController.js index a186879e3..b3de6c70f 100644 --- a/src/js/controllers/tabsController.js +++ b/src/js/controllers/tabsController.js @@ -1,6 +1,6 @@ 'use strict'; -angular.module('copayApp.controllers').controller('tabsController', function($rootScope, $log, $scope, $state, $stateParams, $timeout, platformInfo, incomingData, lodash, popupService, gettextCatalog, scannerService) { +angular.module('copayApp.controllers').controller('tabsController', function($rootScope, $log, $scope, $state, $stateParams, $timeout, platformInfo, incomingData, lodash, popupService, gettextCatalog, scannerService, sendFlowService) { $scope.onScan = function(data) { if (!incomingData.redir(data)) { @@ -15,6 +15,11 @@ angular.module('copayApp.controllers').controller('tabsController', function($ro }; }; + $scope.startFreshSend = function() { + sendFlowService.clear(); + $state.go('tabs.send'); + }; + $scope.importInit = function() { $scope.fromOnboarding = $stateParams.fromOnboarding; $timeout(function() { @@ -23,7 +28,7 @@ angular.module('copayApp.controllers').controller('tabsController', function($ro }; $scope.chooseScanner = function() { - + sendFlowService.clear(); var isWindowsPhoneApp = platformInfo.isCordova && platformInfo.isWP; if (!isWindowsPhoneApp) { diff --git a/src/js/controllers/walletDetails.js b/src/js/controllers/walletDetails.js index 5200c5987..b159f7bc4 100644 --- a/src/js/controllers/walletDetails.js +++ b/src/js/controllers/walletDetails.js @@ -471,13 +471,20 @@ angular.module('copayApp.controllers').controller('walletDetailsController', fun function rgbToHex(r, g, b) { return "#" + componentToHex(r) + componentToHex(g) + componentToHex(b); } + $scope.goToSend = function() { - sendFlowService.fromWalletId = $scope.wallet.id; + sendFlowService.startSend({ + fromWalletId: $scope.wallet.id + }); + + // Go home first so that the Home tab works properly $state.go('tabs.home').then(function () { $ionicHistory.clearHistory(); $state.go('tabs.send'); }); + }; + $scope.goToReceive = function() { $state.go('tabs.home', { walletId: $scope.wallet.id @@ -488,6 +495,7 @@ angular.module('copayApp.controllers').controller('walletDetailsController', fun }); }); }; + $scope.goToBuy = function() { $state.go('tabs.home', { walletId: $scope.wallet.id diff --git a/src/js/services/sendFlowService.js b/src/js/services/sendFlowService.js index 58b457b3a..1af112ed2 100644 --- a/src/js/services/sendFlowService.js +++ b/src/js/services/sendFlowService.js @@ -1,48 +1,78 @@ 'use strict'; -angular.module('copayApp.services').factory('sendFlowService', function ($log) { - var vm = this; +(function(){ - vm.amount = false; +angular + .module('copayApp.services') + .factory('sendFlowService', sendFlowService); + + function sendFlowService($log) { - vm.fromWalletId = false; - vm.previousStates = []; - vm.thirdParty = false; - vm.sendMax = false; - vm.toAddress = false; - vm.toWalletId = false; + var service = { + amount: '', + fromWalletId: '', + sendMax: false, + thirdParty: null, + toAddress: '', + toWalletId: '', + previousStates: [], - vm.clear = function() { - $log.debug("Reinitialize Send Flow variables"); - vm.amount = false; - vm.fromWalletId = false; - vm.thirdParty = false; - vm.sendMax = false; - vm.toAddress = false; - vm.toWalletId = false; - vm.previousStates = []; - }; + // Functions + clear: clear, + map: map, + previousState: previousState, + startSend: startSend + }; - vm.map = function(params) { + return service; - var tempState = {}; - Object.keys(vm).map(function(key, index) { - if (typeof vm[key] !== 'function' && key !== 'previousStates') { - tempState[key] = vm[key]; - } - }); - vm.previousStates.push(tempState); - - Object.keys(params).map(function(key, index) { - vm[key] = params[key]; - }); - }; - - vm.previousState = function() { - if (vm.previousStates.length) { - vm.map(vm.previousStates.pop()); + function clear() { + $log.debug("Reinitialize Send Flow variables with clear()"); + service.amount = ''; + service.fromWalletId = ''; + service.sendMax = false; + service.thirdParty = null; + service.toAddress = ''; + service.toWalletId = ''; + service.previousStates = []; } + + /** + * Clears all previous state + * @param {} params + */ + function startSend(params) { + console.log('startSend()'); + clear(); + Object.keys(params).forEach(function forNewParam(key) { + service[key] = params[key]; + }); + } + + function map(params) { + + var currentState = {}; + Object.keys(service).forEach(function forCurrentParam(key) { + if (typeof service[key] !== 'function' && key !== 'previousStates') { + currentState[key] = service[key]; + } + }); + service.previousStates.push(currentState); + + // Do we want to inherit the previous state here, or clear first before adding new params? + + Object.keys(params).forEach(function forNewParam(key) { + service[key] = params[key]; + }); + }; + + function previousState() { + if (service.previousStates.length) { + map(service.previousStates.pop()); + } else { + clear(); + } + }; }; - return vm; -}); \ No newline at end of file +})(); \ No newline at end of file diff --git a/www/views/tab-home.html b/www/views/tab-home.html index 618f2e128..8ef922918 100644 --- a/www/views/tab-home.html +++ b/www/views/tab-home.html @@ -34,7 +34,7 @@ Buy Bitcoin
+ ng-click="startFreshSend()"> Send
diff --git a/www/views/tab-send.html b/www/views/tab-send.html index 20198c7f0..3378b53ed 100644 --- a/www/views/tab-send.html +++ b/www/views/tab-send.html @@ -4,6 +4,25 @@
+ +
+
+
From:
+
+
+ +
+
+

{{fromWallet.name}}

+ + +
+
+
+
+
@@ -22,7 +41,7 @@
- diff --git a/www/views/tabs.html b/www/views/tabs.html index 3c2683a13..39d0acf73 100644 --- a/www/views/tabs.html +++ b/www/views/tabs.html @@ -11,7 +11,7 @@ - + From be2bc4cddb5b774c49baa14c51d89c2ad013c6b5 Mon Sep 17 00:00:00 2001 From: Brendon Duncan Date: Thu, 9 Aug 2018 11:11:10 +1200 Subject: [PATCH 194/256] Showing From wallet in send tab. --- src/js/controllers/tab-send.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/js/controllers/tab-send.js b/src/js/controllers/tab-send.js index 33befb8f2..caa03e92b 100644 --- a/src/js/controllers/tab-send.js +++ b/src/js/controllers/tab-send.js @@ -208,6 +208,13 @@ angular.module('copayApp.controllers').controller('tabSendController', function( }; $scope.$on("$ionicView.beforeEnter", function(event, data) { + console.log('tab-send.beforeEnter sendFlowService.fromWalletId:', sendFlowService.fromWalletId); + var fromWalletId = sendFlowService.fromWalletId; + if (fromWalletId) { + $scope.fromWallet = profileService.getWallet(fromWalletId); + } else { + $scope.fromWallet = null; + } $scope.isIOS = platformInfo.isIOS && platformInfo.isCordova; $scope.showWalletsBch = $scope.showWalletsBtc = $scope.showWallets = false; From 1d025cbf35f9bf7fa8eb36e5bd708dea5a1f149f Mon Sep 17 00:00:00 2001 From: Brendon Duncan Date: Thu, 9 Aug 2018 11:42:25 +1200 Subject: [PATCH 195/256] Fixes for Android 4.4 --- src/js/directives/formattedAmount.js | 6 +++--- src/js/services/clipboardService.js | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/js/directives/formattedAmount.js b/src/js/directives/formattedAmount.js index 5bd307de3..d3e2e6347 100644 --- a/src/js/directives/formattedAmount.js +++ b/src/js/directives/formattedAmount.js @@ -32,10 +32,10 @@ angular.module('bitcoincom.directives') '3': ['BHD', 'IQD', 'JOD', 'KWD', 'OMR', 'TND'], '8': ['BCH', 'BTC'] }; - var localizeNumbers = function(x, minimumFractionDigits = 0, useGrouping = true) { + var localizeNumbers = function(x, minimumFractionDigits) { return parseFloat(x).toLocaleString(uxLanguage.getCurrentLanguage(), { minimumFractionDigits: minimumFractionDigits, - useGrouping: useGrouping + useGrouping: true }); }; @@ -80,7 +80,7 @@ angular.module('bitcoincom.directives') if (isNaN(parsed)) { buildAmount('-', '', ''); } else { - valueFormatted = localizeNumbers(Math.round(parsed)); + valueFormatted = localizeNumbers(Math.round(parsed), 0); buildAmount(valueFormatted, '', ''); } break; diff --git a/src/js/services/clipboardService.js b/src/js/services/clipboardService.js index 075cb749a..77ad3d018 100644 --- a/src/js/services/clipboardService.js +++ b/src/js/services/clipboardService.js @@ -13,7 +13,7 @@ angular.module('copayApp.services').factory('clipboardService', function ($http, nodeWebkitService.writeToClipboard(data); } else if (navigator && navigator.clipboard) { $log.debug("Use navigator clipboard.") - navigator.clipboard.writeText(data).catch(err => { + navigator.clipboard.writeText(data).catch(function onClipboardError(err) { $log.debug("Clipboard writing is not supported in your browser.."); }); } else if (clipboard.supported) { From 408d46e4d342eab340ea0033d16d2d43492a71b7 Mon Sep 17 00:00:00 2001 From: Brendon Duncan Date: Thu, 9 Aug 2018 11:43:20 +1200 Subject: [PATCH 196/256] Hid the from wallet in the send screen for now, because it requires other layout changes to fit everything in, especially on small screens. --- src/js/controllers/tab-send.js | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/js/controllers/tab-send.js b/src/js/controllers/tab-send.js index caa03e92b..33befb8f2 100644 --- a/src/js/controllers/tab-send.js +++ b/src/js/controllers/tab-send.js @@ -208,13 +208,6 @@ angular.module('copayApp.controllers').controller('tabSendController', function( }; $scope.$on("$ionicView.beforeEnter", function(event, data) { - console.log('tab-send.beforeEnter sendFlowService.fromWalletId:', sendFlowService.fromWalletId); - var fromWalletId = sendFlowService.fromWalletId; - if (fromWalletId) { - $scope.fromWallet = profileService.getWallet(fromWalletId); - } else { - $scope.fromWallet = null; - } $scope.isIOS = platformInfo.isIOS && platformInfo.isCordova; $scope.showWalletsBch = $scope.showWalletsBtc = $scope.showWallets = false; From be0c18244e8be335a62f15788e661eb0fa27b0d3 Mon Sep 17 00:00:00 2001 From: Brendon Duncan Date: Thu, 9 Aug 2018 12:12:29 +1200 Subject: [PATCH 197/256] Review Transaction screen now displaying BCH addresses in cashaddr format. --- src/js/controllers/review.controller.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/js/controllers/review.controller.js b/src/js/controllers/review.controller.js index 858e115c1..886da26b8 100644 --- a/src/js/controllers/review.controller.js +++ b/src/js/controllers/review.controller.js @@ -403,16 +403,20 @@ function reviewController(addressbookService, bitcoinCashJsService, bitcore, bit // Check if the recipient is a contact addressbookService.get(originCoin + address, function(err, contact) { if (!err && contact) { - handleDestinationAsContact(contact); + handleDestinationAsAddressOfContact(contact); } else { - vm.destination.address = address; + if (originCoin === 'bch') { + vm.destination.address = bitcoinCashJsService.readAddress(address).cashaddr; + } else { + vm.destination.address = address; + } vm.destination.kind = 'address'; } }); } - function handleDestinationAsContact(contact) { + function handleDestinationAsAddressOfContact(contact) { vm.destination.kind = 'contact'; vm.destination.name = contact.name; vm.destination.email = contact.email; From bf9b467bfe9324f493c0b90d6942ba459d5c5f66 Mon Sep 17 00:00:00 2001 From: Brendon Duncan Date: Thu, 9 Aug 2018 13:01:48 +1200 Subject: [PATCH 198/256] Renamed sendFlowService functions to be more consistent. --- src/js/controllers/amount.js | 5 +- src/js/controllers/tab-send.js | 3 ++ .../controllers/walletSelectorController.js | 10 ++-- src/js/services/incomingData.js | 6 +-- src/js/services/sendFlowService.js | 48 ++++++++++++------- 5 files changed, 46 insertions(+), 26 deletions(-) diff --git a/src/js/controllers/amount.js b/src/js/controllers/amount.js index 8ff214d87..6f513663c 100644 --- a/src/js/controllers/amount.js +++ b/src/js/controllers/amount.js @@ -66,6 +66,7 @@ function amountController(configService, $filter, gettextCatalog, $ionicHistory, } function onBeforeEnter(event, data) { + console.log('amount onBeforeEnter sendflow ', sendFlowService.getState()); initCurrencies(); @@ -209,7 +210,7 @@ function amountController(configService, $filter, gettextCatalog, $ionicHistory, } function goBack() { - sendFlowService.previousState(); + sendFlowService.popState(); if (vm.thirdParty && vm.thirdParty.id === 'shapeshift') { $state.go('tabs.send').then(function() { $ionicHistory.clearHistory(); @@ -471,7 +472,7 @@ function amountController(configService, $filter, gettextCatalog, $ionicHistory, confirmData['thirdParty'] = this.thirdParty; } - sendFlowService.map(confirmData); + sendFlowService.pushState(confirmData); if (!confirmData.fromWalletId) { $state.transitionTo('tabs.paymentRequest.confirm', confirmData); diff --git a/src/js/controllers/tab-send.js b/src/js/controllers/tab-send.js index 33befb8f2..3f2c1a250 100644 --- a/src/js/controllers/tab-send.js +++ b/src/js/controllers/tab-send.js @@ -189,6 +189,8 @@ angular.module('copayApp.controllers').controller('tabSendController', function( $scope.startWalletToWalletTransfer = function() { console.log('startWalletToWalletTransfer()'); + var params = sendFlowService.getState(); + sendFlowService.pushState(params); $state.transitionTo('tabs.send.wallet-to-wallet', { fromWalletId: sendFlowService.fromWalletId }); @@ -208,6 +210,7 @@ angular.module('copayApp.controllers').controller('tabSendController', function( }; $scope.$on("$ionicView.beforeEnter", function(event, data) { + console.log('tab-send onBeforeEnter sendflow ', sendFlowService.getState()); $scope.isIOS = platformInfo.isIOS && platformInfo.isCordova; $scope.showWalletsBch = $scope.showWalletsBtc = $scope.showWallets = false; diff --git a/src/js/controllers/walletSelectorController.js b/src/js/controllers/walletSelectorController.js index 69430dbb9..1c23bb24b 100644 --- a/src/js/controllers/walletSelectorController.js +++ b/src/js/controllers/walletSelectorController.js @@ -8,6 +8,8 @@ angular.module('copayApp.controllers').controller('walletSelectorController', fu var unitsFromSatoshis = 0; $scope.$on("$ionicView.beforeEnter", function(event, data) { + console.log('walletSelector onBeforeEnter sendflow', sendFlowService.getState()); + var config = configService.getSync().wallet.settings; priceDisplayAsFiat = config.priceDisplay === 'fiat'; unitDecimals = config.unitDecimals; @@ -182,16 +184,18 @@ angular.module('copayApp.controllers').controller('walletSelectorController', fu $scope.useWallet = function(wallet) { + var params = sendFlowService.getState(); if ($scope.type === 'origin') { // we're on the origin screen, set wallet to send from - $scope.params['fromWalletId'] = wallet.id; + params.fromWalletId = wallet.id; } else { // we're on the destination screen, set wallet to send to - $scope.params['toWalletId'] = wallet.id; + params.toWalletId = wallet.id; } + sendFlowService.pushState(params); $state.transitionTo(getNextStep(), $scope.params); }; $scope.goBack = function() { - sendFlowService.previousState(); + sendFlowService.popState(); $ionicHistory.goBack(); } diff --git a/src/js/services/incomingData.js b/src/js/services/incomingData.js index 91de99cf3..934f53cc7 100644 --- a/src/js/services/incomingData.js +++ b/src/js/services/incomingData.js @@ -105,10 +105,10 @@ angular.module('copayApp.services').factory('incomingData', function($log, $stat params.thirdParty = []; params.thirdParty.id = serviceId; params.thirdParty.data = serviceData; - sendFlowService.map(params); + sendFlowService.pushState(params); $state.transitionTo('tabs.send.amount', params); } else { - sendFlowService.map(params); + sendFlowService.pushState(params); $state.transitionTo('tabs.send.origin', params); } }, 100); @@ -459,7 +459,7 @@ angular.module('copayApp.services').factory('incomingData', function($log, $stat 'notify': $state.current.name == 'tabs.send' ? false : true }).then(function() { $timeout(function() { - sendFlowService.map(stateParams); + sendFlowService.pushState(stateParams); // Need to do more here $state.transitionTo('tabs.send.origin', stateParams); }); }); diff --git a/src/js/services/sendFlowService.js b/src/js/services/sendFlowService.js index 1af112ed2..9daf0f4db 100644 --- a/src/js/services/sendFlowService.js +++ b/src/js/services/sendFlowService.js @@ -19,15 +19,17 @@ angular // Functions clear: clear, + getState: getState, map: map, - previousState: previousState, + popState: popState, + pushState: pushState, startSend: startSend }; return service; function clear() { - $log.debug("Reinitialize Send Flow variables with clear()"); + console.log("sendFlow clear()"); service.amount = ''; service.fromWalletId = ''; service.sendMax = false; @@ -38,41 +40,51 @@ angular } /** - * Clears all previous state - * @param {} params + * Handy for debugging */ - function startSend(params) { - console.log('startSend()'); - clear(); - Object.keys(params).forEach(function forNewParam(key) { - service[key] = params[key]; - }); - } - - function map(params) { - + function getState() { var currentState = {}; Object.keys(service).forEach(function forCurrentParam(key) { if (typeof service[key] !== 'function' && key !== 'previousStates') { currentState[key] = service[key]; } }); - service.previousStates.push(currentState); + return currentState; + } - // Do we want to inherit the previous state here, or clear first before adding new params? + /** + * Clears all previous state + */ + function startSend(params) { + console.log('startSend()'); + clear(); + map(params); + } + function map(params) { Object.keys(params).forEach(function forNewParam(key) { service[key] = params[key]; }); }; - function previousState() { + function popState() { + console.log('sendFlow pop'); if (service.previousStates.length) { - map(service.previousStates.pop()); + var params = service.previousStates.pop(); + clear(); + map(params); } else { clear(); } }; + + function pushState(params) { + console.log('sendFlow push'); + var currentParams = getState(); + service.previousStates.push(currentParams); + clear(); + map(params); + }; }; })(); \ No newline at end of file From b426209efb2f7a49e4338fd845edbfd593731a6c Mon Sep 17 00:00:00 2001 From: Brendon Duncan Date: Thu, 9 Aug 2018 13:06:50 +1200 Subject: [PATCH 199/256] Fix for clearing current state only. --- src/js/services/sendFlowService.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/js/services/sendFlowService.js b/src/js/services/sendFlowService.js index 9daf0f4db..29686b15b 100644 --- a/src/js/services/sendFlowService.js +++ b/src/js/services/sendFlowService.js @@ -30,13 +30,18 @@ angular function clear() { console.log("sendFlow clear()"); + clearCurrent(); + service.previousStates = []; + } + + function clearCurrent() { + console.log("sendFlow clearCurrent()"); service.amount = ''; service.fromWalletId = ''; service.sendMax = false; service.thirdParty = null; service.toAddress = ''; service.toWalletId = ''; - service.previousStates = []; } /** @@ -71,7 +76,7 @@ angular console.log('sendFlow pop'); if (service.previousStates.length) { var params = service.previousStates.pop(); - clear(); + clearCurrent(); map(params); } else { clear(); @@ -82,7 +87,7 @@ angular console.log('sendFlow push'); var currentParams = getState(); service.previousStates.push(currentParams); - clear(); + clearCurrent(); map(params); }; }; From a2dff98c63c67b19c93fad058fa504e9818e0418 Mon Sep 17 00:00:00 2001 From: Brendon Duncan Date: Thu, 9 Aug 2018 13:12:44 +1200 Subject: [PATCH 200/256] Back button on Review Transaction screen works with sendFlowService. --- src/js/controllers/review.controller.js | 6 ++++++ www/views/review.html | 3 +-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/js/controllers/review.controller.js b/src/js/controllers/review.controller.js index 886da26b8..e2e393501 100644 --- a/src/js/controllers/review.controller.js +++ b/src/js/controllers/review.controller.js @@ -49,6 +49,7 @@ function reviewController(addressbookService, bitcoinCashJsService, bitcore, bit vm.memoExpanded = false; // Functions + vm.goBack = goBack; vm.onSuccessConfirm = onSuccessConfirm; var sendFlowData; @@ -395,6 +396,11 @@ function reviewController(addressbookService, bitcoinCashJsService, bitcore, bit }; } + function goBack() { + sendFlowService.popState(); + $ionicHistory.goBack(); + } + function handleDestinationAsAddress(address, originCoin) { if (!address) { return; diff --git a/www/views/review.html b/www/views/review.html index cb7f21fbc..1eb648a01 100644 --- a/www/views/review.html +++ b/www/views/review.html @@ -3,8 +3,7 @@ {{'Review Transaction' | translate}} - - + From 0410182d4f151b1880443cc52898250c5cd3bc92 Mon Sep 17 00:00:00 2001 From: Brendon Duncan Date: Thu, 9 Aug 2018 13:24:13 +1200 Subject: [PATCH 201/256] Incoming data working with sendFlowService. --- src/js/services/incomingData.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/js/services/incomingData.js b/src/js/services/incomingData.js index 934f53cc7..76b5885d4 100644 --- a/src/js/services/incomingData.js +++ b/src/js/services/incomingData.js @@ -82,7 +82,7 @@ angular.module('copayApp.services').factory('incomingData', function($log, $stat }); // Timeout is required to enable the "Back" button $timeout(function() { - var params = {}; + var params = sendFlowService.getState(); if (amount) { params.amount = amount; From 188ddcba586054f87566f536f358708bb46435a2 Mon Sep 17 00:00:00 2001 From: Brendon Duncan Date: Thu, 9 Aug 2018 13:25:06 +1200 Subject: [PATCH 202/256] Review transation copying state at startup so it doesn't contaminate the sendFlowController. --- src/js/controllers/review.controller.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/js/controllers/review.controller.js b/src/js/controllers/review.controller.js index e2e393501..2b42339ce 100644 --- a/src/js/controllers/review.controller.js +++ b/src/js/controllers/review.controller.js @@ -75,8 +75,9 @@ function reviewController(addressbookService, bitcoinCashJsService, bitcore, bit function onBeforeEnter(event, data) { + console.log('walletSelector onBeforeEnter sendflow ', sendFlowService.getState()); defaults = configService.getDefaults(); - sendFlowData = sendFlowService; + sendFlowData = sendFlowService.getState(); originWalletId = sendFlowData.fromWalletId; satoshis = parseInt(sendFlowData.amount, 10); toAddress = sendFlowData.toAddress; From e18364329805475d33a42e64b10cbf3e6b1c7baf Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Dominguez Date: Thu, 9 Aug 2018 12:35:39 +0900 Subject: [PATCH 203/256] Remove from the route the stateparams, adapt some controllers in the new sendflowservice --- src/js/controllers/addressbookView.js | 8 +++++-- src/js/controllers/amount.js | 13 ++-------- src/js/controllers/shapeshift.js | 10 ++++---- src/js/controllers/tab-send.js | 24 +++++++++++++++---- .../controllers/walletSelectorController.js | 8 ++++--- src/js/routes.js | 8 +++---- src/js/services/incomingData.js | 12 ++++++---- 7 files changed, 49 insertions(+), 34 deletions(-) diff --git a/src/js/controllers/addressbookView.js b/src/js/controllers/addressbookView.js index 5f6881d10..89c1cd924 100644 --- a/src/js/controllers/addressbookView.js +++ b/src/js/controllers/addressbookView.js @@ -32,12 +32,16 @@ angular.module('copayApp.controllers').controller('addressbookViewController', f } else { to = $scope.addressbookEntry.address; } - $state.transitionTo('tabs.send.amount', { + + var stateParams = { toAddress: to, toName: $scope.addressbookEntry.name, toEmail: $scope.addressbookEntry.email, coin: $scope.addressbookEntry.coin - }); + }; + + sendFlowService.pushState(stateParams); + $state.transitionTo('tabs.send.origin'); }, 100); }; diff --git a/src/js/controllers/amount.js b/src/js/controllers/amount.js index 6f513663c..d07f77c3f 100644 --- a/src/js/controllers/amount.js +++ b/src/js/controllers/amount.js @@ -78,7 +78,7 @@ function amountController(configService, $filter, gettextCatalog, $ionicHistory, vm.maxAmount = parseFloat(passthroughParams.maxAmount); if (passthroughParams.thirdParty) { - vm.thirdParty = JSON.parse(passthroughParams.thirdParty); // Parse stringified JSON-object + vm.thirdParty = passthroughParams.thirdParty; // Parse stringified JSON-object if (vm.thirdParty) { if (vm.thirdParty.id === 'shapeshift') { if (!vm.thirdParty.data) { @@ -211,16 +211,7 @@ function amountController(configService, $filter, gettextCatalog, $ionicHistory, function goBack() { sendFlowService.popState(); - if (vm.thirdParty && vm.thirdParty.id === 'shapeshift') { - $state.go('tabs.send').then(function() { - $ionicHistory.clearHistory(); - $state.go('tabs.home').then(function() { - $state.transitionTo('tabs.shapeshift'); - }); - }); - } else { - $ionicHistory.goBack(); - } + $ionicHistory.goBack(); } function paste(value) { diff --git a/src/js/controllers/shapeshift.js b/src/js/controllers/shapeshift.js index fcb43026d..4ede8a94f 100644 --- a/src/js/controllers/shapeshift.js +++ b/src/js/controllers/shapeshift.js @@ -63,16 +63,18 @@ angular.module('copayApp.controllers').controller('shapeshiftController', functi }; $scope.shapeshift = function() { - var params = { - thirdParty: JSON.stringify({id: 'shapeshift'}) + var stateParams = { + thirdParty: { + id: 'shapeshift' + } }; - sendFlowService.clear(); $state.go('tabs.home').then(function() { $ionicHistory.clearHistory(); $state.go('tabs.send').then(function() { $timeout(function () { - $state.transitionTo('tabs.send.origin', params); + sendFlowService.pushState(stateParams); + $state.transitionTo('tabs.send.origin'); }, 60); }); }); diff --git a/src/js/controllers/tab-send.js b/src/js/controllers/tab-send.js index 3f2c1a250..55087859d 100644 --- a/src/js/controllers/tab-send.js +++ b/src/js/controllers/tab-send.js @@ -179,11 +179,18 @@ angular.module('copayApp.controllers').controller('tabSendController', function( } $log.debug('Got toAddress:' + toAddress + ' | ' + item.name); + + var stateParams = sendFlowService.getState(); + stateParams.toAddress = toAddress, + stateParams.coin = item.coin; + sendFlowService.pushState(stateParams); + + if (!stateParams.fromWalletId) { // If we have no toAddress or fromWallet + $state.transitionTo('tabs.send.origin'); + } else { + $state.transitionTo('tabs.send.amount'); + } - return $state.transitionTo('tabs.send.origin', { - toAddress: toAddress, - coin: item.coin - }); }); }; @@ -210,6 +217,7 @@ angular.module('copayApp.controllers').controller('tabSendController', function( }; $scope.$on("$ionicView.beforeEnter", function(event, data) { + console.log(data); console.log('tab-send onBeforeEnter sendflow ', sendFlowService.getState()); $scope.isIOS = platformInfo.isIOS && platformInfo.isCordova; $scope.showWalletsBch = $scope.showWalletsBtc = $scope.showWallets = false; @@ -225,5 +233,11 @@ angular.module('copayApp.controllers').controller('tabSendController', function( $scope.displayBalanceAsFiat = _config.wallet.settings.priceDisplay === 'fiat'; }); + var state = sendFlowService.getState(); + + if (data.direction == "back") { + sendFlowService.clear(); + } + }); -}); +}); \ No newline at end of file diff --git a/src/js/controllers/walletSelectorController.js b/src/js/controllers/walletSelectorController.js index 1c23bb24b..f4448486f 100644 --- a/src/js/controllers/walletSelectorController.js +++ b/src/js/controllers/walletSelectorController.js @@ -10,6 +10,8 @@ angular.module('copayApp.controllers').controller('walletSelectorController', fu $scope.$on("$ionicView.beforeEnter", function(event, data) { console.log('walletSelector onBeforeEnter sendflow', sendFlowService.getState()); + var stateParams = sendFlowService.getState(); + var config = configService.getSync().wallet.settings; priceDisplayAsFiat = config.priceDisplay === 'fiat'; unitDecimals = config.unitDecimals; @@ -20,7 +22,7 @@ angular.module('copayApp.controllers').controller('walletSelectorController', fu $scope.sendFlowTitle = gettextCatalog.getString('Wallet to Wallet Transfer'); break; case 'tabs.send.destination': - if (data.stateParams.fromWalletId) { + if (stateParams.fromWalletId) { $scope.sendFlowTitle = gettextCatalog.getString('Wallet to Wallet Transfer'); } break; @@ -47,7 +49,7 @@ angular.module('copayApp.controllers').controller('walletSelectorController', fu $scope.isPaymentRequest = true; } if ($scope.params.thirdParty) { - $scope.thirdParty = JSON.parse($scope.params.thirdParty); // Parse stringified JSON-object + $scope.thirdParty = $scope.params.thirdParty; } }); @@ -96,7 +98,7 @@ angular.module('copayApp.controllers').controller('walletSelectorController', fu function getNextStep() { if ($scope.thirdParty) { - $scope.params.thirdParty = JSON.stringify($scope.thirdParty) // re-stringify JSON-object + $scope.params.thirdParty = $scope.thirdParty } if (!$scope.params.toWalletId && !$scope.params.toAddress) { // If we have no toAddress or fromWallet return 'tabs.send.destination'; diff --git a/src/js/routes.js b/src/js/routes.js index dea46a2cf..5dbcbe6a3 100644 --- a/src/js/routes.js +++ b/src/js/routes.js @@ -287,7 +287,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr */ .state('tabs.send.amount', { - url: '/amount/:thirdParty/:fromWalletId/:maxAmount/:minAmount/:toWalletId/:toAddress', + url: '/amount', views: { 'tab-send@tabs': { controller: 'amountController', @@ -306,7 +306,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr } }) .state('tabs.send.origin', { - url: '/origin/:thirdParty/:amount/:toAddress/:toWalletId/:coin', + url: '/origin', views: { 'tab-send@tabs': { controller: 'walletSelectorController', @@ -315,7 +315,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr } }) .state('tabs.send.destination', { - url: '/destination/:thirdParty/:amount/:fromWalletId', + url: '/destination', views: { 'tab-send@tabs': { controller: 'walletSelectorController', @@ -324,7 +324,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr } }) .state('tabs.send.confirm', { - url: '/confirm/:thirdParty/:amount/:fromWalletId/:toWalletId/:toAddress', + url: '/confirm', views: { 'tab-send@tabs': { controller: 'confirmController', diff --git a/src/js/services/incomingData.js b/src/js/services/incomingData.js index 76b5885d4..86c928a5e 100644 --- a/src/js/services/incomingData.js +++ b/src/js/services/incomingData.js @@ -106,10 +106,10 @@ angular.module('copayApp.services').factory('incomingData', function($log, $stat params.thirdParty.id = serviceId; params.thirdParty.data = serviceData; sendFlowService.pushState(params); - $state.transitionTo('tabs.send.amount', params); + $state.transitionTo('tabs.send.amount'); } else { sendFlowService.pushState(params); - $state.transitionTo('tabs.send.origin', params); + $state.transitionTo('tabs.send.origin'); } }, 100); } @@ -388,11 +388,13 @@ angular.module('copayApp.services').factory('incomingData', function($log, $stat 'notify': $state.current.name == 'tabs.send' ? false : true }); $timeout(function() { - $state.transitionTo('tabs.send.origin', { + var stateParams = { toAddress: toAddress, coin: coin, noPrefix: 1 - }); + }; + sendFlowService.pushState(stateParams); + $state.transitionTo('tabs.send.origin'); }, 100); } @@ -460,7 +462,7 @@ angular.module('copayApp.services').factory('incomingData', function($log, $stat }).then(function() { $timeout(function() { sendFlowService.pushState(stateParams); // Need to do more here - $state.transitionTo('tabs.send.origin', stateParams); + $state.transitionTo('tabs.send.origin'); }); }); } From 647e1261698eba7a9526d5abe93ff85a76ce2b3d Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Dominguez Date: Thu, 9 Aug 2018 12:49:35 +0900 Subject: [PATCH 204/256] Fix style css for the from wallet & activate the from wallet in the send tab --- src/js/controllers/tab-send.js | 3 ++ src/sass/views/tab-send.scss | 14 ++++---- www/css/main.css | 64 ++++++++++++---------------------- 3 files changed, 32 insertions(+), 49 deletions(-) diff --git a/src/js/controllers/tab-send.js b/src/js/controllers/tab-send.js index 55087859d..911548455 100644 --- a/src/js/controllers/tab-send.js +++ b/src/js/controllers/tab-send.js @@ -33,6 +33,9 @@ angular.module('copayApp.controllers').controller('tabSendController', function( text = text.substring(0, 200); } + var stateParams = sendFlowService.getState(); + $scope.fromWallet = profileService.getWallet(stateParams.fromWalletId); + $scope.clipboardHasAddress = false; $scope.clipboardHasContent = false; if ((text.indexOf('bitcoincash:') === 0 || text[0] === 'C' || text[0] === 'H' || text[0] === 'p' || text[0] === 'q') && text.replace('bitcoincash:', '').length === 42) { // CashAddr diff --git a/src/sass/views/tab-send.scss b/src/sass/views/tab-send.scss index 82b6f8d02..bf77984fd 100644 --- a/src/sass/views/tab-send.scss +++ b/src/sass/views/tab-send.scss @@ -2,15 +2,15 @@ @extend .deflash-blue; &-header{ - height: 300px; + //height: 300px; width: 100%; } &-contacts { - height: calc(100vh - 300px - 50px - 44px); /* screen size - button container - bottom-tab-menu - header top */ + //height: calc(100vh - 300px - 50px - 44px); /* screen size - button container - bottom-tab-menu - header top */ &.ios { - height: calc(100vh - 300px - 50px - 44px - 18px); // Remove the notification-bar height on iOS + //height: calc(100vh - 300px - 50px - 44px - 18px); // Remove the notification-bar height on iOS } - overflow: scroll; + //overflow: scroll; } .input { @@ -223,12 +223,12 @@ } } #tab-send-header { - height: 270px; + //height: 270px; } #tab-send-contacts { - height: calc(100vh - 270px - 50px - 44px); /* screen size - button container - bottom-tab-menu - header top */ + //height: calc(100vh - 270px - 50px - 44px); /* screen size - button container - bottom-tab-menu - header top */ &.ios { - height: calc(100vh - 270px - 50px - 44px - 18px); // Remove the notification-bar height on iOS + //height: calc(100vh - 270px - 50px - 44px - 18px); // Remove the notification-bar height on iOS } } } diff --git a/www/css/main.css b/www/css/main.css index 9845340ae..8602ba35d 100644 --- a/www/css/main.css +++ b/www/css/main.css @@ -11168,16 +11168,8 @@ qrcode { background-color: #fab915 !important; } #tab-send-header { - height: 300px; width: 100%; } -#tab-send-contacts { - height: calc(100vh - 300px - 50px - 44px); - /* screen size - button container - bottom-tab-menu - header top */ - overflow: scroll; } - #tab-send-contacts.ios { - height: calc(100vh - 300px - 50px - 44px - 18px); } - #tab-send .input { width: 100%; } #tab-send .input input { @@ -11358,14 +11350,7 @@ qrcode { #tab-send .send-wrapper .buttons .button-qr { height: 60px; } #tab-send .send-wrapper .buttons .button-qr span { - font-size: 16px; } - #tab-send #tab-send-header { - height: 270px; } - #tab-send #tab-send-contacts { - height: calc(100vh - 270px - 50px - 44px); - /* screen size - button container - bottom-tab-menu - header top */ } - #tab-send #tab-send-contacts.ios { - height: calc(100vh - 270px - 50px - 44px - 18px); } } + font-size: 16px; } } #wallet-origin-destination .header--request { padding: 30px 24px; @@ -15374,8 +15359,6 @@ log-options #check-bar .checkbox-icon { #view-review .fee-summary { position: absolute; bottom: 92px; } - #view-review .fee-summary-spacer { - height: 15px; } #view-review .shapeshift-banner, #view-review .bitpay-banner, #view-review .egifter-banner { box-shadow: none; } #view-review .warning { @@ -15551,31 +15534,28 @@ ion-content.padded-bottom-cta-with-summary { .fee-summary .amount .fee-crypto { color: #A7A7A7; } -.amount .start, -.amount .middle, -.amount .end, -.amount .currency { +.formatted-amount { display: inline-block; } - -.amount .start { - font-size: 1em; } - -.amount .middle { - font-size: 0.7857em; - margin-left: 5px; } - -.amount .end { - font-size: 0.7857em; - margin-left: 5px; } - -.amount.size-equal .middle, -.amount.size-equal .end { - font-size: 1em; } - -.amount .currency { - font-size: 1em; - margin-left: 5px; - text-transform: uppercase; } + .formatted-amount .start, + .formatted-amount .middle, + .formatted-amount .end, + .formatted-amount .currency { + display: inline-block; } + .formatted-amount .start { + font-size: 1em; } + .formatted-amount .middle { + font-size: 0.7857em; + margin-left: 5px; } + .formatted-amount .end { + font-size: 0.7857em; + margin-left: 5px; } + .formatted-amount.size-equal .middle, + .formatted-amount.size-equal .end { + font-size: 1em; } + .formatted-amount .currency { + font-size: 1em; + margin-left: 5px; + text-transform: uppercase; } /* This is for rules that don't yet have a home. * Our goal is to delete this file. Search the regex: /class=".*CLASS.*?"/ From a490f0ce1f42960fd87df7a3e561239fe5e42ee2 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Dominguez Date: Thu, 9 Aug 2018 13:06:52 +0900 Subject: [PATCH 205/256] dead code --- src/js/controllers/tab-send.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/js/controllers/tab-send.js b/src/js/controllers/tab-send.js index 911548455..81b3e4ca5 100644 --- a/src/js/controllers/tab-send.js +++ b/src/js/controllers/tab-send.js @@ -236,8 +236,6 @@ angular.module('copayApp.controllers').controller('tabSendController', function( $scope.displayBalanceAsFiat = _config.wallet.settings.priceDisplay === 'fiat'; }); - var state = sendFlowService.getState(); - if (data.direction == "back") { sendFlowService.clear(); } From 7ce562ec648746153ae86e95c989d7f791469baa Mon Sep 17 00:00:00 2001 From: Brendon Duncan Date: Thu, 9 Aug 2018 16:11:29 +1200 Subject: [PATCH 206/256] Fix for Shapeshift now appearing again on Review Transaction screen. --- src/js/controllers/review.controller.js | 8 +++----- src/js/controllers/shapeshift.js | 2 ++ 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/js/controllers/review.controller.js b/src/js/controllers/review.controller.js index 2b42339ce..0e5ceedce 100644 --- a/src/js/controllers/review.controller.js +++ b/src/js/controllers/review.controller.js @@ -88,11 +88,9 @@ function reviewController(addressbookService, bitcoinCashJsService, bitcore, bit coin = vm.originWallet.coin; if (sendFlowData.thirdParty) { - // vm.thirdParty = JSON.parse(sendFlowData.thirdParty); // Parse stringified JSON-object - if (vm.thirdParty) { - handleThirdPartyInitIfBip70(); - handleThirdPartyInitIfShapeshift(); - } + vm.thirdParty = sendFlowData.thirdParty; + handleThirdPartyInitIfBip70(); + handleThirdPartyInitIfShapeshift(); } configService.get(function onConfig(err, configCache) { diff --git a/src/js/controllers/shapeshift.js b/src/js/controllers/shapeshift.js index 4ede8a94f..3538ebe1a 100644 --- a/src/js/controllers/shapeshift.js +++ b/src/js/controllers/shapeshift.js @@ -69,6 +69,8 @@ angular.module('copayApp.controllers').controller('shapeshiftController', functi } }; + // Starting new send flow, so ensure everything is reset + sendFlowService.clear(); $state.go('tabs.home').then(function() { $ionicHistory.clearHistory(); $state.go('tabs.send').then(function() { From 0ea97fc1c61fa3860e2eed4b80c202b3503c3d64 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Dominguez Date: Thu, 9 Aug 2018 13:14:44 +0900 Subject: [PATCH 207/256] Fix state pop on the send flow --- src/js/controllers/review.controller.js | 1 - src/js/controllers/walletSelectorController.js | 16 +++++++++++----- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/src/js/controllers/review.controller.js b/src/js/controllers/review.controller.js index 2b42339ce..70a349b37 100644 --- a/src/js/controllers/review.controller.js +++ b/src/js/controllers/review.controller.js @@ -398,7 +398,6 @@ function reviewController(addressbookService, bitcoinCashJsService, bitcore, bit } function goBack() { - sendFlowService.popState(); $ionicHistory.goBack(); } diff --git a/src/js/controllers/walletSelectorController.js b/src/js/controllers/walletSelectorController.js index f4448486f..74ed874d4 100644 --- a/src/js/controllers/walletSelectorController.js +++ b/src/js/controllers/walletSelectorController.js @@ -7,9 +7,16 @@ angular.module('copayApp.controllers').controller('walletSelectorController', fu var unitDecimals = 0; var unitsFromSatoshis = 0; - $scope.$on("$ionicView.beforeEnter", function(event, data) { + $scope.$on("$ionicView.beforeEnter", onBeforeEnter); + $scope.$on("$ionicView.enter", onEnter); + + function onBeforeEnter(event, data) { console.log('walletSelector onBeforeEnter sendflow', sendFlowService.getState()); + if (data.direction == "back") { + sendFlowService.popState(); + } + var stateParams = sendFlowService.getState(); var config = configService.getSync().wallet.settings; @@ -51,9 +58,9 @@ angular.module('copayApp.controllers').controller('walletSelectorController', fu if ($scope.params.thirdParty) { $scope.thirdParty = $scope.params.thirdParty; } - }); + }; - $scope.$on("$ionicView.enter", function(event, data) { + function onEnter (event, data) { configService.whenAvailable(function(config) { $scope.selectedPriceDisplay = config.wallet.settings.priceDisplay; }); @@ -65,7 +72,7 @@ angular.module('copayApp.controllers').controller('walletSelectorController', fu prepareWalletLists(); formatRequestedAmount(); - }); + }; function formatRequestedAmount() { if ($scope.params.amount) { @@ -197,7 +204,6 @@ angular.module('copayApp.controllers').controller('walletSelectorController', fu }; $scope.goBack = function() { - sendFlowService.popState(); $ionicHistory.goBack(); } From 77f62100760a60fb46d2d3e578d86dc6f900c15b Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Dominguez Date: Thu, 9 Aug 2018 13:15:21 +0900 Subject: [PATCH 208/256] Fix pop state on the send flow --- src/js/controllers/amount.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/js/controllers/amount.js b/src/js/controllers/amount.js index d07f77c3f..b945be92c 100644 --- a/src/js/controllers/amount.js +++ b/src/js/controllers/amount.js @@ -68,6 +68,10 @@ function amountController(configService, $filter, gettextCatalog, $ionicHistory, function onBeforeEnter(event, data) { console.log('amount onBeforeEnter sendflow ', sendFlowService.getState()); + if (data.direction == "back") { + sendFlowService.popState(); + } + initCurrencies(); passthroughParams = sendFlowService; @@ -210,7 +214,6 @@ function amountController(configService, $filter, gettextCatalog, $ionicHistory, } function goBack() { - sendFlowService.popState(); $ionicHistory.goBack(); } From cbf66a2176224d8190d0eac14bb47a9c7983aaba Mon Sep 17 00:00:00 2001 From: Brendon Duncan Date: Thu, 9 Aug 2018 17:54:20 +1200 Subject: [PATCH 209/256] Fix for formatting amounts on Android 4.4. --- src/js/directives/formattedAmount.js | 48 ++++++++++++++++++++++++++-- 1 file changed, 45 insertions(+), 3 deletions(-) diff --git a/src/js/directives/formattedAmount.js b/src/js/directives/formattedAmount.js index d3e2e6347..c0c341631 100644 --- a/src/js/directives/formattedAmount.js +++ b/src/js/directives/formattedAmount.js @@ -33,10 +33,15 @@ angular.module('bitcoincom.directives') '8': ['BCH', 'BTC'] }; var localizeNumbers = function(x, minimumFractionDigits) { - return parseFloat(x).toLocaleString(uxLanguage.getCurrentLanguage(), { + var parsed = parseFloat(x); + var opts = { minimumFractionDigits: minimumFractionDigits, useGrouping: true - }); + }; + var lang = uxLanguage.getCurrentLanguage(); + var localized = parsed.toLocaleString(lang, opts); + var corrected = ensureEnoughFractionalDigits(localized, x, minimumFractionDigits); + return corrected; }; var buildAmount = function(start, middle, end) { @@ -61,7 +66,6 @@ angular.module('bitcoincom.directives') }; var formatNumbers = function() { - // During watch, may be changed from having a separate currency value, // to both being in value. Don't want to use previous currency value. // Try to extract currency from value.. @@ -128,6 +132,44 @@ angular.module('bitcoincom.directives') $scope.$watchGroup(['currency', 'value'], function onFormattedAmountWatch() { formatNumbers(); }); + + /** + * On Android 4.4, toLocaleString() only returns 3 fractional digits when 8 is specified. + */ + function ensureEnoughFractionalDigits(localizedString, number, desiredFractionDigits) { + if (desiredFractionDigits === 0) { + // Assume it is OK + return localizedString; + } + var fractionalRe = /^(\d*\D)(\d+)$/; + var match = fractionalRe.exec(localizedString); + if (match.length !== 3) { + // Don't know what's happening, just return what we have + return localizedString; + } + + var decimals = match[2]; + var decimalCount = decimals.length; + if (decimalCount >= desiredFractionDigits) { + // Everything is OK. + return localizedString; + } + + if (typeof number !== 'number') { + number = parseFloat(number); + } + + var fixed = number.toFixed(desiredFractionDigits); + var fixedMatch = fractionalRe.exec(fixed); + if (fixedMatch.length !== 3) { + // Don't know what's happening, just return what we have + return localizedString; + } + + // Keeps locale decimal separator. + var enough = match[1] + fixedMatch[2]; + return enough; + } }); } }; From c68b1e77f66f22458c476d8af07c63ff38fc6e40 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Dominguez Date: Thu, 9 Aug 2018 15:09:43 +0900 Subject: [PATCH 210/256] clean controller and remove old firebase event --- src/js/controllers/backup.js | 5 +++-- src/js/controllers/confirm.js | 4 +--- src/js/controllers/create.js | 4 ++-- src/js/controllers/tab-home.js | 4 +--- src/js/routes.js | 7 ++++++- src/js/services/firebaseEventsService.js | 2 +- 6 files changed, 14 insertions(+), 12 deletions(-) diff --git a/src/js/controllers/backup.js b/src/js/controllers/backup.js index 0eec71f12..6ec7089c6 100644 --- a/src/js/controllers/backup.js +++ b/src/js/controllers/backup.js @@ -1,7 +1,7 @@ 'use strict'; angular.module('copayApp.controllers').controller('backupController', - function($scope, $timeout, $log, $state, $stateParams, $ionicHistory, lodash, profileService, bwcService, walletService, ongoingProcess, popupService, gettextCatalog, $ionicModal, firebaseEventsService) { + function($scope, $timeout, $log, $state, $stateParams, $ionicHistory, lodash, profileService, bwcService, walletService, ongoingProcess, popupService, gettextCatalog, $ionicModal) { if ($state.current.name == 'onboarding.backup') { $scope.onboarding = true; @@ -89,7 +89,8 @@ angular.module('copayApp.controllers').controller('backupController', $scope.setFlow(2); }) } else { - firebaseEventsService.logEvent('backed_up_wallet'); + + //firebaseEventsService.logEvent('backed_up_wallet'); openConfirmBackupModal(); } }; diff --git a/src/js/controllers/confirm.js b/src/js/controllers/confirm.js index c98064fcc..76950df73 100644 --- a/src/js/controllers/confirm.js +++ b/src/js/controllers/confirm.js @@ -1,6 +1,6 @@ 'use strict'; -angular.module('copayApp.controllers').controller('confirmController', function($rootScope, $scope, $interval, $filter, $timeout, $ionicScrollDelegate, $ionicLoading, ionicToast, addressbookService, gettextCatalog, walletService, platformInfo, lodash, configService, $stateParams, $window, $state, $log, profileService, bitcore, bitcoreCash, txFormatService, ongoingProcess, $ionicModal, popupService, $ionicHistory, $ionicConfig, payproService, feeService, bitcoinCashJsService, bwcError, txConfirmNotification, externalLinkService, firebaseEventsService, soundService, clipboardService) { +angular.module('copayApp.controllers').controller('confirmController', function($rootScope, $scope, $interval, $timeout, $ionicScrollDelegate, $ionicLoading, ionicToast, addressbookService, gettextCatalog, walletService, platformInfo, lodash, configService, $state, $log, profileService, bitcore, bitcoreCash, txFormatService, ongoingProcess, $ionicModal, popupService, $ionicHistory, $ionicConfig, feeService, bitcoinCashJsService, bwcError, txConfirmNotification, soundService, clipboardService) { var countDown = null; var FEE_TOO_HIGH_LIMIT_PER = 15; @@ -708,8 +708,6 @@ angular.module('copayApp.controllers').controller('confirmController', function( }], [channel, "adjust"]); window.BitAnalytics.LogEventHandlers.postEvent(log); - // Should be removed - firebaseEventsService.logEvent('sent_bitcoin', { coin: $scope.wallet.coin }); $timeout(function() { $scope.$digest(); }, 100); diff --git a/src/js/controllers/create.js b/src/js/controllers/create.js index a25300a4a..a21053e2d 100644 --- a/src/js/controllers/create.js +++ b/src/js/controllers/create.js @@ -1,7 +1,7 @@ 'use strict'; angular.module('copayApp.controllers').controller('createController', - function($scope, $rootScope, $timeout, $log, lodash, $state, $ionicScrollDelegate, $ionicHistory, profileService, configService, gettextCatalog, ledger, trezor, intelTEE, derivationPathHelper, ongoingProcess, walletService, storageService, popupService, appConfigService, pushNotificationsService, firebaseEventsService, $ionicNavBarDelegate) { + function($scope, $timeout, $log, lodash, $state, $ionicScrollDelegate, $ionicHistory, profileService, configService, gettextCatalog, ledger, trezor, intelTEE, derivationPathHelper, ongoingProcess, walletService, popupService, appConfigService, pushNotificationsService, $ionicNavBarDelegate) { /* For compressed keys, m*73 + n*34 <= 496 */ var COPAYER_PAIR_LIMITS = { @@ -268,7 +268,7 @@ angular.module('copayApp.controllers').controller('createController', }, 100); } else { - firebaseEventsService.logEvent('wallet_created', { coin: opts.coin }); + //firebaseEventsService.logEvent('wallet_created', { coin: opts.coin }); $state.go('tabs.home'); } } diff --git a/src/js/controllers/tab-home.js b/src/js/controllers/tab-home.js index 3d63ae41f..32e320932 100644 --- a/src/js/controllers/tab-home.js +++ b/src/js/controllers/tab-home.js @@ -1,7 +1,7 @@ 'use strict'; angular.module('copayApp.controllers').controller('tabHomeController', - function($rootScope, sendFlowService, $timeout, $scope, $state, $stateParams, $ionicModal, $ionicScrollDelegate, $window, gettextCatalog, lodash, popupService, ongoingProcess, bannerService, externalLinkService, latestReleaseService, profileService, walletService, configService, $log, platformInfo, storageService, txpModalService, appConfigService, startupService, addressbookService, bwcError, nextStepsService, buyAndSellService, homeIntegrationsService, bitpayCardService, pushNotificationsService, timeService, bitcoincomService, pricechartService, firebaseEventsService, servicesService, shapeshiftService, $ionicNavBarDelegate, signVerifyMessageService) { + function($rootScope, sendFlowService, $timeout, $scope, $state, $stateParams, $ionicScrollDelegate, $window, gettextCatalog, lodash, popupService, ongoingProcess, bannerService, externalLinkService, latestReleaseService, profileService, walletService, configService, $log, platformInfo, storageService, txpModalService, appConfigService, startupService, addressbookService, bwcError, nextStepsService, buyAndSellService, homeIntegrationsService, bitpayCardService, pushNotificationsService, timeService, $ionicNavBarDelegate) { var wallet; var listeners = []; var notifications = []; @@ -98,8 +98,6 @@ angular.module('copayApp.controllers').controller('tabHomeController', } $scope.showServices = true; - pushNotificationsService.init(); - firebaseEventsService.init(); $timeout(function() { $ionicScrollDelegate.resize(); diff --git a/src/js/routes.js b/src/js/routes.js index 5dbcbe6a3..b5a9c91fe 100644 --- a/src/js/routes.js +++ b/src/js/routes.js @@ -1207,7 +1207,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr } }); }) - .run(function($rootScope, $state, $location, $log, $timeout, startupService, ionicToast, fingerprintService, $ionicHistory, $ionicPlatform, $window, appConfigService, lodash, platformInfo, profileService, uxLanguage, gettextCatalog, openURLService, storageService, scannerService, configService, emailService, /* plugins START HERE => */ buydotbitcoindotcomService, glideraService, amazonService, bitpayCardService, applicationService, mercadoLibreService, rateService) { + .run(function($rootScope, $state, $location, $log, $timeout, startupService, ionicToast, fingerprintService, $ionicHistory, $ionicPlatform, $window, appConfigService, lodash, platformInfo, profileService, uxLanguage, gettextCatalog, openURLService, storageService, scannerService, configService, emailService, /* plugins START HERE => */ buydotbitcoindotcomService, pushNotificationsService, glideraService, amazonService, bitpayCardService, applicationService, mercadoLibreService, rateService) { $ionicPlatform.ready(function() { @@ -1231,6 +1231,11 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr } }); + configService.whenAvailable(function(config) { + pushNotificationsService.init(); + }); + //firebaseEventsService.init(); + var channel = "ga"; if (platformInfo.isCordova) { channel = "firebase"; diff --git a/src/js/services/firebaseEventsService.js b/src/js/services/firebaseEventsService.js index d81e682d7..d6ce6f1cc 100644 --- a/src/js/services/firebaseEventsService.js +++ b/src/js/services/firebaseEventsService.js @@ -1,5 +1,5 @@ 'use strict'; -angular.module('copayApp.services').factory('firebaseEventsService', function firebaseEventsService($log, $state, $ionicHistory, sjcl, platformInfo, lodash, appConfigService, profileService, configService) { +angular.module('copayApp.services').factory('firebaseEventsService', function firebaseEventsService($log, platformInfo) { var root = {}; var useEvents = platformInfo.isCordova && !platformInfo.isWP; From b742eadd4e1f24329326ea7ca5711f1013d7bd61 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Dominguez Date: Thu, 9 Aug 2018 15:13:29 +0900 Subject: [PATCH 211/256] clean and remove bug home --- src/js/controllers/tab-home.js | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/src/js/controllers/tab-home.js b/src/js/controllers/tab-home.js index 32e320932..b6fec52d4 100644 --- a/src/js/controllers/tab-home.js +++ b/src/js/controllers/tab-home.js @@ -20,7 +20,12 @@ angular.module('copayApp.controllers').controller('tabHomeController', $scope.bannerUrl = ''; - $scope.$on("$ionicView.afterEnter", function() { + $scope.$on("$ionicView.beforeEnter", onBeforeEnter); + $scope.$on("$ionicView.enter", onEnter); + $scope.$on("$ionicView.afterEnter", onAfterEnter); + $scope.$on("$ionicView.leave", onLeave); + + function onAfterEnter () { startupService.ready(); bannerService.getBanner(function (banner) { @@ -28,9 +33,9 @@ angular.module('copayApp.controllers').controller('tabHomeController', $scope.bannerUrl = banner.url; $scope.bannerIsLoading = false; }); - }); + }; - $scope.$on("$ionicView.beforeEnter", function(event, data) { + function onBeforeEnter (event, data) { if (!$scope.homeTip) { storageService.getHomeTipAccepted(function(error, value) { @@ -52,11 +57,10 @@ angular.module('copayApp.controllers').controller('tabHomeController', } }); } - }); - - $scope.$on("$ionicView.enter", function(event, data) { + }; + + function onEnter(event, data) { $ionicNavBarDelegate.showBar(true); - updateAllWallets(); addressbookService.list(function(err, ab) { if (err) $log.error(err); @@ -104,13 +108,13 @@ angular.module('copayApp.controllers').controller('tabHomeController', $scope.$apply(); }, 10); }); - }); + }; - $scope.$on("$ionicView.leave", function(event, data) { + function onLeave (event, data) { lodash.each(listeners, function(x) { x(); }); - }); + }; $scope.createdWithinPastDay = function(time) { return timeService.withinPastDay(time); From 9076ad209809c5feef52c7690eab1ef6a0fa2676 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Dominguez Date: Thu, 9 Aug 2018 15:35:03 +0900 Subject: [PATCH 212/256] add update wallet --- src/js/controllers/tab-home.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/js/controllers/tab-home.js b/src/js/controllers/tab-home.js index b6fec52d4..51d500de7 100644 --- a/src/js/controllers/tab-home.js +++ b/src/js/controllers/tab-home.js @@ -61,6 +61,7 @@ angular.module('copayApp.controllers').controller('tabHomeController', function onEnter(event, data) { $ionicNavBarDelegate.showBar(true); + updateAllWallets(); addressbookService.list(function(err, ab) { if (err) $log.error(err); From 4cf68076a01a0b3e27ff9286113e8c3f5c330066 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Dominguez Date: Thu, 9 Aug 2018 15:35:31 +0900 Subject: [PATCH 213/256] remove comment on bitanalytics --- bitanalytics/bitanalytics.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/bitanalytics/bitanalytics.js b/bitanalytics/bitanalytics.js index c8c0d8870..d04b2a0bd 100644 --- a/bitanalytics/bitanalytics.js +++ b/bitanalytics/bitanalytics.js @@ -6256,7 +6256,6 @@ var ClickAction = /** @class */ (function (_super) { // Add event listener to all the elements found for (var i = 0; i < elements.length; i++) { var element = elements[i]; - console.log('init ' + this.name); element.addEventListener('click', this.listener); } }; @@ -6413,7 +6412,6 @@ var AdjustChannel = /** @class */ (function (_super) { _this.eventTypes = config.eventTypes; var os = _this.adjustedOs(config.os); _this.advertisingId = _this.getAdvertisingId(os); - console.log('Advertising ID for adjust: ' + _this.advertisingId); // TODO: Different initialisation for Cordova. var sessionParams = { app_version: config.appVersion, @@ -6656,7 +6654,7 @@ var MixpanelChannel = /** @class */ (function (_super) { function MixpanelChannel(name, config) { var _this = _super.call(this, name) || this; if (!config.token) { - throw new DOMException('[BitAnalytics] Config incorrect.'); + throw new Error('[BitAnalytics] Config incorrect.'); } _this.mixpanelInstance = mixpanel; mixpanel.init(config.token, config.config); @@ -7037,7 +7035,7 @@ var LogEventHandlers = /** @class */ (function () { _this.channels.push(channel); } catch (error) { - console.log('[BitAnalytics] ' + error.name + ': ' + error.message); + console.log(error.message); } }); }; From de33fe58681546f6929dd15d46852aaeebd68784 Mon Sep 17 00:00:00 2001 From: Brendon Duncan Date: Thu, 9 Aug 2018 18:58:21 +1200 Subject: [PATCH 214/256] Refactored formattedAmount. --- src/js/directives/formattedAmount.js | 333 ++++++++++++++------------- 1 file changed, 170 insertions(+), 163 deletions(-) diff --git a/src/js/directives/formattedAmount.js b/src/js/directives/formattedAmount.js index c0c341631..cbe288fa5 100644 --- a/src/js/directives/formattedAmount.js +++ b/src/js/directives/formattedAmount.js @@ -1,5 +1,6 @@ 'use strict'; +(function(){ /** * @desc amount directive that can be used to display formatted financial values * size-equal attribute is optional, defaults to false. @@ -10,168 +11,174 @@ * @example * @example */ -angular.module('bitcoincom.directives') - .directive('formattedAmount', function(uxLanguage) { - return { - restrict: 'E', - scope: { - value: '@', - currency: '@', - sizeEqual: '@' - }, - templateUrl: 'views/includes/formatted-amount.html', - controller: function($scope, $timeout) { - $scope.canShow = false; - - $scope.displaySizeEqual = !!$scope.sizeEqual; - - $timeout(function onFormattedAmountTimeout() { - - var decimalPlaces = { - '0': ['BIF', 'CLP', 'DJF', 'GNF', 'ILS', 'JPY', 'KMF', 'KRW', 'MGA', 'PYG', 'RWF', 'UGX', 'VND', 'VUV', 'XAF', 'XOF', 'XPF'], - '3': ['BHD', 'IQD', 'JOD', 'KWD', 'OMR', 'TND'], - '8': ['BCH', 'BTC'] - }; - var localizeNumbers = function(x, minimumFractionDigits) { - var parsed = parseFloat(x); - var opts = { - minimumFractionDigits: minimumFractionDigits, - useGrouping: true - }; - var lang = uxLanguage.getCurrentLanguage(); - var localized = parsed.toLocaleString(lang, opts); - var corrected = ensureEnoughFractionalDigits(localized, x, minimumFractionDigits); - return corrected; - }; - - var buildAmount = function(start, middle, end) { - $scope.start = start; - $scope.middle = middle; - $scope.end = end; - }; - - var getDecimalPlaces = function(currency) { - if (decimalPlaces['0'].indexOf(currency.toUpperCase()) > -1) return '0'; - if (decimalPlaces['3'].indexOf(currency.toUpperCase()) > -1) return '3'; - if (decimalPlaces['8'].indexOf(currency.toUpperCase()) > -1) return '8'; - return '2'; - }; - - var getDecimalSeparator = function() { - var testNum = 1.5; - var testString = testNum.toLocaleString(uxLanguage.getCurrentLanguage()); - // Some environments let you set decimal separators that are more than one character - var separator = /^1(.+)5$/.exec(testString)[1] - return separator; - }; - - var formatNumbers = function() { - // During watch, may be changed from having a separate currency value, - // to both being in value. Don't want to use previous currency value. - // Try to extract currency from value.. - var currencySplit = $scope.value.split(" "); - if (currencySplit.length === 2) { - $scope.currency = currencySplit[1]; - } - $scope.currency = $scope.currency || ''; - - - var parsed = parseFloat($scope.value); - var valueFormatted = ''; - var valueProcessing = ''; - switch (getDecimalPlaces($scope.currency)) { - case '0': - if (isNaN(parsed)) { - buildAmount('-', '', ''); - } else { - valueFormatted = localizeNumbers(Math.round(parsed), 0); - buildAmount(valueFormatted, '', ''); - } - break; - - case '3': - if (isNaN(parsed)) { - buildAmount('-' + getDecimalSeparator() + '---', '', ''); - } else { - valueProcessing = parsed.toFixed(3); - valueFormatted = localizeNumbers(valueProcessing, 3); - buildAmount(valueFormatted, '', ''); - } - break; - - case '8': - if (isNaN(parsed)) { - buildAmount('-' + getDecimalSeparator() + '---', '', ''); - } else if (parsed === 0) { - buildAmount('0', '', ''); - } else { - valueFormatted = parsed.toFixed(8); - valueFormatted = localizeNumbers(valueFormatted, 8); - var start = valueFormatted.slice(0, -5); - var middle = valueFormatted.slice(-5, -2); - var end = valueFormatted.substr(valueFormatted.length - 2); - buildAmount(start, middle, end); - - } - break; - - default: // 2 - if (isNaN(parsed)) { - buildAmount('-' + getDecimalSeparator() + '--', '', ''); - } else { - valueProcessing = parseFloat(parsed.toFixed(2)); - valueFormatted = localizeNumbers(valueProcessing, 2); - buildAmount(valueFormatted, '', ''); - } - break; - } - $scope.canShow = true; - }; - - formatNumbers(); - $scope.$watchGroup(['currency', 'value'], function onFormattedAmountWatch() { - formatNumbers(); - }); - - /** - * On Android 4.4, toLocaleString() only returns 3 fractional digits when 8 is specified. - */ - function ensureEnoughFractionalDigits(localizedString, number, desiredFractionDigits) { - if (desiredFractionDigits === 0) { - // Assume it is OK - return localizedString; - } - var fractionalRe = /^(\d*\D)(\d+)$/; - var match = fractionalRe.exec(localizedString); - if (match.length !== 3) { - // Don't know what's happening, just return what we have - return localizedString; - } - - var decimals = match[2]; - var decimalCount = decimals.length; - if (decimalCount >= desiredFractionDigits) { - // Everything is OK. - return localizedString; - } - - if (typeof number !== 'number') { - number = parseFloat(number); - } - - var fixed = number.toFixed(desiredFractionDigits); - var fixedMatch = fractionalRe.exec(fixed); - if (fixedMatch.length !== 3) { - // Don't know what's happening, just return what we have - return localizedString; - } - - // Keeps locale decimal separator. - var enough = match[1] + fixedMatch[2]; - return enough; - } - }); + angular + .module('bitcoincom.directives') + .directive('formattedAmount', function() { + return { + restrict: 'E', + scope: { + value: '@', + currency: '@', + sizeEqual: '@' + }, + templateUrl: 'views/includes/formatted-amount.html', + controller: formattedAmountController } - }; + }); + + function formattedAmountController($scope, $timeout, uxLanguage) { + $scope.canShow = false; + + $scope.displaySizeEqual = !!$scope.sizeEqual; + + $timeout(function onFormattedAmountTimeout() { + + var decimalPlaces = { + '0': ['BIF', 'CLP', 'DJF', 'GNF', 'ILS', 'JPY', 'KMF', 'KRW', 'MGA', 'PYG', 'RWF', 'UGX', 'VND', 'VUV', 'XAF', 'XOF', 'XPF'], + '3': ['BHD', 'IQD', 'JOD', 'KWD', 'OMR', 'TND'], + '8': ['BCH', 'BTC'] + }; + + formatNumbers(); + $scope.$watchGroup(['currency', 'value'], function onFormattedAmountWatch() { + formatNumbers(); + }); + + function buildAmount(start, middle, end) { + $scope.start = start; + $scope.middle = middle; + $scope.end = end; + }; + + /** + * On Android 4.4, toLocaleString() only returns 3 fractional digits when 8 is specified. + */ + function ensureEnoughFractionDigits(localizedString, number, desiredFractionDigits) { + if (desiredFractionDigits === 0) { + // Assume it is OK + return localizedString; + } + var fractionalRe = /^-*(\d*\D)(\d+)$/; + var match = fractionalRe.exec(localizedString); + if (!match || match.length !== 3) { + // Don't know what's happening, just return what we have + return localizedString; + } + + var decimals = match[2]; + var decimalCount = decimals.length; + if (decimalCount >= desiredFractionDigits) { + // Everything is OK. + return localizedString; + } + + if (typeof number !== 'number') { + number = parseFloat(number); + } + + var fixed = number.toFixed(desiredFractionDigits); + var fixedMatch = fractionalRe.exec(fixed); + if (!fixedMatch || fixedMatch.length !== 3) { + // Don't know what's happening, just return what we have + return localizedString; + } + + // Keeps locale decimal separator. + var enough = match[1] + fixedMatch[2]; + return enough; + } + + function formatNumbers() { + // During watch, may be changed from having a separate currency value, + // to both being in value. Don't want to use previous currency value. + // Try to extract currency from value.. + var currencySplit = $scope.value.split(" "); + if (currencySplit.length === 2) { + $scope.currency = currencySplit[1]; + } + $scope.currency = $scope.currency || ''; + + + var parsed = parseFloat($scope.value); + var valueFormatted = ''; + var valueProcessing = ''; + switch (getDecimalPlaces($scope.currency)) { + case '0': + if (isNaN(parsed)) { + buildAmount('-', '', ''); + } else { + valueFormatted = localizeNumbers(Math.round(parsed), 0); + buildAmount(valueFormatted, '', ''); + } + break; + + case '3': + if (isNaN(parsed)) { + buildAmount('-' + getDecimalSeparator() + '---', '', ''); + } else { + valueProcessing = parsed.toFixed(3); + valueFormatted = localizeNumbers(valueProcessing, 3); + buildAmount(valueFormatted, '', ''); + } + break; + + case '8': + if (isNaN(parsed)) { + buildAmount('-' + getDecimalSeparator() + '---', '', ''); + } else if (parsed === 0) { + buildAmount('0', '', ''); + } else { + valueFormatted = parsed.toFixed(8); + valueFormatted = localizeNumbers(valueFormatted, 8); + var start = valueFormatted.slice(0, -5); + var middle = valueFormatted.slice(-5, -2); + var end = valueFormatted.substr(valueFormatted.length - 2); + buildAmount(start, middle, end); + + } + break; + + default: // 2 + if (isNaN(parsed)) { + buildAmount('-' + getDecimalSeparator() + '--', '', ''); + } else { + valueProcessing = parseFloat(parsed.toFixed(2)); + valueFormatted = localizeNumbers(valueProcessing, 2); + buildAmount(valueFormatted, '', ''); + } + break; + } + $scope.canShow = true; + }; + + function getDecimalPlaces(currency) { + if (decimalPlaces['0'].indexOf(currency.toUpperCase()) > -1) return '0'; + if (decimalPlaces['3'].indexOf(currency.toUpperCase()) > -1) return '3'; + if (decimalPlaces['8'].indexOf(currency.toUpperCase()) > -1) return '8'; + return '2'; + }; + + function getDecimalSeparator() { + var testNum = 1.5; + var testString = testNum.toLocaleString(uxLanguage.getCurrentLanguage()); + // Some environments let you set decimal separators that are more than one character + var separator = /^1(.+)5$/.exec(testString)[1] + return separator; + }; + + function localizeNumbers(x, minimumFractionDigits) { + var parsed = parseFloat(x); + var opts = { + minimumFractionDigits: minimumFractionDigits, + useGrouping: true + }; + var lang = uxLanguage.getCurrentLanguage(); + var localized = parsed.toLocaleString(lang, opts); + var corrected = ensureEnoughFractionDigits(localized, x, minimumFractionDigits); + return corrected; + }; + + }); } -); \ No newline at end of file + +})(); \ No newline at end of file From ac8cdcf5be83bf28f87ed0f76b3308318cd92652 Mon Sep 17 00:00:00 2001 From: Brendon Duncan Date: Thu, 9 Aug 2018 18:59:03 +1200 Subject: [PATCH 215/256] Android 4.4 fix for Amount screen, removal of  . --- www/views/amount.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/www/views/amount.html b/www/views/amount.html index 57a8e46ce..bceda146f 100644 --- a/www/views/amount.html +++ b/www/views/amount.html @@ -37,14 +37,14 @@
- Available Funds: + Available Funds:
From 420305cf017555a82db7513feb1342500ea94e90 Mon Sep 17 00:00:00 2001 From: Sebastiaan Pasma Date: Thu, 9 Aug 2018 10:15:55 +0200 Subject: [PATCH 216/256] shapeshift moved to default services and communities fix --- src/js/controllers/tab-home.js | 4 ++-- src/js/services/servicesService.js | 7 ++++++- src/js/services/shapeshiftService.js | 12 ------------ 3 files changed, 8 insertions(+), 15 deletions(-) diff --git a/src/js/controllers/tab-home.js b/src/js/controllers/tab-home.js index 51d500de7..9a8c28b9a 100644 --- a/src/js/controllers/tab-home.js +++ b/src/js/controllers/tab-home.js @@ -1,7 +1,7 @@ 'use strict'; angular.module('copayApp.controllers').controller('tabHomeController', - function($rootScope, sendFlowService, $timeout, $scope, $state, $stateParams, $ionicScrollDelegate, $window, gettextCatalog, lodash, popupService, ongoingProcess, bannerService, externalLinkService, latestReleaseService, profileService, walletService, configService, $log, platformInfo, storageService, txpModalService, appConfigService, startupService, addressbookService, bwcError, nextStepsService, buyAndSellService, homeIntegrationsService, bitpayCardService, pushNotificationsService, timeService, $ionicNavBarDelegate) { + function($rootScope, $timeout, $scope, $state, $stateParams, $ionicModal, $ionicScrollDelegate, $window, gettextCatalog, lodash, popupService, ongoingProcess, bannerService, externalLinkService, latestReleaseService, profileService, walletService, configService, $log, platformInfo, sendFlowService, storageService, txpModalService, appConfigService, startupService, addressbookService, bwcError, nextStepsService, buyAndSellService, homeIntegrationsService, bitpayCardService, pushNotificationsService, timeService, bitcoincomService, pricechartService, firebaseEventsService, servicesService, shapeshiftService, $ionicNavBarDelegate, signVerifyMessageService) { var wallet; var listeners = []; var notifications = []; @@ -58,7 +58,7 @@ angular.module('copayApp.controllers').controller('tabHomeController', }); } }; - + function onEnter(event, data) { $ionicNavBarDelegate.showBar(true); updateAllWallets(); diff --git a/src/js/services/servicesService.js b/src/js/services/servicesService.js index f2344dd01..316009957 100644 --- a/src/js/services/servicesService.js +++ b/src/js/services/servicesService.js @@ -1,7 +1,12 @@ 'use strict' angular.module('copayApp.services').factory('servicesService', function(configService, $log, lodash) { var root = {}; - var services = []; + var services = [{ + name: 'shapeshift', + title: 'Shapeshift', + icon: 'icon-shapeshift', + sref: 'tabs.shapeshift', + }]; root.register = function(serviceInfo) { $log.info('Adding Services entry:' + serviceInfo.name); diff --git a/src/js/services/shapeshiftService.js b/src/js/services/shapeshiftService.js index 7cf6b4e03..1ce9672ce 100644 --- a/src/js/services/shapeshiftService.js +++ b/src/js/services/shapeshiftService.js @@ -137,17 +137,5 @@ angular.module('copayApp.services').factory('shapeshiftService', function ($http }); }; - var servicesItem = { - name: 'shapeshift', - title: 'Shapeshift', - icon: 'icon-shapeshift', - sref: 'tabs.shapeshift', - }; - - var register = function() { - servicesService.register(servicesItem); - }; - - register(); return root; }); From 25965f626874c5e1c2cc6d0ece67795682e5e4f5 Mon Sep 17 00:00:00 2001 From: Sebastiaan Pasma Date: Thu, 9 Aug 2018 10:17:29 +0200 Subject: [PATCH 217/256] shapeshift moved to default services and communities fix --- src/js/controllers/tab-home.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/js/controllers/tab-home.js b/src/js/controllers/tab-home.js index 9a8c28b9a..9c4f2bee9 100644 --- a/src/js/controllers/tab-home.js +++ b/src/js/controllers/tab-home.js @@ -1,7 +1,7 @@ 'use strict'; angular.module('copayApp.controllers').controller('tabHomeController', - function($rootScope, $timeout, $scope, $state, $stateParams, $ionicModal, $ionicScrollDelegate, $window, gettextCatalog, lodash, popupService, ongoingProcess, bannerService, externalLinkService, latestReleaseService, profileService, walletService, configService, $log, platformInfo, sendFlowService, storageService, txpModalService, appConfigService, startupService, addressbookService, bwcError, nextStepsService, buyAndSellService, homeIntegrationsService, bitpayCardService, pushNotificationsService, timeService, bitcoincomService, pricechartService, firebaseEventsService, servicesService, shapeshiftService, $ionicNavBarDelegate, signVerifyMessageService) { + function($rootScope, $timeout, $scope, $state, $stateParams, $ionicModal, $ionicScrollDelegate, $window, gettextCatalog, lodash, popupService, ongoingProcess, bannerService, communityService, externalLinkService, latestReleaseService, profileService, walletService, configService, $log, platformInfo, sendFlowService, storageService, txpModalService, appConfigService, startupService, addressbookService, bwcError, nextStepsService, buyAndSellService, homeIntegrationsService, bitpayCardService, pushNotificationsService, timeService, bitcoincomService, pricechartService, firebaseEventsService, servicesService, shapeshiftService, $ionicNavBarDelegate, signVerifyMessageService) { var wallet; var listeners = []; var notifications = []; From ee0042b6e7c6efe5442aa3f3885cd4ae1be2c7f2 Mon Sep 17 00:00:00 2001 From: Sebastiaan Pasma Date: Thu, 9 Aug 2018 13:39:27 +0200 Subject: [PATCH 218/256] sendMax bugfix when returning to previous screen --- src/js/controllers/amount.js | 14 ++++++++++---- src/js/controllers/review.controller.js | 2 +- www/views/amount.html | 2 +- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/src/js/controllers/amount.js b/src/js/controllers/amount.js index 73ebfd150..8e458045e 100644 --- a/src/js/controllers/amount.js +++ b/src/js/controllers/amount.js @@ -29,6 +29,7 @@ function amountController(configService, $filter, gettextCatalog, $ionicHistory, vm.finish = finish; vm.goBack = goBack; vm.loadMore = loadMore; + vm.next = next; vm.openPopup = openPopup; vm.pushDigit = pushDigit; vm.removeDigit = removeDigit; @@ -478,7 +479,7 @@ function amountController(configService, $filter, gettextCatalog, $ionicHistory, // Currency - var next = 10; + var nextCurrencies = 10; var completeAlternativeList = []; var popularCurrencyList = [ @@ -537,12 +538,17 @@ function amountController(configService, $filter, gettextCatalog, $ionicHistory, function loadMore() { $timeout(function() { - vm.altCurrencyList = completeAlternativeList.slice(0, next); - next += 10; + vm.altCurrencyList = completeAlternativeList.slice(0, nextCurrencies); + nextCurrencies += 10; vm.listComplete = vm.altCurrencyList.length >= completeAlternativeList.length; $scope.$broadcast('scroll.infiniteScrollComplete'); }, 100); - }; + } + + function next() { + useSendMax = false; + vm.finish(); + } function findCurrency(search) { if (!search) initCurrencies(); diff --git a/src/js/controllers/review.controller.js b/src/js/controllers/review.controller.js index a3b015348..afe3cd97d 100644 --- a/src/js/controllers/review.controller.js +++ b/src/js/controllers/review.controller.js @@ -223,7 +223,7 @@ function reviewController(addressbookService, bitcoinCashJsService, bitcore, bit // Grab stateParams tx = { amount: parseInt(sendFlowData.amount), - sendMax: sendFlowData.sendMax === 'true' ? true : false, + sendMax: sendFlowData.sendMax, fromWalletId: sendFlowData.fromWalletId, toAddress: sendFlowData.toAddress, paypro: txPayproData, diff --git a/www/views/amount.html b/www/views/amount.html index bceda146f..8d263eae3 100644 --- a/www/views/amount.html +++ b/www/views/amount.html @@ -90,7 +90,7 @@ +
From afb3a1d49fe7115cd339f19e7e13da370c668333 Mon Sep 17 00:00:00 2001 From: Brendon Duncan Date: Fri, 10 Aug 2018 12:46:00 +1200 Subject: [PATCH 221/256] wallet-balance directive displaying basic crypto balance. --- src/js/directives/walletBalanceDirective.js | 88 +++++++++++++++++++++ src/sass/components/components.scss | 1 + src/sass/components/wallet-balance.scss | 3 + www/views/includes/wallet-balance.html | 3 + www/views/tab-send.html | 3 +- 5 files changed, 97 insertions(+), 1 deletion(-) create mode 100644 src/js/directives/walletBalanceDirective.js create mode 100644 src/sass/components/wallet-balance.scss create mode 100644 www/views/includes/wallet-balance.html diff --git a/src/js/directives/walletBalanceDirective.js b/src/js/directives/walletBalanceDirective.js new file mode 100644 index 000000000..aaf9de99b --- /dev/null +++ b/src/js/directives/walletBalanceDirective.js @@ -0,0 +1,88 @@ +'use strict'; + +(function(){ + + angular + .module('bitcoincom.directives') + .directive('walletBalance', function() { + return { + restrict: 'E', + scope: { + displayAsFiat: '@', + totalBalanceSat: '@', + wallet: '@' + }, + templateUrl: 'views/includes/wallet-balance.html', + controller: walletBalanceController + } + }); + + function walletBalanceController($log, $scope, $timeout, uxLanguage) { + console.log('walletBalanceController'); + var cryptoBalanceHasBeenDisplayed = false; + + formatBalance(); + $scope.$watchGroup(['displayAsFiat', 'totalBalanceSat'], function onWalletBalanceWatch() { + formatBalance(); + }); + + function displayCryptoBalance(wallet) { + console.log('displayCryptoBalance()'); + if (wallet.status) { + if (wallet.status.totalBalanceStr) { + $scope.displayAmount = wallet.status.totalBalanceStr; + $scope.cachedBalanceUpdatedOn = ''; + console.log('Displaying wallet.status.totalBalanceStr'); + + } else if (wallet.status.cachedBalance) { + $scope.displayAmount = wallet.status.cachedBalance; + $scope.cachedBalanceUpdatedOn = wallet.status.cachedBalanceUpdatedOn; + console.log('Displaying wallet.status.cachedBalance'); + + } else { + $scope.displayAmount = ''; + $scope.cachedBalanceUpdatedOn = ''; + console.log('Displaying "" from status'); + } + } else if (wallet.cachedBalance) { + $scope.displayAmount = cachedBalance; + $scope.cachedBalanceUpdatedOn = ''; + console.log('Displaying cachedBalance'); + + } else { + $scope.displayAmount = ''; + $scope.cachedBalanceUpdatedOn = ''; + console.log('Displaying "" without status'); + } + cryptoBalanceHasBeenDisplayed = true; + } + + function displayFiatBalance(wallet) { + + } + + function formatBalance() { + //console.log('formatBalance() with wallet:', $scope.wallet,); + console.log('formatBalance() with displayAsFiat: "' + $scope.displayAsFiat + '"'); + var wallet = null; + try { + wallet = JSON.parse($scope.wallet); + } catch (e) { + $log.error('Error parsing wallet to display balance.', e); + $scope.displayAmount = ''; + $scope.cachedBalanceUpdatedOn = ''; + } + + if (!$scope.displayAsFiat || $scope.displayAsFiat && !cryptoBalanceHasBeenDisplayed) { + displayCryptoBalance(wallet); + } + + if ($scope.displayAsFiat) { + displayFiatBalance(wallet); + } + + + } + } +})(); + diff --git a/src/sass/components/components.scss b/src/sass/components/components.scss index fb53508b0..4d2bd695e 100644 --- a/src/sass/components/components.scss +++ b/src/sass/components/components.scss @@ -9,3 +9,4 @@ @import "expand-content"; @import "fee-summary"; @import "formatted-amount"; +@import "wallet-balance"; diff --git a/src/sass/components/wallet-balance.scss b/src/sass/components/wallet-balance.scss new file mode 100644 index 000000000..faf4e8611 --- /dev/null +++ b/src/sass/components/wallet-balance.scss @@ -0,0 +1,3 @@ +.wallet-balance-directive { + display: inline-block; +} \ No newline at end of file diff --git a/www/views/includes/wallet-balance.html b/www/views/includes/wallet-balance.html new file mode 100644 index 000000000..0cd1ee659 --- /dev/null +++ b/www/views/includes/wallet-balance.html @@ -0,0 +1,3 @@ +
+ {{displayAmount}}{{· (cachedBalanceUpdatedOn * 1000 | amTimeAgo)}} +
\ No newline at end of file diff --git a/www/views/tab-send.html b/www/views/tab-send.html index 3378b53ed..236c3db6f 100644 --- a/www/views/tab-send.html +++ b/www/views/tab-send.html @@ -16,8 +16,9 @@ >

{{fromWallet.name}}

+ - +
From 355ed27b87accb55bc22901366b57666649744ce Mon Sep 17 00:00:00 2001 From: Brendon Duncan Date: Fri, 10 Aug 2018 13:04:44 +1200 Subject: [PATCH 222/256] wallet balance directive displaying fiat balance from wallet status. --- src/js/directives/walletBalanceDirective.js | 62 ++++++++++++--------- www/views/includes/wallet-balance.html | 2 +- 2 files changed, 37 insertions(+), 27 deletions(-) diff --git a/src/js/directives/walletBalanceDirective.js b/src/js/directives/walletBalanceDirective.js index aaf9de99b..a13d30a98 100644 --- a/src/js/directives/walletBalanceDirective.js +++ b/src/js/directives/walletBalanceDirective.js @@ -28,37 +28,41 @@ function displayCryptoBalance(wallet) { console.log('displayCryptoBalance()'); - if (wallet.status) { - if (wallet.status.totalBalanceStr) { - $scope.displayAmount = wallet.status.totalBalanceStr; - $scope.cachedBalanceUpdatedOn = ''; - console.log('Displaying wallet.status.totalBalanceStr'); - } else if (wallet.status.cachedBalance) { - $scope.displayAmount = wallet.status.cachedBalance; - $scope.cachedBalanceUpdatedOn = wallet.status.cachedBalanceUpdatedOn; - console.log('Displaying wallet.status.cachedBalance'); - - } else { - $scope.displayAmount = ''; - $scope.cachedBalanceUpdatedOn = ''; - console.log('Displaying "" from status'); - } - } else if (wallet.cachedBalance) { - $scope.displayAmount = cachedBalance; - $scope.cachedBalanceUpdatedOn = ''; - console.log('Displaying cachedBalance'); - - } else { - $scope.displayAmount = ''; - $scope.cachedBalanceUpdatedOn = ''; - console.log('Displaying "" without status'); + if (wallet.status && wallet.status.totalBalanceStr) { + setDisplay(wallet.status.totalBalanceStr, ''); + cryptoBalanceHasBeenDisplayed = true; + return; } - cryptoBalanceHasBeenDisplayed = true; + + if (wallet.cachedBalance) { + setDisplay(wallet.cachedBalance, wallet.cachedBalanceUpdatedOn); + return; + } + + if (wallet.cachedStatus && wallet.cachedStatus.totalBalanceStr) { + setDisplay(wallet.cachedStatus.totalBalanceStr, ''); + return; + } + + setDisplay('', ''); } function displayFiatBalance(wallet) { - + var displayAmount = ''; + if (wallet.status && wallet.status.alternativeBalanceAvailable) { + displayAmount = wallet.status.totalBalanceAlternative + ' ' + wallet.status.alternativeIsoCode; + setDisplay(displayAmount, ''); + return; + } + + if (wallet.cachedStatus && wallet.cachedStatus.alternativeBalanceAvailable) { + displayAmount = wallet.cachedStatus.totalBalanceAlternative + ' ' + wallet.cachedStatus.alternativeIsoCode; + setDisplay(displayAmount, ''); + return; + } + + getFiatBalance(wallet); } function formatBalance() { @@ -80,8 +84,14 @@ if ($scope.displayAsFiat) { displayFiatBalance(wallet); } + } + function getFiatBalance(wallet) { + } + function setDisplay(amount, cachedBalanceUpdatedOn) { + $scope.displayAmount = amount; + $scope.cachedBalanceUpdatedOn = cachedBalanceUpdatedOn; } } })(); diff --git a/www/views/includes/wallet-balance.html b/www/views/includes/wallet-balance.html index 0cd1ee659..03baa8cac 100644 --- a/www/views/includes/wallet-balance.html +++ b/www/views/includes/wallet-balance.html @@ -1,3 +1,3 @@ -
+
{{displayAmount}}{{· (cachedBalanceUpdatedOn * 1000 | amTimeAgo)}}
\ No newline at end of file From d7285a72e46858c559e38180b118e93590ca07da Mon Sep 17 00:00:00 2001 From: Brendon Duncan Date: Fri, 10 Aug 2018 13:26:12 +1200 Subject: [PATCH 223/256] wallet-balance directive retrieves alternative amount when needed. --- src/js/directives/walletBalanceDirective.js | 26 +++++++++++++-------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/src/js/directives/walletBalanceDirective.js b/src/js/directives/walletBalanceDirective.js index a13d30a98..d318b370d 100644 --- a/src/js/directives/walletBalanceDirective.js +++ b/src/js/directives/walletBalanceDirective.js @@ -17,8 +17,7 @@ } }); - function walletBalanceController($log, $scope, $timeout, uxLanguage) { - console.log('walletBalanceController'); + function walletBalanceController($log, $scope, txFormatService) { var cryptoBalanceHasBeenDisplayed = false; formatBalance(); @@ -29,7 +28,7 @@ function displayCryptoBalance(wallet) { console.log('displayCryptoBalance()'); - if (wallet.status && wallet.status.totalBalanceStr) { + if (wallet.status && wallet.status.isValid && wallet.status.totalBalanceStr) { setDisplay(wallet.status.totalBalanceStr, ''); cryptoBalanceHasBeenDisplayed = true; return; @@ -40,7 +39,7 @@ return; } - if (wallet.cachedStatus && wallet.cachedStatus.totalBalanceStr) { + if (wallet.cachedStatus && wallet.status.isValid && wallet.cachedStatus.totalBalanceStr) { setDisplay(wallet.cachedStatus.totalBalanceStr, ''); return; } @@ -50,13 +49,13 @@ function displayFiatBalance(wallet) { var displayAmount = ''; - if (wallet.status && wallet.status.alternativeBalanceAvailable) { + if (wallet.status && wallet.status.isValid && wallet.status.alternativeBalanceAvailable) { displayAmount = wallet.status.totalBalanceAlternative + ' ' + wallet.status.alternativeIsoCode; setDisplay(displayAmount, ''); return; } - if (wallet.cachedStatus && wallet.cachedStatus.alternativeBalanceAvailable) { + if (wallet.cachedStatus && wallet.cachedStatus.isValid && wallet.cachedStatus.alternativeBalanceAvailable) { displayAmount = wallet.cachedStatus.totalBalanceAlternative + ' ' + wallet.cachedStatus.alternativeIsoCode; setDisplay(displayAmount, ''); return; @@ -66,15 +65,12 @@ } function formatBalance() { - //console.log('formatBalance() with wallet:', $scope.wallet,); - console.log('formatBalance() with displayAsFiat: "' + $scope.displayAsFiat + '"'); var wallet = null; try { wallet = JSON.parse($scope.wallet); } catch (e) { $log.error('Error parsing wallet to display balance.', e); - $scope.displayAmount = ''; - $scope.cachedBalanceUpdatedOn = ''; + setDisplay('', ''); } if (!$scope.displayAsFiat || $scope.displayAsFiat && !cryptoBalanceHasBeenDisplayed) { @@ -87,6 +83,16 @@ } function getFiatBalance(wallet) { + if (!(wallet.status && wallet.status.isValid)) { + $log.warn('Abandoning call to get fiat balance, because no valid wallet status.'); + return; + } + + txFormatService.formatAlternativeStr(wallet.coin, wallet.status.totalBalanceSat, function onFormatAlernativeStr(formatted) { + if (formatted) { + setDisplay(formatted, ''); + } + }); } function setDisplay(amount, cachedBalanceUpdatedOn) { From 82ede65363e42463926eb655b65d12e6b3f82a10 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Dominguez Date: Fri, 10 Aug 2018 10:43:54 +0900 Subject: [PATCH 224/256] New decimal on the review screen --- www/views/review.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/www/views/review.html b/www/views/review.html index 1eb648a01..db6d279d4 100644 --- a/www/views/review.html +++ b/www/views/review.html @@ -11,8 +11,8 @@

{{vm.sendingTitle}}

-

{{vm.primaryAmount}} {{vm.primaryCurrency}}

-

{{vm.secondaryAmount}} {{vm.secondaryCurrency}}

+

+

From 82c0746ff808555e040f6e5b2a11eb5b7b63c57a Mon Sep 17 00:00:00 2001 From: Brendon Duncan Date: Fri, 10 Aug 2018 13:48:59 +1200 Subject: [PATCH 225/256] wallet-balance directive uses formatted-amount. --- src/js/directives/walletBalanceDirective.js | 6 ++++-- www/views/includes/wallet-balance.html | 2 +- www/views/tab-send.html | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/js/directives/walletBalanceDirective.js b/src/js/directives/walletBalanceDirective.js index d318b370d..5b2a41b6c 100644 --- a/src/js/directives/walletBalanceDirective.js +++ b/src/js/directives/walletBalanceDirective.js @@ -65,19 +65,21 @@ } function formatBalance() { + var displayAsFiat = $scope.displayAsFiat === 'true'; var wallet = null; try { wallet = JSON.parse($scope.wallet); } catch (e) { $log.error('Error parsing wallet to display balance.', e); setDisplay('', ''); + return; } - if (!$scope.displayAsFiat || $scope.displayAsFiat && !cryptoBalanceHasBeenDisplayed) { + if (!displayAsFiat || displayAsFiat && !cryptoBalanceHasBeenDisplayed) { displayCryptoBalance(wallet); } - if ($scope.displayAsFiat) { + if (displayAsFiat) { displayFiatBalance(wallet); } } diff --git a/www/views/includes/wallet-balance.html b/www/views/includes/wallet-balance.html index 03baa8cac..0818bf343 100644 --- a/www/views/includes/wallet-balance.html +++ b/www/views/includes/wallet-balance.html @@ -1,3 +1,3 @@
- {{displayAmount}}{{· (cachedBalanceUpdatedOn * 1000 | amTimeAgo)}} + {{· (cachedBalanceUpdatedOn * 1000 | amTimeAgo)}}
\ No newline at end of file diff --git a/www/views/tab-send.html b/www/views/tab-send.html index 236c3db6f..a4051b8f1 100644 --- a/www/views/tab-send.html +++ b/www/views/tab-send.html @@ -16,7 +16,7 @@ >

{{fromWallet.name}}

- +
From b70bd804dc09c40b430daf9664da1d2ec359c7dc Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Dominguez Date: Fri, 10 Aug 2018 10:56:01 +0900 Subject: [PATCH 226/256] crypto decimal --- www/views/review.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/www/views/review.html b/www/views/review.html index db6d279d4..f2970da51 100644 --- a/www/views/review.html +++ b/www/views/review.html @@ -89,7 +89,7 @@
Fee: Less than 1 cent
Fee: {{vm.feeFiat}} {{vm.feeCurrency}}
- {{vm.feeCrypto}} {{vm.origin.currency}} +
From 4c9ff1b28b65323e285a8d5fbf1d702f18820e0f Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Dominguez Date: Fri, 10 Aug 2018 11:11:53 +0900 Subject: [PATCH 227/256] Handle error in the review screen --- src/js/controllers/review.controller.js | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/src/js/controllers/review.controller.js b/src/js/controllers/review.controller.js index afe3cd97d..d41d4a9b0 100644 --- a/src/js/controllers/review.controller.js +++ b/src/js/controllers/review.controller.js @@ -116,7 +116,9 @@ function reviewController(addressbookService, bitcoinCashJsService, bitcore, bit if (!tx || !vm.originWallet) return; if (vm.paymentExpired) { - popupService.showAlert(null, gettextCatalog.getString('This bitcoin payment request has expired.')); + popupService.showAlert(null, gettextCatalog.getString('This bitcoin payment request has expired.', function () { + $ionicHistory.goBack(); + })); vm.sendStatus = ''; $timeout(function() { $scope.$apply(); @@ -486,20 +488,26 @@ function reviewController(addressbookService, bitcoinCashJsService, bitcore, bit walletService.getAddress(vm.originWallet, false, function onReturnWalletAddress(err, returnAddr) { if (err) { ongoingProcess.set('connectingShapeshift', false); - popupService.showAlert(gettextCatalog.getString('Shapeshift Error'), err.toString()); + popupService.showAlert(gettextCatalog.getString('Shapeshift Error'), err.toString(), function () { + $ionicHistory.goBack(); + }); return; } walletService.getAddress(toWallet, false, function onWithdrawalWalletAddress(err, withdrawalAddr) { if (err) { ongoingProcess.set('connectingShapeshift', false); - popupService.showAlert(gettextCatalog.getString('Shapeshift Error'), err.toString()); + popupService.showAlert(gettextCatalog.getString('Shapeshift Error'), err.toString(), function () { + $ionicHistory.goBack(); + }); return; } shapeshiftService.shiftIt(vm.originWallet.coin, toWallet.coin, withdrawalAddr, returnAddr, function onShiftIt(err, shapeshiftData) { if (err && err != null) { ongoingProcess.set('connectingShapeshift', false); - popupService.showAlert(gettextCatalog.getString('Shapeshift Error'), err.toString()); + popupService.showAlert(gettextCatalog.getString('Shapeshift Error'), err.toString(), function () { + $ionicHistory.goBack(); + }); } else { vm.memo = 'ShapeShift Order:\nhttps://www.shapeshift.io/#/status/' + shapeshiftData.orderId; vm.memoExpanded = !!vm.memo; @@ -640,7 +648,9 @@ function reviewController(addressbookService, bitcoinCashJsService, bitcore, bit $timeout(function() { $scope.$apply(); }); - popupService.showAlert(gettextCatalog.getString('Error at confirm'), bwcError.msg(msg)); + popupService.showAlert(gettextCatalog.getString('Error at confirm'), bwcError.msg(msg), function () { + $ionicHistory.goBack(); + }); }; function setupTx(tx) { @@ -825,7 +835,9 @@ function reviewController(addressbookService, bitcoinCashJsService, bitcore, bit if (tx.sendMax && sendMaxInfo.amount == 0) { ongoingProcess.set('calculatingFee', false); setNotReady(gettextCatalog.getString('Insufficient confirmed funds')); - popupService.showAlert(gettextCatalog.getString('Error'), gettextCatalog.getString('Not enough funds for fee')); + popupService.showAlert(gettextCatalog.getString('Error'), gettextCatalog.getString('Not enough funds for fee'), function () { + $ionicHistory.goBack(); + }); return cb('no_funds'); } From 18c8f4cf07929d0cab601964ded35f7cf2ff78f5 Mon Sep 17 00:00:00 2001 From: Brendon Duncan Date: Fri, 10 Aug 2018 14:17:42 +1200 Subject: [PATCH 228/256] formatted-amount for transaction proposals and wallet activity. --- www/views/includes/txp.html | 2 +- www/views/includes/walletActivity.html | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/www/views/includes/txp.html b/www/views/includes/txp.html index 4a1f07aaf..82391bfa2 100644 --- a/www/views/includes/txp.html +++ b/www/views/includes/txp.html @@ -24,7 +24,7 @@ (possible double spend) - – {{tx.amountStr}} + –
diff --git a/www/views/includes/walletActivity.html b/www/views/includes/walletActivity.html index 3a2b78ab1..e1fdb504f 100644 --- a/www/views/includes/walletActivity.html +++ b/www/views/includes/walletActivity.html @@ -10,7 +10,7 @@
Payment Sent
- {{notification.amountStr}} +
@@ -19,7 +19,7 @@
Payment Received
- {{notification.amountStr}} +
@@ -27,7 +27,7 @@ Proposal Deleted: {{notification.message}}
- {{notification.amountStr}}: + :
@@ -35,7 +35,7 @@ Proposal Rejected: {{notification.message}}
- {{notification.amountStr}}: + :
@@ -43,7 +43,7 @@ New Proposal: {{notification.message}}
- {{notification.amountStr}} +
@@ -51,7 +51,7 @@ Proposal Accepted: {{notification.message}}
- {{notification.amountStr}} +
From 0410ad149109f7e458f11d6f1c2f81d3eacc2c35 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Dominguez Date: Fri, 10 Aug 2018 11:21:29 +0900 Subject: [PATCH 229/256] Add tracking shapeshift --- src/js/routes.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/js/routes.js b/src/js/routes.js index b5a9c91fe..d2b78aac3 100644 --- a/src/js/routes.js +++ b/src/js/routes.js @@ -1277,6 +1277,13 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr }); window.BitAnalytics.ActionHandlers.trackAction(actionTabOpen); + var actionShapeShiftStart = new window.BitAnalytics.ActionFactory.createAction('click', { + name: 'shapeshift_start_click', + class: 'track_shapeshift_start_click', + channels: [channel] + }); + window.BitAnalytics.ActionHandlers.trackAction(actionShapeShiftStart); + // Init language uxLanguage.init(function (lang) { From 4dd334087b6f84537c3e7d05a772acd5279a2df3 Mon Sep 17 00:00:00 2001 From: Brendon Duncan Date: Fri, 10 Aug 2018 14:24:41 +1200 Subject: [PATCH 230/256] Removed formatted amount from the entry of the Amount screen as it was causing a bug. --- www/views/amount.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/www/views/amount.html b/www/views/amount.html index 8d263eae3..ab56052ab 100644 --- a/www/views/amount.html +++ b/www/views/amount.html @@ -16,12 +16,12 @@
- + {{vm.amount || '0'}} {{vm.unit}}
- + {{vm.alternativeAmount || '0.00'}} {{vm.alternativeUnit}}
From 8d404f19081d93169d72632386ea087a42be2185 Mon Sep 17 00:00:00 2001 From: Brendon Duncan Date: Fri, 10 Aug 2018 16:19:24 +1200 Subject: [PATCH 231/256] Handle null wallet. --- src/js/directives/walletBalanceDirective.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/js/directives/walletBalanceDirective.js b/src/js/directives/walletBalanceDirective.js index 5b2a41b6c..4c42a42f9 100644 --- a/src/js/directives/walletBalanceDirective.js +++ b/src/js/directives/walletBalanceDirective.js @@ -66,6 +66,11 @@ function formatBalance() { var displayAsFiat = $scope.displayAsFiat === 'true'; + if (!$scope.wallet) { + setDisplay('', ''); + return; + } + var wallet = null; try { wallet = JSON.parse($scope.wallet); From 3ff0f50a7b5de1e49a89661268a37dccc2fbaaa3 Mon Sep 17 00:00:00 2001 From: Brendon Duncan Date: Fri, 10 Aug 2018 16:20:26 +1200 Subject: [PATCH 232/256] Added quotes. --- 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 a4051b8f1..43918cac8 100644 --- a/www/views/tab-send.html +++ b/www/views/tab-send.html @@ -16,7 +16,7 @@ >

{{fromWallet.name}}

- +
From ee84235d3adf8e149bdf8769877359ce0e5c14b0 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Dominguez Date: Fri, 10 Aug 2018 14:05:46 +0900 Subject: [PATCH 233/256] Top bar message --- src/js/controllers/walletSelectorController.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/js/controllers/walletSelectorController.js b/src/js/controllers/walletSelectorController.js index 74ed874d4..89d77cc3e 100644 --- a/src/js/controllers/walletSelectorController.js +++ b/src/js/controllers/walletSelectorController.js @@ -34,6 +34,9 @@ angular.module('copayApp.controllers').controller('walletSelectorController', fu } break; default: + if (!stateParams.thirdParty) { + $scope.sendFlowTitle = gettextCatalog.getString('Send'); + } // nop } From 812ed5f1cd772c6b03191d16c819f9dd814bc265 Mon Sep 17 00:00:00 2001 From: Brendon Duncan Date: Fri, 10 Aug 2018 17:13:24 +1200 Subject: [PATCH 234/256] wallet-balance workaround for wallet not being stringify-able, and hence not being interpolatable, and hence not being able to pass it to the directive. --- src/js/directives/walletBalanceDirective.js | 55 ++++++++++++--------- www/views/tab-send.html | 8 ++- 2 files changed, 39 insertions(+), 24 deletions(-) diff --git a/src/js/directives/walletBalanceDirective.js b/src/js/directives/walletBalanceDirective.js index 4c42a42f9..1fea59203 100644 --- a/src/js/directives/walletBalanceDirective.js +++ b/src/js/directives/walletBalanceDirective.js @@ -10,7 +10,12 @@ scope: { displayAsFiat: '@', totalBalanceSat: '@', - wallet: '@' + // The Wallet object is sometimes not stringify()-able, so not interpolatable, + // so can't be passed to a directive. + walletStatus: '@', + walletCachedBalance: '@', + walletCachedBalanceUpdatedOn: '@', + walletCachedStatus: '@' }, templateUrl: 'views/includes/wallet-balance.html', controller: walletBalanceController @@ -25,38 +30,38 @@ formatBalance(); }); - function displayCryptoBalance(wallet) { + function displayCryptoBalance(walletStatus, walletCachedBalance, walletCachedBalanceUpdatedOn, walletCachedStatus) { console.log('displayCryptoBalance()'); - if (wallet.status && wallet.status.isValid && wallet.status.totalBalanceStr) { - setDisplay(wallet.status.totalBalanceStr, ''); + if (walletStatus && walletStatus.isValid && walletStatus.totalBalanceStr) { + setDisplay(walletStatus.totalBalanceStr, ''); cryptoBalanceHasBeenDisplayed = true; return; } - if (wallet.cachedBalance) { - setDisplay(wallet.cachedBalance, wallet.cachedBalanceUpdatedOn); + if (walletCachedBalance) { + setDisplay(walletCachedBalance, walletCachedBalanceUpdatedOn); return; } - if (wallet.cachedStatus && wallet.status.isValid && wallet.cachedStatus.totalBalanceStr) { - setDisplay(wallet.cachedStatus.totalBalanceStr, ''); + if (walletCachedStatus && walletCachedStatus.isValid && walletCachedStatus.totalBalanceStr) { + setDisplay(walletCachedStatus.totalBalanceStr, ''); return; } setDisplay('', ''); } - function displayFiatBalance(wallet) { + function displayFiatBalance(walletStatus, walletCachedStatus) { var displayAmount = ''; - if (wallet.status && wallet.status.isValid && wallet.status.alternativeBalanceAvailable) { - displayAmount = wallet.status.totalBalanceAlternative + ' ' + wallet.status.alternativeIsoCode; + if (walletStatus && walletStatus.isValid && walletStatus.alternativeBalanceAvailable) { + displayAmount = walletStatus.totalBalanceAlternative + ' ' + walletStatus.alternativeIsoCode; setDisplay(displayAmount, ''); return; } - if (wallet.cachedStatus && wallet.cachedStatus.isValid && wallet.cachedStatus.alternativeBalanceAvailable) { - displayAmount = wallet.cachedStatus.totalBalanceAlternative + ' ' + wallet.cachedStatus.alternativeIsoCode; + if (walletCachedStatus && walletCachedStatus.isValid && walletCachedStatus.alternativeBalanceAvailable) { + displayAmount = walletCachedStatus.totalBalanceAlternative + ' ' + walletCachedStatus.alternativeIsoCode; setDisplay(displayAmount, ''); return; } @@ -66,26 +71,30 @@ function formatBalance() { var displayAsFiat = $scope.displayAsFiat === 'true'; - if (!$scope.wallet) { - setDisplay('', ''); - return; + + var walletStatusObj = null; + var walletCachedBalance = null; + var walletCachedBalanceUpdatedOn = null; + var walletCachedStatusObj = null; + + try { + walletStatusObj = JSON.parse($scope.walletStatus); + } catch (e) { + $log.warn('Failed to parse walletStatus.', e); } - var wallet = null; try { - wallet = JSON.parse($scope.wallet); + walletCachedStatusObj = JSON.parse($scope.walletCachedStatus); } catch (e) { - $log.error('Error parsing wallet to display balance.', e); - setDisplay('', ''); - return; + $log.warn('Failed to parse walletCachedStatus.', e); } if (!displayAsFiat || displayAsFiat && !cryptoBalanceHasBeenDisplayed) { - displayCryptoBalance(wallet); + displayCryptoBalance(walletStatusObj, walletCachedBalance, walletCachedBalanceUpdatedOn, walletCachedStatusObj); } if (displayAsFiat) { - displayFiatBalance(wallet); + displayFiatBalance(walletStatusObj, walletCachedStatusObj); } } diff --git a/www/views/tab-send.html b/www/views/tab-send.html index 43918cac8..339ac3556 100644 --- a/www/views/tab-send.html +++ b/www/views/tab-send.html @@ -16,7 +16,13 @@ >

{{fromWallet.name}}

- +
From d88d3365ad746e976a8cb9aa48b86096f77b6ba5 Mon Sep 17 00:00:00 2001 From: Brendon Duncan Date: Fri, 10 Aug 2018 19:09:55 +1200 Subject: [PATCH 235/256] Fix for long amounts on iPhone 5 / SE. Fix for buttons below amounts on iPhone 5 / SE. --- src/sass/views/amount.scss | 60 +++++++++++++++++++++----------------- www/views/amount.html | 27 +++++++++-------- 2 files changed, 48 insertions(+), 39 deletions(-) diff --git a/src/sass/views/amount.scss b/src/sass/views/amount.scss index ca32c6ac4..bf4d3506a 100644 --- a/src/sass/views/amount.scss +++ b/src/sass/views/amount.scss @@ -305,7 +305,8 @@ &.very-long { input, .unit, .primary-amount-display { - font-size: 0.9em; + font-size: 1.2em; // OK for iPhone 5 / SE with BCH to 8dp + @media (min-width: 375px) { font-size: 1.3em; @@ -382,41 +383,46 @@ .available-funds { color: #6F6F70; + text-align: left; + } + + .change-currency { + text-align: right; } .warning { color: $v-warning-color-2; } - .extra, - button.extra { - /*display: flex;*/ - flex: 0 1 auto; - } - - button.extra { - background: none; - border: none; - color: #000; - font-family: 'ProximaNova'; - font-size: 14px; + .extra { + flex: 1; line-height: normal; - min-height: auto; - min-width: auto; - padding: 0; - } - .button .icon:before { - font-size: 14px; - line-height: normal; - } - + .button { + background: none; + border: none; + border-radius: 0; + color: #000; + font-family: 'ProximaNova'; + font-size: 14px; + line-height: normal; + min-height: auto; + min-width: auto; + padding: 0; + } - .button { - span { - display: flex; - align-items: center; - justify-content: center; + .button .icon:before { + font-size: 14px; + line-height: normal; + } + + + .button { + span { + display: flex; + align-items: center; + justify-content: center; + } } } } diff --git a/www/views/amount.html b/www/views/amount.html index 8d263eae3..b69431b6b 100644 --- a/www/views/amount.html +++ b/www/views/amount.html @@ -14,14 +14,14 @@
+ ng-class="{long: vm.amount.length > 5, 'very-long': vm.amount.length > 8}"> - + {{vm.amount || '0'}} {{vm.unit}}
- + {{vm.alternativeAmount || '0.00'}} {{vm.alternativeUnit}}
@@ -34,17 +34,20 @@
- -
+ +
+
- Available Funds: + Available Funds: +
From 9e118350007d5231348c4e8d1dbe7ef7231bfd37 Mon Sep 17 00:00:00 2001 From: Brendon Duncan Date: Fri, 10 Aug 2018 19:45:43 +1200 Subject: [PATCH 236/256] Equal sized digits on Wallet Details alternative balance. --- www/views/walletDetails.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/www/views/walletDetails.html b/www/views/walletDetails.html index 2480099b5..6e05862aa 100644 --- a/www/views/walletDetails.html +++ b/www/views/walletDetails.html @@ -46,7 +46,7 @@ class="size-14 amount-alternative" ng-if="status.totalBalanceStr && wallet.network == 'livenet'" ng-style="{opacity: altAmountOpacity}"> - +
From 9e28c4ec4539a32bfa33b90ef005b3bfc357a0ae Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Dominguez Date: Fri, 10 Aug 2018 17:20:04 +0900 Subject: [PATCH 237/256] Fix bug send max with thirdparty (Shapeshift) --- src/js/controllers/amount.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/js/controllers/amount.js b/src/js/controllers/amount.js index 8e458045e..00c9461f5 100644 --- a/src/js/controllers/amount.js +++ b/src/js/controllers/amount.js @@ -464,7 +464,7 @@ function amountController(configService, $filter, gettextCatalog, $ionicHistory, }; if (vm.thirdParty) { - confirmData['thirdParty'] = this.thirdParty; + confirmData.thirdParty = vm.thirdParty; } sendFlowService.pushState(confirmData); From dd75f581e7d068d8e0582bf6509d8e72535addca Mon Sep 17 00:00:00 2001 From: Sebastiaan Pasma Date: Fri, 10 Aug 2018 10:47:16 +0200 Subject: [PATCH 238/256] move stateParams and fromWallet outside of the clipboar function --- src/js/controllers/tab-send.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/js/controllers/tab-send.js b/src/js/controllers/tab-send.js index 81b3e4ca5..3f1da01fc 100644 --- a/src/js/controllers/tab-send.js +++ b/src/js/controllers/tab-send.js @@ -28,14 +28,15 @@ angular.module('copayApp.controllers').controller('tabSendController', function( }; $scope.$on("$ionicView.enter", function(event, data) { + + var stateParams = sendFlowService.getState(); + $scope.fromWallet = profileService.getWallet(stateParams.fromWalletId); + clipboardService.readFromClipboard(function(text) { if (text.length > 200) { text = text.substring(0, 200); } - var stateParams = sendFlowService.getState(); - $scope.fromWallet = profileService.getWallet(stateParams.fromWalletId); - $scope.clipboardHasAddress = false; $scope.clipboardHasContent = false; if ((text.indexOf('bitcoincash:') === 0 || text[0] === 'C' || text[0] === 'H' || text[0] === 'p' || text[0] === 'q') && text.replace('bitcoincash:', '').length === 42) { // CashAddr From 3365a61d6234c72fcfdddd0dd6e434a97ad6e59f Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Dominguez Date: Fri, 10 Aug 2018 17:47:21 +0900 Subject: [PATCH 239/256] invalidate cache --- src/js/controllers/tab-home.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/js/controllers/tab-home.js b/src/js/controllers/tab-home.js index 9c4f2bee9..318fcece2 100644 --- a/src/js/controllers/tab-home.js +++ b/src/js/controllers/tab-home.js @@ -214,6 +214,7 @@ angular.module('copayApp.controllers').controller('tabHomeController', var j = 0; lodash.each(wallets, function(wallet) { + walletService.invalidateCache(wallet); // Temporary solution, to have the good balance, when we ask to reload the wallets. walletService.getStatus(wallet, {}, function(err, status) { if (err) { From 5185c6ee3ccb579064e29c8f42ad57d3320a9904 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Dominguez Date: Fri, 10 Aug 2018 18:41:47 +0900 Subject: [PATCH 240/256] Fix amount --- src/js/directives/formattedAmount.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/js/directives/formattedAmount.js b/src/js/directives/formattedAmount.js index 1a05fd360..9f70b37ed 100644 --- a/src/js/directives/formattedAmount.js +++ b/src/js/directives/formattedAmount.js @@ -90,7 +90,7 @@ // to both being in value. Don't want to use previous currency value. // Try to extract currency from value.. var currencySplit = $scope.value.split(" "); - if (currencySplit.length === 2) { + if (currencySplit.length === 2 && !$scope.currency) { $scope.currency = currencySplit[1]; } $scope.currency = $scope.currency || ''; From daf9bb535653cedec9f5ea1c484d10fcf42ddf2e Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Dominguez Date: Fri, 10 Aug 2018 18:43:28 +0900 Subject: [PATCH 241/256] Notify to reload home tab --- src/js/controllers/tab-receive.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/js/controllers/tab-receive.js b/src/js/controllers/tab-receive.js index 190f1b752..c822b4521 100644 --- a/src/js/controllers/tab-receive.js +++ b/src/js/controllers/tab-receive.js @@ -158,6 +158,10 @@ angular.module('copayApp.controllers').controller('tabReceiveController', functi soundService.play('misc/payment_received.mp3'); } + // Notify new tx + $scope.$emit('bwsEvent', $scope.wallet.id); + + $scope.$apply(function () { $scope.showingPaymentReceived = true; }); From 949cbc76979d6ec964594c97cd5630d6b647c879 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Dominguez Date: Fri, 10 Aug 2018 19:04:53 +0900 Subject: [PATCH 242/256] Cleaning code --- src/js/controllers/walletSelectorController.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/js/controllers/walletSelectorController.js b/src/js/controllers/walletSelectorController.js index 89d77cc3e..ba5b4c418 100644 --- a/src/js/controllers/walletSelectorController.js +++ b/src/js/controllers/walletSelectorController.js @@ -17,7 +17,7 @@ angular.module('copayApp.controllers').controller('walletSelectorController', fu sendFlowService.popState(); } - var stateParams = sendFlowService.getState(); + $scope.params = sendFlowService.getState(); var config = configService.getSync().wallet.settings; priceDisplayAsFiat = config.priceDisplay === 'fiat'; @@ -29,18 +29,17 @@ angular.module('copayApp.controllers').controller('walletSelectorController', fu $scope.sendFlowTitle = gettextCatalog.getString('Wallet to Wallet Transfer'); break; case 'tabs.send.destination': - if (stateParams.fromWalletId) { + if ($scope.params.fromWalletId) { $scope.sendFlowTitle = gettextCatalog.getString('Wallet to Wallet Transfer'); } break; default: - if (!stateParams.thirdParty) { + if (!$scope.params.thirdParty) { $scope.sendFlowTitle = gettextCatalog.getString('Send'); } // nop } - $scope.params = sendFlowService; $scope.coin = false; // Wallets to show (for destination screen or contacts) $scope.type = $scope.params['fromWalletId'] ? 'destination' : 'origin'; // origin || destination fromWalletId = $scope.params['fromWalletId']; From e4c5da0d4414a00e4eace80139859322c57e2350 Mon Sep 17 00:00:00 2001 From: Sebastiaan Pasma Date: Fri, 10 Aug 2018 12:07:24 +0200 Subject: [PATCH 243/256] thirdParty fix --- src/js/services/incomingData.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/js/services/incomingData.js b/src/js/services/incomingData.js index 86c928a5e..4c2b71de8 100644 --- a/src/js/services/incomingData.js +++ b/src/js/services/incomingData.js @@ -447,7 +447,7 @@ angular.module('copayApp.services').factory('incomingData', function($log, $stat amount: thirdPartyData.amount, toAddress: thirdPartyData.toAddress, coin: coin, - thirdParty: JSON.stringify(thirdPartyData) + thirdParty: thirdPartyData }; // fee @@ -455,6 +455,8 @@ angular.module('copayApp.services').factory('incomingData', function($log, $stat stateParams.requiredFeeRate = thirdPartyData.requiredFeeRate * 1024; } + sendFlowService.pushState(thirdPartyData); + scannerService.pausePreview(); $state.go('tabs.send', {}, { 'reload': true, From f86ab3faecc9febf2b5de91c1001ddc85eb5c6f9 Mon Sep 17 00:00:00 2001 From: Sebastiaan Pasma Date: Fri, 10 Aug 2018 12:42:28 +0200 Subject: [PATCH 244/256] revert code cleanup --- src/js/controllers/walletSelectorController.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/js/controllers/walletSelectorController.js b/src/js/controllers/walletSelectorController.js index ba5b4c418..89d77cc3e 100644 --- a/src/js/controllers/walletSelectorController.js +++ b/src/js/controllers/walletSelectorController.js @@ -17,7 +17,7 @@ angular.module('copayApp.controllers').controller('walletSelectorController', fu sendFlowService.popState(); } - $scope.params = sendFlowService.getState(); + var stateParams = sendFlowService.getState(); var config = configService.getSync().wallet.settings; priceDisplayAsFiat = config.priceDisplay === 'fiat'; @@ -29,17 +29,18 @@ angular.module('copayApp.controllers').controller('walletSelectorController', fu $scope.sendFlowTitle = gettextCatalog.getString('Wallet to Wallet Transfer'); break; case 'tabs.send.destination': - if ($scope.params.fromWalletId) { + if (stateParams.fromWalletId) { $scope.sendFlowTitle = gettextCatalog.getString('Wallet to Wallet Transfer'); } break; default: - if (!$scope.params.thirdParty) { + if (!stateParams.thirdParty) { $scope.sendFlowTitle = gettextCatalog.getString('Send'); } // nop } + $scope.params = sendFlowService; $scope.coin = false; // Wallets to show (for destination screen or contacts) $scope.type = $scope.params['fromWalletId'] ? 'destination' : 'origin'; // origin || destination fromWalletId = $scope.params['fromWalletId']; From d28ba24e1c63500c1129c0e1aa2dfd5d297487d2 Mon Sep 17 00:00:00 2001 From: Sebastiaan Pasma Date: Fri, 10 Aug 2018 15:10:44 +0200 Subject: [PATCH 245/256] receive specific amount fix to use sendFlowService --- src/js/controllers/tab-receive.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/js/controllers/tab-receive.js b/src/js/controllers/tab-receive.js index c822b4521..0e80f4382 100644 --- a/src/js/controllers/tab-receive.js +++ b/src/js/controllers/tab-receive.js @@ -1,6 +1,6 @@ 'use strict'; -angular.module('copayApp.controllers').controller('tabReceiveController', function($rootScope, $scope, $timeout, $log, $ionicModal, $state, $ionicHistory, $ionicPopover, storageService, platformInfo, walletService, profileService, configService, lodash, gettextCatalog, popupService, bwcError, bitcoinCashJsService, $ionicNavBarDelegate, txFormatService, soundService, clipboardService) { +angular.module('copayApp.controllers').controller('tabReceiveController', function($rootScope, $scope, $timeout, $log, $ionicModal, $state, $ionicHistory, $ionicPopover, storageService, platformInfo, walletService, profileService, configService, lodash, gettextCatalog, popupService, bwcError, bitcoinCashJsService, $ionicNavBarDelegate, sendFlowService, txFormatService, soundService, clipboardService) { var listeners = []; $scope.bchAddressType = { type: 'cashaddr' }; @@ -18,9 +18,10 @@ angular.module('copayApp.controllers').controller('tabReceiveController', functi $scope.displayBalanceAsFiat = true; $scope.requestSpecificAmount = function() { - $state.go('tabs.paymentRequest.amount', { + sendFlowService.pushState({ toWalletId: $scope.wallet.credentials.walletId }); + $state.go('tabs.paymentRequest.amount'); }; $scope.setAddress = function(newAddr, copyAddress) { From 5445ddbecd62bc3585bc6c08883b02d865ce07d0 Mon Sep 17 00:00:00 2001 From: Brendon Duncan Date: Mon, 13 Aug 2018 10:00:39 +1200 Subject: [PATCH 246/256] Fix for wallet selection header when in Shapeshift flow. Also fixed a coin already present bug that occurred in subsequent Shapeshift flows. --- src/js/controllers/amount.js | 5 +-- src/js/controllers/review.controller.js | 4 +- src/js/controllers/tab-send.js | 8 ++-- .../controllers/walletSelectorController.js | 24 +++++----- src/js/services/incomingData.js | 5 ++- src/js/services/sendFlowService.js | 44 +++++++++++-------- 6 files changed, 47 insertions(+), 43 deletions(-) diff --git a/src/js/controllers/amount.js b/src/js/controllers/amount.js index 00c9461f5..c2dcc6cd4 100644 --- a/src/js/controllers/amount.js +++ b/src/js/controllers/amount.js @@ -67,15 +67,14 @@ function amountController(configService, $filter, gettextCatalog, $ionicHistory, } function onBeforeEnter(event, data) { - console.log('amount onBeforeEnter sendflow ', sendFlowService.getState()); - if (data.direction == "back") { sendFlowService.popState(); } + console.log('amount onBeforeEnter after back sendflow ', sendFlowService.state); initCurrencies(); - passthroughParams = sendFlowService; + passthroughParams = sendFlowService.getStateClone(); vm.fromWalletId = passthroughParams.fromWalletId; vm.toWalletId = passthroughParams.toWalletId; diff --git a/src/js/controllers/review.controller.js b/src/js/controllers/review.controller.js index d41d4a9b0..3c528c1f9 100644 --- a/src/js/controllers/review.controller.js +++ b/src/js/controllers/review.controller.js @@ -75,9 +75,9 @@ function reviewController(addressbookService, bitcoinCashJsService, bitcore, bit function onBeforeEnter(event, data) { - console.log('walletSelector onBeforeEnter sendflow ', sendFlowService.getState()); + console.log('walletSelector onBeforeEnter sendflow ', sendFlowService.state); defaults = configService.getDefaults(); - sendFlowData = sendFlowService.getState(); + sendFlowData = sendFlowService.getStateClone(); originWalletId = sendFlowData.fromWalletId; satoshis = parseInt(sendFlowData.amount, 10); toAddress = sendFlowData.toAddress; diff --git a/src/js/controllers/tab-send.js b/src/js/controllers/tab-send.js index 3f1da01fc..9ac6c35cb 100644 --- a/src/js/controllers/tab-send.js +++ b/src/js/controllers/tab-send.js @@ -29,7 +29,7 @@ angular.module('copayApp.controllers').controller('tabSendController', function( $scope.$on("$ionicView.enter", function(event, data) { - var stateParams = sendFlowService.getState(); + var stateParams = sendFlowService.getStateClone(); $scope.fromWallet = profileService.getWallet(stateParams.fromWalletId); clipboardService.readFromClipboard(function(text) { @@ -184,7 +184,7 @@ angular.module('copayApp.controllers').controller('tabSendController', function( $log.debug('Got toAddress:' + toAddress + ' | ' + item.name); - var stateParams = sendFlowService.getState(); + var stateParams = sendFlowService.getStateClone(); stateParams.toAddress = toAddress, stateParams.coin = item.coin; sendFlowService.pushState(stateParams); @@ -200,7 +200,7 @@ angular.module('copayApp.controllers').controller('tabSendController', function( $scope.startWalletToWalletTransfer = function() { console.log('startWalletToWalletTransfer()'); - var params = sendFlowService.getState(); + var params = sendFlowService.getStateClone(); sendFlowService.pushState(params); $state.transitionTo('tabs.send.wallet-to-wallet', { fromWalletId: sendFlowService.fromWalletId @@ -222,7 +222,7 @@ angular.module('copayApp.controllers').controller('tabSendController', function( $scope.$on("$ionicView.beforeEnter", function(event, data) { console.log(data); - console.log('tab-send onBeforeEnter sendflow ', sendFlowService.getState()); + console.log('tab-send onBeforeEnter sendflow ', sendFlowService.state); $scope.isIOS = platformInfo.isIOS && platformInfo.isCordova; $scope.showWalletsBch = $scope.showWalletsBtc = $scope.showWallets = false; diff --git a/src/js/controllers/walletSelectorController.js b/src/js/controllers/walletSelectorController.js index ba5b4c418..7a7c5a463 100644 --- a/src/js/controllers/walletSelectorController.js +++ b/src/js/controllers/walletSelectorController.js @@ -11,13 +11,12 @@ angular.module('copayApp.controllers').controller('walletSelectorController', fu $scope.$on("$ionicView.enter", onEnter); function onBeforeEnter(event, data) { - console.log('walletSelector onBeforeEnter sendflow', sendFlowService.getState()); - if (data.direction == "back") { sendFlowService.popState(); } + console.log('walletSelector onBeforeEnter after back sendflow', sendFlowService.state); - $scope.params = sendFlowService.getState(); + $scope.params = sendFlowService.getStateClone(); var config = configService.getSync().wallet.settings; priceDisplayAsFiat = config.priceDisplay === 'fiat'; @@ -29,7 +28,7 @@ angular.module('copayApp.controllers').controller('walletSelectorController', fu $scope.sendFlowTitle = gettextCatalog.getString('Wallet to Wallet Transfer'); break; case 'tabs.send.destination': - if ($scope.params.fromWalletId) { + if ($scope.params.fromWalletId && !$scope.params.thirdParty) { $scope.sendFlowTitle = gettextCatalog.getString('Wallet to Wallet Transfer'); } break; @@ -45,7 +44,7 @@ angular.module('copayApp.controllers').controller('walletSelectorController', fu fromWalletId = $scope.params['fromWalletId']; if ($scope.type === 'destination' && $scope.params.toAddress) { - $state.transitionTo(getNextStep()); + $state.transitionTo(getNextStep($scope.params)); } if ($scope.params.coin) { @@ -105,13 +104,10 @@ angular.module('copayApp.controllers').controller('walletSelectorController', fu } } - function getNextStep() { - if ($scope.thirdParty) { - $scope.params.thirdParty = $scope.thirdParty - } - if (!$scope.params.toWalletId && !$scope.params.toAddress) { // If we have no toAddress or fromWallet + function getNextStep(params) { + if (!params.toWalletId && !params.toAddress) { // If we have no toAddress or fromWallet return 'tabs.send.destination'; - } else if (!$scope.params.amount) { // If we have no amount + } else if (!params.amount) { // If we have no amount return 'tabs.send.amount'; } else { // If we do have them return 'tabs.send.review'; @@ -195,14 +191,16 @@ angular.module('copayApp.controllers').controller('walletSelectorController', fu $scope.useWallet = function(wallet) { - var params = sendFlowService.getState(); + var params = sendFlowService.getStateClone(); if ($scope.type === 'origin') { // we're on the origin screen, set wallet to send from params.fromWalletId = wallet.id; } else { // we're on the destination screen, set wallet to send to params.toWalletId = wallet.id; } sendFlowService.pushState(params); - $state.transitionTo(getNextStep(), $scope.params); + var nextStep = getNextStep(params); + console.log('walletSelector nextStep', nextStep); + $state.transitionTo(nextStep, $scope.params); }; $scope.goBack = function() { diff --git a/src/js/services/incomingData.js b/src/js/services/incomingData.js index 4c2b71de8..9fad8b0f5 100644 --- a/src/js/services/incomingData.js +++ b/src/js/services/incomingData.js @@ -82,7 +82,7 @@ angular.module('copayApp.services').factory('incomingData', function($log, $stat }); // Timeout is required to enable the "Back" button $timeout(function() { - var params = sendFlowService.getState(); + var params = sendFlowService.getStateClone(); if (amount) { params.amount = amount; @@ -455,7 +455,8 @@ angular.module('copayApp.services').factory('incomingData', function($log, $stat stateParams.requiredFeeRate = thirdPartyData.requiredFeeRate * 1024; } - sendFlowService.pushState(thirdPartyData); + // This does not make sense, thirdPartyData gets added by stateParams below + //sendFlowService.pushState(thirdPartyData); scannerService.pausePreview(); $state.go('tabs.send', {}, { diff --git a/src/js/services/sendFlowService.js b/src/js/services/sendFlowService.js index 29686b15b..fcb061c26 100644 --- a/src/js/services/sendFlowService.js +++ b/src/js/services/sendFlowService.js @@ -9,17 +9,21 @@ angular function sendFlowService($log) { var service = { - amount: '', - fromWalletId: '', - sendMax: false, - thirdParty: null, - toAddress: '', - toWalletId: '', + // A separate state variable so we can ensure it is cleared of everything, + // even other properties added that this service does not know about. (such as "coin") + state: { + amount: '', + fromWalletId: '', + sendMax: false, + thirdParty: null, + toAddress: '', + toWalletId: '' + }, previousStates: [], // Functions clear: clear, - getState: getState, + getStateClone: getStateClone, map: map, popState: popState, pushState: pushState, @@ -36,22 +40,24 @@ angular function clearCurrent() { console.log("sendFlow clearCurrent()"); - service.amount = ''; - service.fromWalletId = ''; - service.sendMax = false; - service.thirdParty = null; - service.toAddress = ''; - service.toWalletId = ''; + service.state = { + amount: '', + fromWalletId: '', + sendMax: false, + thirdParty: null, + toAddress: '', + toWalletId: '' + } } /** * Handy for debugging */ - function getState() { + function getStateClone() { var currentState = {}; - Object.keys(service).forEach(function forCurrentParam(key) { - if (typeof service[key] !== 'function' && key !== 'previousStates') { - currentState[key] = service[key]; + Object.keys(service.state).forEach(function forCurrentParam(key) { + if (typeof service.state[key] !== 'function' && key !== 'previousStates') { + currentState[key] = service.state[key]; } }); return currentState; @@ -68,7 +74,7 @@ angular function map(params) { Object.keys(params).forEach(function forNewParam(key) { - service[key] = params[key]; + service.state[key] = params[key]; }); }; @@ -85,7 +91,7 @@ angular function pushState(params) { console.log('sendFlow push'); - var currentParams = getState(); + var currentParams = getStateClone(); service.previousStates.push(currentParams); clearCurrent(); map(params); From 84fd483f1911b584bd4d8134028916ad79ee569a Mon Sep 17 00:00:00 2001 From: Brendon Duncan Date: Mon, 13 Aug 2018 10:47:00 +1200 Subject: [PATCH 247/256] Fix for removing dark portion of Review Transaction screen below personal note. --- src/sass/views/review.scss | 1 - 1 file changed, 1 deletion(-) diff --git a/src/sass/views/review.scss b/src/sass/views/review.scss index 79bca1896..c530a1cef 100644 --- a/src/sass/views/review.scss +++ b/src/sass/views/review.scss @@ -1,5 +1,4 @@ #view-review { - background-color: #494949; slide-to-accept, slide-to-accept-success { margin-bottom: constant(safe-area-inset-bottom); /* iOS 11.0 */ From 80c9d682b59628c88b03b8034149e2eaa8ffff2d Mon Sep 17 00:00:00 2001 From: Brendon Duncan Date: Mon, 13 Aug 2018 11:23:15 +1200 Subject: [PATCH 248/256] Fix in formatted-amount of display of subcent fees in transactions details page. --- src/js/directives/formattedAmount.js | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/js/directives/formattedAmount.js b/src/js/directives/formattedAmount.js index 9f70b37ed..68bb50781 100644 --- a/src/js/directives/formattedAmount.js +++ b/src/js/directives/formattedAmount.js @@ -86,15 +86,24 @@ } function formatNumbers() { + console.log('formatNumbers() "' + $scope.value + '", "' + $scope.currency + '"'); + // Might get "< 0.01 USD" being passed in. // During watch, may be changed from having a separate currency value, // to both being in value. Don't want to use previous currency value. // Try to extract currency from value.. var currencySplit = $scope.value.split(" "); - if (currencySplit.length === 2 && !$scope.currency) { - $scope.currency = currencySplit[1]; + if (currencySplit.length >= 2 && !$scope.currency) { + $scope.currency = currencySplit[currencySplit.length - 1]; } $scope.currency = $scope.currency || ''; + // Redo this when we have proper formatting for low fees + if ($scope.value.indexOf("<") === 0) { + buildAmount($scope.value, '', ''); + $scope.currency = ''; + $scope.canShow = true; + return; + } var parsed = parseFloat($scope.value); var valueFormatted = ''; From 098d454b8ba5e467be1bb30d8f193cdbc15b19b6 Mon Sep 17 00:00:00 2001 From: Brendon Duncan Date: Mon, 13 Aug 2018 15:43:20 +1200 Subject: [PATCH 249/256] Fixed formatting of numbers in the thousands. --- src/js/directives/formattedAmount.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/js/directives/formattedAmount.js b/src/js/directives/formattedAmount.js index 68bb50781..55051f07d 100644 --- a/src/js/directives/formattedAmount.js +++ b/src/js/directives/formattedAmount.js @@ -105,6 +105,9 @@ return; } + // Remove thousands separators for parseFloat() + $scope.value = $scope.value.replace(',', ''); + var parsed = parseFloat($scope.value); var valueFormatted = ''; var valueProcessing = ''; From a29a41b6472f996330121ad2ddc3b039cd27878d Mon Sep 17 00:00:00 2001 From: Brendon Duncan Date: Mon, 13 Aug 2018 15:48:20 +1200 Subject: [PATCH 250/256] Removed console.log(). --- 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 55051f07d..f66a0ac78 100644 --- a/src/js/directives/formattedAmount.js +++ b/src/js/directives/formattedAmount.js @@ -86,7 +86,6 @@ } function formatNumbers() { - console.log('formatNumbers() "' + $scope.value + '", "' + $scope.currency + '"'); // Might get "< 0.01 USD" being passed in. // During watch, may be changed from having a separate currency value, // to both being in value. Don't want to use previous currency value. From 430f4644eb191dc240ae0a11add7ef79fecbfe0a Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Dominguez Date: Mon, 13 Aug 2018 13:32:20 +0900 Subject: [PATCH 251/256] Fix formatted amount. --- src/js/directives/formattedAmount.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/js/directives/formattedAmount.js b/src/js/directives/formattedAmount.js index f66a0ac78..1f51d33e3 100644 --- a/src/js/directives/formattedAmount.js +++ b/src/js/directives/formattedAmount.js @@ -90,11 +90,12 @@ // During watch, may be changed from having a separate currency value, // to both being in value. Don't want to use previous currency value. // Try to extract currency from value.. + $scope.currency = $scope.currency || ''; + var currencySplit = $scope.value.split(" "); - if (currencySplit.length >= 2 && !$scope.currency) { + if (currencySplit.length >= 2 && $scope.currency.length === 0) { $scope.currency = currencySplit[currencySplit.length - 1]; } - $scope.currency = $scope.currency || ''; // Redo this when we have proper formatting for low fees if ($scope.value.indexOf("<") === 0) { From 6de4f2ecda3fb91e251c79126953c49bd739f671 Mon Sep 17 00:00:00 2001 From: Brendon Duncan Date: Mon, 13 Aug 2018 16:45:46 +1200 Subject: [PATCH 252/256] Enlarged Wallet Details header to fit Receive and Send buttons without covering the unlocked balance. --- src/js/controllers/walletDetails.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/js/controllers/walletDetails.js b/src/js/controllers/walletDetails.js index e6a8e2351..1aaef7581 100644 --- a/src/js/controllers/walletDetails.js +++ b/src/js/controllers/walletDetails.js @@ -304,6 +304,7 @@ angular.module('copayApp.controllers').controller('walletDetailsController', fun }; function refreshAmountSection(scrollPos) { + var AMOUNT_HEIGHT_BASE = 270; $scope.showBalanceButton = false; if ($scope.status) { $scope.showBalanceButton = ($scope.status.totalBalanceSat != $scope.status.spendableAmount); @@ -315,16 +316,16 @@ angular.module('copayApp.controllers').controller('walletDetailsController', fun } scrollPos = scrollPos || 0; - var amountHeight = 210 - scrollPos; + var amountHeight = AMOUNT_HEIGHT_BASE - scrollPos; if (amountHeight < 80) { amountHeight = 80; } var contentMargin = amountHeight; - if (contentMargin > 210) { - contentMargin = 210; + if (contentMargin > AMOUNT_HEIGHT_BASE) { + contentMargin = AMOUNT_HEIGHT_BASE; } - var amountScale = (amountHeight / 210); + var amountScale = (amountHeight / AMOUNT_HEIGHT_BASE); if (amountScale < 0.5) { amountScale = 0.5; } From 0b71daf04d6a3c7241a5c785843bd42488445c7b Mon Sep 17 00:00:00 2001 From: Brendon Duncan Date: Mon, 13 Aug 2018 16:51:38 +1200 Subject: [PATCH 253/256] Removed previous fix as it is superceded by a better one. --- src/sass/views/walletDetails.scss | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/sass/views/walletDetails.scss b/src/sass/views/walletDetails.scss index 79326951e..858229d85 100644 --- a/src/sass/views/walletDetails.scss +++ b/src/sass/views/walletDetails.scss @@ -262,11 +262,6 @@ padding-top: 45px; } - .button-white-outline.button-outline.activated { - color: $v-primary-color; - border-color: white; - } - .item.item-footer { font-weight: lighter; } From 52e1b5e8116969ade33515e62ab5038da8045d41 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Dominguez Date: Mon, 13 Aug 2018 14:13:49 +0900 Subject: [PATCH 254/256] Manage the currency state --- src/js/directives/formattedAmount.js | 26 ++++++++++++++++-------- www/views/includes/formatted-amount.html | 2 +- 2 files changed, 18 insertions(+), 10 deletions(-) diff --git a/src/js/directives/formattedAmount.js b/src/js/directives/formattedAmount.js index 1f51d33e3..f81615593 100644 --- a/src/js/directives/formattedAmount.js +++ b/src/js/directives/formattedAmount.js @@ -26,9 +26,14 @@ } }); - function formattedAmountController($scope, $timeout, uxLanguage) { - $scope.canShow = false; + function formattedAmountController($scope, uxLanguage) { + $scope.vm = {}; + var vm = $scope.vm; + vm.currency = ''; + vm.value = ''; + + $scope.canShow = false $scope.displaySizeEqual = !!$scope.sizeEqual; var decimalPlaces = { @@ -90,17 +95,19 @@ // During watch, may be changed from having a separate currency value, // to both being in value. Don't want to use previous currency value. // Try to extract currency from value.. - $scope.currency = $scope.currency || ''; - - var currencySplit = $scope.value.split(" "); - if (currencySplit.length >= 2 && $scope.currency.length === 0) { - $scope.currency = currencySplit[currencySplit.length - 1]; + if (!$scope.currency || $scope.currency.length === 0) { + var currencySplit = $scope.value.split(" "); + if (currencySplit.length >= 2) { + vm.currency = currencySplit[currencySplit.length - 1]; + } + } else { + vm.currency = $scope.currency; } // Redo this when we have proper formatting for low fees if ($scope.value.indexOf("<") === 0) { buildAmount($scope.value, '', ''); - $scope.currency = ''; + vm.currency = ''; $scope.canShow = true; return; } @@ -111,7 +118,7 @@ var parsed = parseFloat($scope.value); var valueFormatted = ''; var valueProcessing = ''; - switch (getDecimalPlaces($scope.currency)) { + switch (getDecimalPlaces(vm.currency)) { case '0': if (isNaN(parsed)) { buildAmount('-', '', ''); @@ -158,6 +165,7 @@ break; } $scope.canShow = true; + $scope.$apply(); }; function getDecimalPlaces(currency) { diff --git a/www/views/includes/formatted-amount.html b/www/views/includes/formatted-amount.html index 24149849d..45451a718 100644 --- a/www/views/includes/formatted-amount.html +++ b/www/views/includes/formatted-amount.html @@ -1,4 +1,4 @@
- {{start}}{{middle}}{{end}}{{currency}} + {{start}}{{middle}}{{end}}{{vm.currency}}
\ No newline at end of file From c54cb55c51e4737a89e05ec92dfd0784a078319a Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Dominguez Date: Mon, 13 Aug 2018 14:44:07 +0900 Subject: [PATCH 255/256] Custom amount crypto decimal --- www/views/customAmount.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/www/views/customAmount.html b/www/views/customAmount.html index b361a6da9..a7130a729 100644 --- a/www/views/customAmount.html +++ b/www/views/customAmount.html @@ -32,15 +32,15 @@
- {{amountUnitStr}} +
- {{altAmountStr | uppercase}} +
- {{altAmountStr | uppercase}} +
- {{amountUnitStr}} +
From 9c999d0cd6754e81bf06fda79e492dd1e7606815 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Dominguez Date: Mon, 13 Aug 2018 15:35:26 +0900 Subject: [PATCH 256/256] 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,