Merge pull request #39 from bitpay/bug/fingerprint

Bug/fingerprint
This commit is contained in:
Gustavo Maximiliano Cortez 2016-09-01 18:15:54 -03:00 committed by GitHub
commit 7e2d3e74b2
10 changed files with 73 additions and 49 deletions

View file

@ -42,4 +42,4 @@ wp: build-wp
androidrun: androidrun:
make -C $(WORKDIR)android run make -C $(WORKDIR)android run
adb logcat | grep copay.js adb logcat | grep chromium

View file

@ -5,7 +5,7 @@
"manifest_version": 2, "manifest_version": 2,
"name": "BitPay", "name": "BitPay",
"description": "The BitPay Bitcoin Wallet", "description": "The BitPay Bitcoin Wallet",
"version": "0.7.0", "version": "0.8.0",
"permissions": [ "permissions": [
"storage", "storage",
"unlimitedStorage", "unlimitedStorage",

View file

@ -6,7 +6,7 @@
"name": "bitpay", "name": "bitpay",
"description": "The BitPay Bitcoin Wallet", "description": "The BitPay Bitcoin Wallet",
"author": "BitPay", "author": "BitPay",
"version": "0.7.0", "version": "0.8.0",
"keywords": [ "keywords": [
"wallet", "wallet",
"copay", "copay",

View file

@ -1,14 +1,14 @@
<span class="wallet-activity"> <span class="wallet-activity">
<div ng-if="x.types.indexOf('NewCopayer')>=0 && x.wallet.n>1"> <div ng-if="x.type == 'NewCopayer' && x.wallet.n>1">
Copayer joined Copayer joined
</div> </div>
<div ng-if="x.types.indexOf('NewCopayer')>=0 && x.wallet.n==1"> <div ng-if="x.type == 'NewCopayer' && x.wallet.n==1">
Wallet created Wallet created
</div> </div>
<div ng-if="x.types.indexOf('NewOutgoingTx')>=0"> <div ng-if="x.type == 'NewOutgoingTx'">
<span translate>Payment Sent </span> <span translate>Payment Sent </span>
<div class="wallet-activity-amount"> <div class="wallet-activity-amount">
{{x.amountStr}} {{x.amountStr}}
@ -17,36 +17,48 @@
<div ng-if="x.types.indexOf('NewIncomingTx')>=0"> <div ng-if="x.type == 'NewIncomingTx'">
<span translate>Payment Received</span> <span translate>Payment Received</span>
<div class="wallet-activity-amount"> <div class="wallet-activity-amount">
{{x.amountStr}} {{x.amountStr}}
</div> </div>
</div> </div>
<div ng-if="x.types.indexOf('TxProposalRemoved')>=0"> <div ng-if="x.type == 'TxProposalRemoved'">
<i class="icon ion-ios-close-empty size-21" ng-style="{'color':x.wallet.color}"></i> <i class="icon ion-ios-close-empty size-21" ng-style="{'color':x.wallet.color}"></i>
<span translate>Proposal Deleted</span> <span translate>Proposal Deleted</span>:
<i>{{x.message}}</i>
<div class="wallet-activity-amount">
{{x.amountStr}}:
</div>
</div> </div>
<div ng-if="x.types.indexOf('TxProposalRejected')>=0"> <div ng-if="x.type == 'TxProposalRejected'">
<i class="icon ion-ios-close-empty size-21" ng-style="{'color':x.wallet.color}"></i> <i class="icon ion-ios-close-empty size-21" ng-style="{'color':x.wallet.color}"></i>
<span translate>Proposal Rejected</span> <span translate>Proposal Rejected</span>:
<i>{{x.message}}</i>
<div class="wallet-activity-amount">
{{x.amountStr}}:
</div>
</div> </div>
<div ng-if="x.types.indexOf('TxProposalRemoved') == -1 && x.types.indexOf('TxProposalRejected') == -1"> <span ng-if="x.type == 'NewTxProposal'">
<span ng-if="x.types.indexOf('NewTxProposal')>=0 && x.types.indexOf('NewOutgoingTx')==-1 "> <i class="icon ion-arrow-up-c size-21" ng-style="{'color':x.wallet.color}"></i>
<i class="icon ion-arrow-up-c size-21" ng-style="{'color':x.wallet.color}"></i> <span translate>New Proposal</span>:
<i>{{x.message}}</i>
{{x.amountStr}} <div class="wallet-activity-amount">
<i>{{x.message}}</i> {{x.amountStr}}
</span> </div>
<span ng-if="x.types.indexOf('TxProposalAcceptedBy')>=0 && x.types.indexOf('NewTxProposal') == -1 && x.types.indexOf('NewOutgoingTx')==-1"> </span>
<i class="icon ion-checkmark-round size-21" ng-style="{'color':x.wallet.color}"></i>
<span translate>Proposal Accepted</span>
</span>
</div>
<span ng-if="x.type == 'TxProposalAcceptedBy'">
<i class="icon ion-checkmark-round size-21" ng-style="{'color':x.wallet.color}"></i>
<span translate>Proposal Accepted</span>
<i>{{x.message}}</i>
<div class="wallet-activity-amount">
{{x.amountStr}}
</div>
</span>
<p class="wallet-activity-note"> <p class="wallet-activity-note">
<!-- {{x.types}} --> <!-- {{x.types}} -->

View file

@ -69,10 +69,12 @@ angular.module('copayApp.controllers').controller('preferencesController',
$scope.touchIdChange = function() { $scope.touchIdChange = function() {
var newStatus = $scope.touchIdEnabled; var newStatus = $scope.touchIdEnabled;
walletService.setTouchId(wallet, newStatus, function(err) { walletService.setTouchId(wallet, !!newStatus, function(err) {
if (err) { if (err) {
$log.warn(err);
$scope.touchIdEnabled = !newStatus; $scope.touchIdEnabled = !newStatus;
$timeout(function() {
$scope.$apply();
}, 1);
return; return;
} }
$log.debug('Touch Id status changed: ' + newStatus); $log.debug('Touch Id status changed: ' + newStatus);

View file

@ -58,7 +58,6 @@ angular.module('copayApp.controllers').controller('tabHomeController',
profileService.getNotifications({ profileService.getNotifications({
limit: 3 limit: 3
}, function(err, n) { }, function(err, n) {
console.log('[tab-home.js.57]', n); //TODO
if (err) { if (err) {
console.log('[tab-home.js.35:err:]', $log.error(err)); //TODO console.log('[tab-home.js.35:err:]', $log.error(err)); //TODO
return; return;

View file

@ -822,25 +822,29 @@ angular.module('copayApp.services')
}; };
}); });
// condense
var finale = [],
prev;
var finale = shown; // GROUPING DISABLED!
lodash.each(shown, function(x) { // var finale = [],
if (prev && prev.walletId === x.walletId && prev.txpId && prev.txpId === x.txpId && prev.creatorId && prev.creatorId === x.creatorId) { // prev;
prev.types.push(x.type); //
prev.data = lodash.assign(prev.data, x.data); //
prev.txid = prev.txid || x.txid; // // Item grouping... DISABLED.
prev.amountStr = prev.amountStr || x.amountStr; //
prev.creatorName = prev.creatorName || x.creatorName; // // REMOVE (if we want 1-to-1 notification) ????
} else { // lodash.each(shown, function(x) {
finale.push(x); // if (prev && prev.walletId === x.walletId && prev.txpId && prev.txpId === x.txpId && prev.creatorId && prev.creatorId === x.creatorId) {
prev = x; // 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;
// messages... // prev.creatorName = prev.creatorName || x.creatorName;
// } else {
// finale.push(x);
// prev = x;
// }
// });
//
var u = bwcService.getUtils(); var u = bwcService.getUtils();
lodash.each(finale, function(x) { lodash.each(finale, function(x) {

View file

@ -995,10 +995,17 @@ angular.module('copayApp.services').factory('walletService', function($log, $tim
}; };
root.setTouchId = function(wallet, enabled, cb) { root.setTouchId = function(wallet, enabled, cb) {
var opts = {
touchIdFor: {}
};
opts.touchIdFor[wallet.id] = enabled;
fingerprintService.check(wallet, function(err) { fingerprintService.check(wallet, function(err) {
if (err) return cb(err); { if (err) {
$log.debug(err); opts.touchIdFor[wallet.id] = !enabled;
return; $log.debug('Error with fingerprint:' + err);
return cb(err);
} }
configService.set(opts, cb); configService.set(opts, cb);
}); });

View file

@ -1,6 +1,6 @@
[Desktop Entry] [Desktop Entry]
Type=Application Type=Application
Version=0.7.0 Version=0.8.0
Name=BitPay Name=BitPay
Comment=The BitPay Bitcoin Wallet Comment=The BitPay Bitcoin Wallet
Exec=bitpay Exec=bitpay

View file

@ -2,7 +2,7 @@
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES! ; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
#define MyAppName "bitpay" #define MyAppName "bitpay"
#define MyAppVersion "0.7.0" #define MyAppVersion "0.8.0"
#define MyAppPublisher "BitPay" #define MyAppPublisher "BitPay"
#define MyAppURL "https://bitpay.com" #define MyAppURL "https://bitpay.com"
#define MyAppExeName "*NAMECASENOSPACE.exe" #define MyAppExeName "*NAMECASENOSPACE.exe"