From 1d5b8ced9963402b9df13c2121abd2098f396b32 Mon Sep 17 00:00:00 2001 From: Matias Alejo Garcia Date: Fri, 3 Jun 2016 12:50:37 -0300 Subject: [PATCH 01/12] bump version to 2.0.0 + change note to "descrition" --- cordova/config.xml | 6 +++--- cordova/wp/Package.appxmanifest | 2 +- cordova/wp/Properties/WMAppManifest.xml | 2 +- package.json | 4 ++-- public/views/modals/tx-details.html | 4 +--- public/views/modals/txp-details.html | 2 +- public/views/walletHome.html | 2 +- src/js/controllers/index.js | 6 +++--- webkitbuilds/.desktop | 2 +- webkitbuilds/setup-win.iss | 2 +- 10 files changed, 15 insertions(+), 17 deletions(-) diff --git a/cordova/config.xml b/cordova/config.xml index 8da7b4375..94305a93c 100644 --- a/cordova/config.xml +++ b/cordova/config.xml @@ -1,8 +1,8 @@ + version="2.0.0" + android-versionCode="105" + ios-CFBundleVersion="2.0.0"> Copay A secure bitcoin wallet for friends and companies. diff --git a/cordova/wp/Package.appxmanifest b/cordova/wp/Package.appxmanifest index cf7369c6c..89311af34 100644 --- a/cordova/wp/Package.appxmanifest +++ b/cordova/wp/Package.appxmanifest @@ -1,6 +1,6 @@ - + Copay Bitcoin Wallet diff --git a/cordova/wp/Properties/WMAppManifest.xml b/cordova/wp/Properties/WMAppManifest.xml index 86de2b523..f8bb1e098 100644 --- a/cordova/wp/Properties/WMAppManifest.xml +++ b/cordova/wp/Properties/WMAppManifest.xml @@ -11,7 +11,7 @@ - + Assets\icon@2.png diff --git a/package.json b/package.json index ac580e726..55c254da6 100644 --- a/package.json +++ b/package.json @@ -2,8 +2,8 @@ "name": "copay", "description": "A multisignature wallet", "author": "BitPay", - "version": "1.12.14", - "androidVersionCode": "104", + "version": "2.0.0", + "androidVersionCode": "105", "keywords": [ "wallet", "copay", diff --git a/public/views/modals/tx-details.html b/public/views/modals/tx-details.html index 6ee0aa465..9a3c87ea4 100644 --- a/public/views/modals/tx-details.html +++ b/public/views/modals/tx-details.html @@ -28,8 +28,6 @@
- + - - {{btx.amountStr}}
@@ -100,7 +98,7 @@
  • - Note + Description {{btx.message}}
  • diff --git a/public/views/modals/txp-details.html b/public/views/modals/txp-details.html index 81055b0eb..59f186eb7 100644 --- a/public/views/modals/txp-details.html +++ b/public/views/modals/txp-details.html @@ -78,7 +78,7 @@
    • - Note + Description {{tx.message}}
    • diff --git a/public/views/walletHome.html b/public/views/walletHome.html index 42734ab33..8d55095c7 100644 --- a/public/views/walletHome.html +++ b/public/views/walletHome.html @@ -449,7 +449,7 @@
    -
    diff --git a/src/js/controllers/modals/txDetails.js b/src/js/controllers/modals/txDetails.js index cb9b40130..3b4704471 100644 --- a/src/js/controllers/modals/txDetails.js +++ b/src/js/controllers/modals/txDetails.js @@ -14,7 +14,7 @@ angular.module('copayApp.controllers').controller('txDetailsController', functio $scope.isShared = fc.credentials.n > 1; $scope.showCommentPopup = function() { $scope.data = { - comment: '' + comment: $scope.btx.note.body }; var commentPopup = $ionicPopup.show({ @@ -27,17 +27,19 @@ angular.module('copayApp.controllers').controller('txDetailsController', functio }; $scope.commentPopupSave = function() { + $log.debug('Saving note'); fc.editTxNote({ txid: $scope.btx.txid, - body: $scope.data.comment + body: $scope.data.comment, }, function(err) { if (err) { $log.debug('Could not save tx comment'); return; } - $scope.comment = $scope.data.comment; - $scope.editedBy = gettextCatalog.getString('Edited by') + ' ' + fc.credentials.copayerName; - $scope.createdOn = Math.floor(Date.now() / 1000); + // This is only to refresh the current screen data + $scope.btx.note.body = $scope.data.comment; + $scope.btx.note.editedByName = fc.credentials.copayerName; + $scope.btx.note.editedOn = Math.floor(Date.now() / 1000); commentPopup.close(); }); }; From 761a4ff996aaf16fcd60fae6f7abca972b14dc2e Mon Sep 17 00:00:00 2001 From: Matias Alejo Garcia Date: Sat, 4 Jun 2016 16:59:10 -0300 Subject: [PATCH 07/12] rm logs --- src/js/controllers/preferencesHistory.js | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/js/controllers/preferencesHistory.js b/src/js/controllers/preferencesHistory.js index 20ca932fa..ac1e99f93 100644 --- a/src/js/controllers/preferencesHistory.js +++ b/src/js/controllers/preferencesHistory.js @@ -49,17 +49,14 @@ angular.module('copayApp.controllers').controller('preferencesHistory', var self = this; var allTxs = []; - console.log('[preferencesHistory.js.68]'); //TODO $log.debug('Generating CSV from History'); getHistory(function(err, txs) { -console.log('[preferencesHistory.js.71:txs:]',txs); //TODO if (err || !txs || !txs[0]) { $log.warn('Failed to generate CSV:', err); if (cb) return cb(err); return; } -console.log('[preferencesHistory.js.77]', txs); //TODO $log.debug('Wallet Transaction History Length:', txs.length); self.satToUnit = 1 / self.unitToSatoshi; @@ -119,7 +116,6 @@ console.log('[preferencesHistory.js.77]', txs); //TODO } }); - console.log('[preferencesHistory.js.131]'); //TODO self.csvReady = true; if (cb) return cb(); From 908344862c8eb9530520e22c87cba36b73b7d468 Mon Sep 17 00:00:00 2001 From: Matias Alejo Garcia Date: Sat, 4 Jun 2016 17:08:08 -0300 Subject: [PATCH 08/12] fix add new comment --- src/js/controllers/modals/txDetails.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/js/controllers/modals/txDetails.js b/src/js/controllers/modals/txDetails.js index 3b4704471..38dda5d08 100644 --- a/src/js/controllers/modals/txDetails.js +++ b/src/js/controllers/modals/txDetails.js @@ -14,7 +14,7 @@ angular.module('copayApp.controllers').controller('txDetailsController', functio $scope.isShared = fc.credentials.n > 1; $scope.showCommentPopup = function() { $scope.data = { - comment: $scope.btx.note.body + comment: $scope.btx.note ? $scope.btx.note.body : '', }; var commentPopup = $ionicPopup.show({ @@ -37,6 +37,7 @@ angular.module('copayApp.controllers').controller('txDetailsController', functio return; } // This is only to refresh the current screen data + $scope.btx.note = {}; $scope.btx.note.body = $scope.data.comment; $scope.btx.note.editedByName = fc.credentials.copayerName; $scope.btx.note.editedOn = Math.floor(Date.now() / 1000); From 443c67cce22d615ff38c1deeaee53c00592506b3 Mon Sep 17 00:00:00 2001 From: Matias Alejo Garcia Date: Sat, 4 Jun 2016 17:13:39 -0300 Subject: [PATCH 09/12] add edited by --- public/views/modals/tx-details.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/views/modals/tx-details.html b/public/views/modals/tx-details.html index 13648a80e..f0519af46 100644 --- a/public/views/modals/tx-details.html +++ b/public/views/modals/tx-details.html @@ -129,7 +129,7 @@ Comment {{btx.note.body}}
    - {{btx.note.editedByName}} + Edited by {{btx.note.editedByName}}, From c50fab16cb5ce6e3f5811d0cc5c953b338ad4187 Mon Sep 17 00:00:00 2001 From: Matias Alejo Garcia Date: Sat, 4 Jun 2016 17:33:06 -0300 Subject: [PATCH 10/12] add comment header --- src/js/controllers/preferencesHistory.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/js/controllers/preferencesHistory.js b/src/js/controllers/preferencesHistory.js index ac1e99f93..1f7e29418 100644 --- a/src/js/controllers/preferencesHistory.js +++ b/src/js/controllers/preferencesHistory.js @@ -64,7 +64,7 @@ angular.module('copayApp.controllers').controller('preferencesHistory', var satToBtc = 1 / 100000000; self.csvContent = []; self.csvFilename = 'Copay-' + (self.alias || self.walletName) + '.csv'; - self.csvHeader = ['Date', 'Destination', 'Description', 'Amount', 'Currency', 'Txid', 'Creator', 'Copayers']; + self.csvHeader = ['Date', 'Destination', 'Description', 'Amount', 'Currency', 'Txid', 'Creator', 'Copayers', 'Comment']; var _amount, _note, _copayers, _creator, _comment; data.forEach(function(it, index) { From b1a15d56c00fadb6dd6f523a0f2d7854f081a126 Mon Sep 17 00:00:00 2001 From: Matias Alejo Garcia Date: Sat, 4 Jun 2016 17:47:58 -0300 Subject: [PATCH 11/12] add comment to search --- public/views/includes/note.html | 2 +- public/views/modals/search.html | 18 +++++++++++------- src/js/controllers/index.js | 3 ++- src/js/controllers/modals/txDetails.js | 1 + 4 files changed, 15 insertions(+), 9 deletions(-) diff --git a/public/views/includes/note.html b/public/views/includes/note.html index ce0be26e4..8f984dd83 100644 --- a/public/views/includes/note.html +++ b/public/views/includes/note.html @@ -3,7 +3,7 @@ Enter a new comment Edit comment - +
    diff --git a/public/views/modals/search.html b/public/views/modals/search.html index 9fdb91128..747528921 100644 --- a/public/views/modals/search.html +++ b/public/views/modals/search.html @@ -31,14 +31,18 @@ sync
    - Received - - {{index.addressbook[btx.addressTo]}} - - {{btx.message}} + + + {{btx.note.body}} + Received - - Sent + + + + {{btx.message}} + {{btx.note.body}} + {{index.addressbook[btx.addressTo]}} + Sent Moved diff --git a/src/js/controllers/index.js b/src/js/controllers/index.js index 1e8773198..f9a4d8eb2 100644 --- a/src/js/controllers/index.js +++ b/src/js/controllers/index.js @@ -913,8 +913,9 @@ angular.module('copayApp.controllers').controller('indexController', function($r if (tx.addressTo && self.addressbook && self.addressbook[tx.addressTo]) addrbook = self.addressbook[tx.addressTo] || ''; var searchableDate = computeSearchableDate(new Date(tx.time * 1000)); var message = tx.message ? tx.message : ''; + var comment = tx.note ? tx.note.body : ''; var addressTo = tx.addressTo ? tx.addressTo : ''; - return ((tx.amountStr + message + addressTo + addrbook + searchableDate).toString()).toLowerCase(); + return ((tx.amountStr + message + addressTo + addrbook + searchableDate + comment).toString()).toLowerCase(); } function computeSearchableDate(date) { diff --git a/src/js/controllers/modals/txDetails.js b/src/js/controllers/modals/txDetails.js index 38dda5d08..e4df94c27 100644 --- a/src/js/controllers/modals/txDetails.js +++ b/src/js/controllers/modals/txDetails.js @@ -41,6 +41,7 @@ angular.module('copayApp.controllers').controller('txDetailsController', functio $scope.btx.note.body = $scope.data.comment; $scope.btx.note.editedByName = fc.credentials.copayerName; $scope.btx.note.editedOn = Math.floor(Date.now() / 1000); + $scope.btx.searcheableString = null; commentPopup.close(); }); }; From 7ef07bc0ee4d6064484617f9403b707d7a32341d Mon Sep 17 00:00:00 2001 From: Matias Alejo Garcia Date: Sat, 4 Jun 2016 17:52:34 -0300 Subject: [PATCH 12/12] allow to rm comment --- src/js/controllers/modals/txDetails.js | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/src/js/controllers/modals/txDetails.js b/src/js/controllers/modals/txDetails.js index e4df94c27..d4e227aec 100644 --- a/src/js/controllers/modals/txDetails.js +++ b/src/js/controllers/modals/txDetails.js @@ -1,6 +1,6 @@ 'use strict'; -angular.module('copayApp.controllers').controller('txDetailsController', function($rootScope, $log, $scope, $filter, $ionicPopup, gettextCatalog, profileService, configService) { +angular.module('copayApp.controllers').controller('txDetailsController', function($rootScope, $log, $scope, $filter, $ionicPopup, gettextCatalog, profileService, configService, lodash) { var self = $scope.self; var fc = profileService.focusedClient; @@ -14,7 +14,7 @@ angular.module('copayApp.controllers').controller('txDetailsController', functio $scope.isShared = fc.credentials.n > 1; $scope.showCommentPopup = function() { $scope.data = { - comment: $scope.btx.note ? $scope.btx.note.body : '', + comment: $scope.btx.note ? $scope.btx.note.body : '', }; var commentPopup = $ionicPopup.show({ @@ -28,19 +28,27 @@ angular.module('copayApp.controllers').controller('txDetailsController', functio $scope.commentPopupSave = function() { $log.debug('Saving note'); - fc.editTxNote({ + var args = { txid: $scope.btx.txid, - body: $scope.data.comment, - }, function(err) { + }; + + if (!lodash.isEmpty($scope.data.comment)) { + args.body = $scope.data.comment; + }; + + fc.editTxNote(args, function(err) { if (err) { $log.debug('Could not save tx comment'); return; } // This is only to refresh the current screen data - $scope.btx.note = {}; - $scope.btx.note.body = $scope.data.comment; - $scope.btx.note.editedByName = fc.credentials.copayerName; - $scope.btx.note.editedOn = Math.floor(Date.now() / 1000); + $scope.btx.note = null; + if (args.body) { + $scope.btx.note = {}; + $scope.btx.note.body = $scope.data.comment; + $scope.btx.note.editedByName = fc.credentials.copayerName; + $scope.btx.note.editedOn = Math.floor(Date.now() / 1000); + } $scope.btx.searcheableString = null; commentPopup.close(); });