fix logs in txservice, add logs to bwc (#4164)

* fix logs in txservice, add logs to bwc

* 1.12.8 + add test for android

* new version 1.12.11

* revert changes in index
This commit is contained in:
Matias Alejo Garcia 2016-05-03 10:42:18 -03:00 committed by Gustavo Maximiliano Cortez
parent 0ee0988dd4
commit e7f1bbba7d
16 changed files with 70 additions and 39 deletions

View File

@ -56,7 +56,8 @@ ios-debug:
open cordova/project/platforms/ios/Copay.xcodeproj
android-prod:
cordova/build.sh ANDROID --clear
cordova/build.sh ANDROID --clear
rm -f cordova/project/platforms/android/build/outputs/apk/android-release-signed-aligned.apk
cd cordova/project && cordova build android --release
jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore ../copay.keystore -signedjar cordova/project/platforms/android/build/outputs/apk/android-release-signed.apk cordova/project/platforms/android/build/outputs/apk/android-release-unsigned.apk copay_play
../android-sdk-macosx/build-tools/21.1.1/zipalign -v 4 cordova/project/platforms/android/build/outputs/apk/android-release-signed.apk cordova/project/platforms/android/build/outputs/apk/android-release-signed-aligned.apk
@ -67,5 +68,5 @@ android-debug:
cd cordova/project && cordova run android
android-debug-fast:
cordova/build.sh ANDROID --dbgjs
cordova/build.sh ANDROID --dbgjs
cd cordova/project && cordova run android --device

View File

@ -29,6 +29,8 @@
<preference name="windows-target-version" value="8.1"/>
<preference name="Orientation" value="portrait" />
<platform name="ios">
<!-- iOS 8.0+ -->
<!-- iPad Pro -->

View File

@ -12,6 +12,6 @@
android.library.reference.1=CordovaLib
# Project target.
target=android-21
target=android-23
key.store=../../../copay.keystore
key.alias=copay_play

View File

@ -58,12 +58,12 @@ if [ ! -d $PROJECT ]; then
echo "${OpenColor}${Green}* Creating project... ${CloseColor}"
cordova create project com.bitpay.copay Copay
checkOK
cd $PROJECT
if [ $CURRENT_OS == "ANDROID" ]; then
echo "${OpenColor}${Green}* Adding Android platform... ${CloseColor}"
cordova platforms add android
echo "SSSSSSSSSSSSSSSSSSS";
cordova platforms add android@5.1.1
echo "SSSSSSSSSSSSSSSSSSS";
checkOK
fi

View File

@ -1,8 +1,8 @@
<?xml version='1.0' encoding='utf-8'?>
<widget id="com.bitpay.copay"
version="1.12.1"
android-versionCode="90"
ios-CFBundleVersion="1.12.1">
version="1.12.11"
android-versionCode="101"
ios-CFBundleVersion="1.12.11">
<name>Copay</name>
<description>
A secure bitcoin wallet for friends and companies.
@ -29,6 +29,8 @@
<preference name="windows-target-version" value="8.1"/>
<preference name="Orientation" value="portrait" />
<platform name="ios">
<!-- iOS 8.0+ -->
<!-- iPad Pro -->

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Package xmlns="http://schemas.microsoft.com/appx/2010/manifest" xmlns:m2="http://schemas.microsoft.com/appx/2013/manifest" xmlns:m3="http://schemas.microsoft.com/appx/2014/manifest" xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest">
<Identity Name="18C7659D.CopayWallet" Publisher="CN=F89609D1-EB3E-45FD-A58A-C2E3895FCE7B" Version="1.12.1.0" />
<Identity Name="18C7659D.CopayWallet" Publisher="CN=F89609D1-EB3E-45FD-A58A-C2E3895FCE7B" Version="1.12.11.0" />
<mp:PhoneIdentity PhoneProductId="5381aa50-9069-11e4-84cc-293caf9cbdc8" PhonePublisherId="F89609D1-EB3E-45FD-A58A-C2E3895FCE7B" />
<Properties>
<DisplayName>Copay Bitcoin Wallet</DisplayName>

View File

@ -11,7 +11,7 @@
<Language code="pl" />
<Language code="cs" />
</Languages>
<App Author="Bitpay Inc." BitsPerPixel="32" Description="A multisignature Bitcoin Wallet" Genre="apps.normal" ProductID="{5381aa50-9069-11e4-84cc-293caf9cbdc8}" Publisher="Copay Bitcoin Wallet" PublisherID="{31cdd08b-457c-413d-b440-f6665eec847d}" RuntimeType="Silverlight" Title="Copay Bitcoin Wallet" Version="1.12.1.0" xmlns="" NotificationService="MPN">
<App Author="Bitpay Inc." BitsPerPixel="32" Description="A multisignature Bitcoin Wallet" Genre="apps.normal" ProductID="{5381aa50-9069-11e4-84cc-293caf9cbdc8}" Publisher="Copay Bitcoin Wallet" PublisherID="{31cdd08b-457c-413d-b440-f6665eec847d}" RuntimeType="Silverlight" Title="Copay Bitcoin Wallet" Version="1.12.11.0" xmlns="" NotificationService="MPN">
<IconPath IsRelative="true" IsResource="false">Assets\icon@2.png</IconPath>
<Capabilities>
<Capability Name="ID_CAP_WEBBROWSERCOMPONENT" />

View File

@ -2,8 +2,8 @@
"name": "copay",
"description": "A multisignature wallet",
"author": "BitPay",
"version": "1.12.1",
"androidVersionCode": "90",
"version": "1.12.11",
"androidVersionCode": "101",
"keywords": [
"wallet",
"copay",

View File

@ -8,6 +8,15 @@
<h4 class="title m0" translate>Wallet Information</h4>
<ul class="no-bullet m0 size-14">
<li class="line-b p20 oh " ng-if="androidTest">
<span style="color:red" translate>BETA: Android Key Derivation Test:</span>
<span class="right text-gray">
{{androidTest}}
</span>
</li>
<li class="line-b p20 oh">
<span translate>Wallet Name (at creation)</span>
<span class="right text-gray">

View File

@ -82,6 +82,7 @@ angular.module('copayApp.controllers').controller('importController',
};
var _importExtendedPrivateKey = function(xPrivKey, opts) {
console.log('[import.js.84:xPrivKey:]',xPrivKey); //TODO
self.loading = true;
$timeout(function() {

View File

@ -1,7 +1,7 @@
'use strict';
angular.module('copayApp.controllers').controller('preferencesInformation',
function($scope, $log, $timeout, isMobile, gettextCatalog, lodash, profileService, storageService, go) {
function($scope, $log, $timeout, isMobile, gettextCatalog, lodash, profileService, storageService, go, bitcore) {
var base = 'xpub';
var fc = profileService.focusedClient;
var c = fc.credentials;
@ -20,6 +20,20 @@ angular.module('copayApp.controllers').controller('preferencesInformation',
$scope.pubKeys = lodash.pluck(c.publicKeyRing, 'xPubKey');
$scope.addrs = null;
if (isMobile.Android()) {
$scope.androidTest = 'testing';
var xp = bitcore.HDPrivateKey("tprv8ZgxMBicQKsPebv8CVghFoaaZ6ejmcSmSaKo99sUnswCCPeccGbLzfoksA2wd5XdHe8UHLwM2emuBWD4cBvQ7BPTJhFu75u3HcSjRVFmYM9");
var pub = xp.derive("m/44'/1'/0'").hdPublicKey.toString();
if (pub == 'tpubDCe5stHkJZhfNMpQLgqRVYjSfADoosJ7FvxukgyXf1YzrCnru2z61giPXbgJGGxnHt922CY22DDDYD6d28jnd9okctoXNW837TmbNaAEM99') {
$scope.androidTest = 'OK, TEST PASSED';
} else {
$scope.androidTest = 'FAILED!! Please report to matias@bitpay.com. Result:' + pub;
}
}
fc.getMainAddresses({
doNotVerify: true
}, function(err, addrs) {

View File

@ -439,6 +439,8 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi
self.setOngoingProcess(gettextCatalog.getString('Rejecting payment'));
$scope.loading = true;
$scope.error = null;
// TODO: This should be in txService
$timeout(function() {
fc.rejectTxProposal(txp, null, function(err, txpr) {
self.setOngoingProcess();
@ -982,7 +984,7 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi
self.setOngoingProcess();
if (err) {
self.error = err.message ? err.message : gettext('The payment was created but could not be completed. Please try again from home screen');
self.error = bwsError.msg(err, gettextCatalog.getString('The payment was created but could not be completed. Please try again from home screen'));
$scope.$emit('Local/TxProposalAction');
$timeout(function() {
$scope.$digest();

View File

@ -76,6 +76,9 @@ angular.module('copayApp.services')
var client = bwcService.getClient(JSON.stringify(credentials));
root.walletClients[credentials.walletId] = client;
client.removeAllListeners();
client.on('report', function(n) {
$log.info('BWC Report:'+ n);
});
client.on('notification', function(n) {
$log.debug('BWC Notification:', n);
@ -118,6 +121,7 @@ angular.module('copayApp.services')
root.setWalletClients = function() {
var credentials = root.profile.credentials;
lodash.each(credentials, function(credential) {
//$log.info("Credentials:", credentials);
root.setWalletClient(credential);
});
$rootScope.$emit('Local/WalletListUpdated');
@ -673,18 +677,18 @@ angular.module('copayApp.services')
$log.debug('Wallet is encrypted');
$rootScope.$emit('Local/NeedsPassword', false, function(err2, password) {
if (err2 || !password) {
return cb({
message: (err2 || gettext('Password needed'))
});
}
if (err2)
return cb(err2);
if (!password)
return cb(gettext('Password needed'));
try {
fc.unlock(password);
} catch (e) {
$log.debug(e);
return cb({
message: gettext('Wrong password')
});
$log.warn('Error decrypting wallet:', e);
return cb(gettext('Wrong password'));
}
return cb();
});

View File

@ -75,6 +75,7 @@ angular.module('copayApp.services').factory('txService', function($rootScope, pr
$log.info("at .prepare");
opts = opts || {};
var fc = opts.selectedClient || profileService.focusedClient;
$log.info('FC Client Dump:' + fc);
if (!fc.canSign() && !fc.isPrivKeyExternal())
return cb('Cannot sign'); // should never happen, no need to translate
@ -198,18 +199,13 @@ angular.module('copayApp.services').factory('txService', function($rootScope, pr
txp.signatures = null;
$log.info('at .sign: (isEncrypted):', fc.isPrivKeyEncrypted());
$log.info('txp BEFORE:', txp);
$log.info('txp BEFORE .signTxProposal:', txp);
try {
fc.signTxProposal(txp, function(err, signedTxp) {
$log.info('txp AFTER:',err, signedTxp);
profileService.lockFC();
return cb(err, signedTxp);
});
} catch (e) {
$log.warn('Error at signTxProposal:', e);
return cb(e);
}
fc.signTxProposal(txp, function(err, signedTxp) {
$log.info('txp AFTER .signTxProposal:',err, signedTxp);
profileService.lockFC();
return cb(err, signedTxp);
});
}
};
@ -222,7 +218,7 @@ angular.module('copayApp.services').factory('txService', function($rootScope, pr
root.sign(txp, opts, function(err, txp) {
if (err) {
stopReport(opts);
return cb(bwsError.msg(err), gettextCatalog.getString('Could not accept payment'));
return bwsError.cb(err, gettextCatalog.getString('Could not accept payment'), cb);
};
if (txp.status != 'accepted') {
@ -235,7 +231,7 @@ angular.module('copayApp.services').factory('txService', function($rootScope, pr
stopReport(opts);
if (err) {
return cb(bwsError.msg(err, gettextCatalog.getString('Could not broadcast payment')));
return bwsError.cb(err, gettextCatalog.getString('Could not broadcast payment'), cb);
};
$log.debug('Transaction signed and broadcasted')

View File

@ -1,6 +1,6 @@
[Desktop Entry]
Type=Application
Version=1.12.1
Version=1.12.11
Name=Copay
Comment=A multisignature wallet
Exec=copay

View File

@ -2,7 +2,7 @@
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
#define MyAppName "Copay"
#define MyAppVersion "1.12.1"
#define MyAppVersion "1.12.11"
#define MyAppPublisher "BitPay"
#define MyAppURL "https://copay.io"
#define MyAppExeName "Copay.exe"