From 333b4f45a0bfa780277033c7c8dfb26889f734f1 Mon Sep 17 00:00:00 2001 From: Matias Alejo Garcia Date: Thu, 1 Sep 2016 16:23:27 -0300 Subject: [PATCH 1/4] fix fingerprint setting, remove activity from home --- app-template/Makefile | 2 +- chrome-app/manifest.json | 2 +- package.json | 2 +- src/js/controllers/preferences.js | 6 ++-- src/js/controllers/tab-home.js | 48 +++++++++++++++---------------- src/js/services/profileService.js | 1 + src/js/services/walletService.js | 13 +++++++-- webkitbuilds/.desktop | 2 +- webkitbuilds/setup-win.iss | 2 +- 9 files changed, 44 insertions(+), 34 deletions(-) diff --git a/app-template/Makefile b/app-template/Makefile index 2e81223e7..058cbce10 100644 --- a/app-template/Makefile +++ b/app-template/Makefile @@ -42,4 +42,4 @@ wp: build-wp androidrun: make -C $(WORKDIR)android run - adb logcat | grep copay.js + adb logcat | grep chromium diff --git a/chrome-app/manifest.json b/chrome-app/manifest.json index 5e013d96e..d0240e0cc 100644 --- a/chrome-app/manifest.json +++ b/chrome-app/manifest.json @@ -5,7 +5,7 @@ "manifest_version": 2, "name": "BitPay", "description": "The BitPay Bitcoin Wallet", - "version": "0.7.0", + "version": "0.8.0", "permissions": [ "storage", "unlimitedStorage", diff --git a/package.json b/package.json index c34d05ca9..abfa18eb5 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "name": "bitpay", "description": "The BitPay Bitcoin Wallet", "author": "BitPay", - "version": "0.7.0", + "version": "0.8.0", "keywords": [ "wallet", "copay", diff --git a/src/js/controllers/preferences.js b/src/js/controllers/preferences.js index 65d95f618..f66aad999 100644 --- a/src/js/controllers/preferences.js +++ b/src/js/controllers/preferences.js @@ -69,10 +69,12 @@ angular.module('copayApp.controllers').controller('preferencesController', $scope.touchIdChange = function() { var newStatus = $scope.touchIdEnabled; - walletService.setTouchId(wallet, newStatus, function(err) { + walletService.setTouchId(wallet, !!newStatus, function(err) { if (err) { - $log.warn(err); $scope.touchIdEnabled = !newStatus; + $timeout(function() { + $scope.$apply(); + }, 1); return; } $log.debug('Touch Id status changed: ' + newStatus); diff --git a/src/js/controllers/tab-home.js b/src/js/controllers/tab-home.js index 592c10c84..058568ebc 100644 --- a/src/js/controllers/tab-home.js +++ b/src/js/controllers/tab-home.js @@ -31,19 +31,19 @@ angular.module('copayApp.controllers').controller('tabHomeController', wallet.status = status; }); }); - - $scope.fetchingNotifications = true; - profileService.getNotifications({ - limit: 3 - }, function(err, n) { - if (err) { - console.log('[tab-home.js.35:err:]', $log.error(err)); //TODO - return; - } - $scope.fetchingNotifications = false; - setNotifications(n); - $ionicScrollDelegate.resize(); - }) + // + // $scope.fetchingNotifications = true; + // profileService.getNotifications({ + // limit: 3 + // }, function(err, n) { + // if (err) { + // console.log('[tab-home.js.35:err:]', $log.error(err)); //TODO + // return; + // } + // $scope.fetchingNotifications = false; + // setNotifications(n); + // $ionicScrollDelegate.resize(); + // }) }; $scope.updateWallet = function(wallet) { @@ -55,17 +55,17 @@ angular.module('copayApp.controllers').controller('tabHomeController', } wallet.status = status; - profileService.getNotifications({ - limit: 3 - }, function(err, n) { - console.log('[tab-home.js.57]', n); //TODO - if (err) { - console.log('[tab-home.js.35:err:]', $log.error(err)); //TODO - return; - } - setNotifications(n); - $ionicScrollDelegate.resize(); - }) + // profileService.getNotifications({ + // limit: 3 + // }, function(err, n) { + // console.log('[tab-home.js.57]', n); //TODO + // if (err) { + // console.log('[tab-home.js.35:err:]', $log.error(err)); //TODO + // return; + // } + // setNotifications(n); + // $ionicScrollDelegate.resize(); + // }) }); }; diff --git a/src/js/services/profileService.js b/src/js/services/profileService.js index 78c1739f1..76d639869 100644 --- a/src/js/services/profileService.js +++ b/src/js/services/profileService.js @@ -827,6 +827,7 @@ angular.module('copayApp.services') prev; + // REMOVE (if we want 1-to-1 notification) ???? lodash.each(shown, function(x) { if (prev && prev.walletId === x.walletId && prev.txpId && prev.txpId === x.txpId && prev.creatorId && prev.creatorId === x.creatorId) { prev.types.push(x.type); diff --git a/src/js/services/walletService.js b/src/js/services/walletService.js index e5640af61..4f3519514 100644 --- a/src/js/services/walletService.js +++ b/src/js/services/walletService.js @@ -995,10 +995,17 @@ angular.module('copayApp.services').factory('walletService', function($log, $tim }; root.setTouchId = function(wallet, enabled, cb) { + + var opts = { + touchIdFor: {} + }; + opts.touchIdFor[wallet.id] = enabled; + fingerprintService.check(wallet, function(err) { - if (err) return cb(err); { - $log.debug(err); - return; + if (err) { + opts.touchIdFor[wallet.id] = !enabled; + $log.debug('Error with fingerprint:' + err); + return cb(err); } configService.set(opts, cb); }); diff --git a/webkitbuilds/.desktop b/webkitbuilds/.desktop index fe6c809a5..805d086bd 100644 --- a/webkitbuilds/.desktop +++ b/webkitbuilds/.desktop @@ -1,6 +1,6 @@ [Desktop Entry] Type=Application -Version=0.7.0 +Version=0.8.0 Name=BitPay Comment=The BitPay Bitcoin Wallet Exec=bitpay diff --git a/webkitbuilds/setup-win.iss b/webkitbuilds/setup-win.iss index 4fdf77619..3fe57e4b6 100755 --- a/webkitbuilds/setup-win.iss +++ b/webkitbuilds/setup-win.iss @@ -2,7 +2,7 @@ ; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES! #define MyAppName "bitpay" -#define MyAppVersion "0.7.0" +#define MyAppVersion "0.8.0" #define MyAppPublisher "BitPay" #define MyAppURL "https://bitpay.com" #define MyAppExeName "*NAMECASENOSPACE.exe" From e0b77968bd4a0312283c0943b785c914f0a92543 Mon Sep 17 00:00:00 2001 From: Matias Alejo Garcia Date: Thu, 1 Sep 2016 16:50:13 -0300 Subject: [PATCH 2/4] disable grouping in activity --- public/views/includes/walletActivity.html | 32 +++++++-------- src/js/controllers/tab-home.js | 48 +++++++++++------------ src/js/services/profileService.js | 39 +++++++++--------- 3 files changed, 60 insertions(+), 59 deletions(-) diff --git a/public/views/includes/walletActivity.html b/public/views/includes/walletActivity.html index fca106357..a4d834e45 100644 --- a/public/views/includes/walletActivity.html +++ b/public/views/includes/walletActivity.html @@ -1,14 +1,14 @@ -
+
Copayer joined
-
+
Wallet created
-
+
Payment Sent
{{x.amountStr}} @@ -17,36 +17,34 @@ -
+
Payment Received
{{x.amountStr}}
-
+
Proposal Deleted
-
+
Proposal Rejected
-
- - + + - {{x.amountStr}} - {{x.message}} - - - - Proposal Accepted - -
+ {{x.amountStr}} + {{x.message}} + + + + Proposal Accepted +

diff --git a/src/js/controllers/tab-home.js b/src/js/controllers/tab-home.js index 058568ebc..592c10c84 100644 --- a/src/js/controllers/tab-home.js +++ b/src/js/controllers/tab-home.js @@ -31,19 +31,19 @@ angular.module('copayApp.controllers').controller('tabHomeController', wallet.status = status; }); }); - // - // $scope.fetchingNotifications = true; - // profileService.getNotifications({ - // limit: 3 - // }, function(err, n) { - // if (err) { - // console.log('[tab-home.js.35:err:]', $log.error(err)); //TODO - // return; - // } - // $scope.fetchingNotifications = false; - // setNotifications(n); - // $ionicScrollDelegate.resize(); - // }) + + $scope.fetchingNotifications = true; + profileService.getNotifications({ + limit: 3 + }, function(err, n) { + if (err) { + console.log('[tab-home.js.35:err:]', $log.error(err)); //TODO + return; + } + $scope.fetchingNotifications = false; + setNotifications(n); + $ionicScrollDelegate.resize(); + }) }; $scope.updateWallet = function(wallet) { @@ -55,17 +55,17 @@ angular.module('copayApp.controllers').controller('tabHomeController', } wallet.status = status; - // profileService.getNotifications({ - // limit: 3 - // }, function(err, n) { - // console.log('[tab-home.js.57]', n); //TODO - // if (err) { - // console.log('[tab-home.js.35:err:]', $log.error(err)); //TODO - // return; - // } - // setNotifications(n); - // $ionicScrollDelegate.resize(); - // }) + profileService.getNotifications({ + limit: 3 + }, function(err, n) { + console.log('[tab-home.js.57]', n); //TODO + if (err) { + console.log('[tab-home.js.35:err:]', $log.error(err)); //TODO + return; + } + setNotifications(n); + $ionicScrollDelegate.resize(); + }) }); }; diff --git a/src/js/services/profileService.js b/src/js/services/profileService.js index 76d639869..a5f5c8769 100644 --- a/src/js/services/profileService.js +++ b/src/js/services/profileService.js @@ -822,26 +822,29 @@ angular.module('copayApp.services') }; }); - // condense - var finale = [], - prev; + var finale = shown; // GROUPING DISABLED! - // REMOVE (if we want 1-to-1 notification) ???? - lodash.each(shown, function(x) { - if (prev && prev.walletId === x.walletId && prev.txpId && prev.txpId === x.txpId && prev.creatorId && prev.creatorId === x.creatorId) { - prev.types.push(x.type); - prev.data = lodash.assign(prev.data, x.data); - prev.txid = prev.txid || x.txid; - prev.amountStr = prev.amountStr || x.amountStr; - prev.creatorName = prev.creatorName || x.creatorName; - } else { - finale.push(x); - prev = x; - } - }); - - // messages... + // var finale = [], + // prev; + // + // + // // Item grouping... DISABLED. + // + // // REMOVE (if we want 1-to-1 notification) ???? + // lodash.each(shown, function(x) { + // if (prev && prev.walletId === x.walletId && prev.txpId && prev.txpId === x.txpId && prev.creatorId && prev.creatorId === x.creatorId) { + // prev.types.push(x.type); + // prev.data = lodash.assign(prev.data, x.data); + // prev.txid = prev.txid || x.txid; + // prev.amountStr = prev.amountStr || x.amountStr; + // prev.creatorName = prev.creatorName || x.creatorName; + // } else { + // finale.push(x); + // prev = x; + // } + // }); + // var u = bwcService.getUtils(); lodash.each(finale, function(x) { From f5127d157cd6fc688e140465df6b8c93016dffa9 Mon Sep 17 00:00:00 2001 From: Matias Alejo Garcia Date: Thu, 1 Sep 2016 16:56:35 -0300 Subject: [PATCH 3/4] better views in activity --- public/views/includes/walletActivity.html | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/public/views/includes/walletActivity.html b/public/views/includes/walletActivity.html index a4d834e45..9ff11beb7 100644 --- a/public/views/includes/walletActivity.html +++ b/public/views/includes/walletActivity.html @@ -26,24 +26,38 @@

- Proposal Deleted + Proposal Deleted: + {{x.message}} +
+ {{x.amountStr}}: +
- Proposal Rejected + Proposal Rejected: + {{x.message}} +
+ {{x.amountStr}}: +
- - {{x.amountStr}} + New Proposal: {{x.message}} +
+ {{x.amountStr}} +
Proposal Accepted + {{x.message}} +
+ {{x.amountStr}} +

From dd98e5375a7633afc5c5e907f35a30df151004d0 Mon Sep 17 00:00:00 2001 From: Matias Alejo Garcia Date: Thu, 1 Sep 2016 16:58:05 -0300 Subject: [PATCH 4/4] rm log --- src/js/controllers/tab-home.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/js/controllers/tab-home.js b/src/js/controllers/tab-home.js index 592c10c84..e88b3ac95 100644 --- a/src/js/controllers/tab-home.js +++ b/src/js/controllers/tab-home.js @@ -58,7 +58,6 @@ angular.module('copayApp.controllers').controller('tabHomeController', profileService.getNotifications({ limit: 3 }, function(err, n) { - console.log('[tab-home.js.57]', n); //TODO if (err) { console.log('[tab-home.js.35:err:]', $log.error(err)); //TODO return;