To debug sign procedure (#4151)
* Should be considering the existence of a property and not its value. (#4139) * BETA to debug sign test on Android * add more logs * 1.11.4 * and even more logs... * 1.11.5 * better log messages * fix log decorator for mobile * fix android-prod * 1.11.6
This commit is contained in:
parent
8ffb01a355
commit
8b61189f85
11 changed files with 82 additions and 49 deletions
|
|
@ -62,7 +62,7 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi
|
|||
$log.debug('Cleaning WalletHome Instance');
|
||||
lodash.each(self, function(v, k) {
|
||||
if (lodash.isFunction(v)) return;
|
||||
if (vanillaScope[k]) {
|
||||
if (!lodash.isUndefined(vanillaScope[k])) {
|
||||
self[k] = vanillaScope[k];
|
||||
return;
|
||||
}
|
||||
|
|
@ -954,35 +954,48 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi
|
|||
|
||||
this.confirmTx = function(txp) {
|
||||
var self = this;
|
||||
|
||||
$log.info('at .confirmTx');
|
||||
txService.prepare({}, function(err) {
|
||||
$log.info('after .prepare:', err);
|
||||
if (err) {
|
||||
self.setOngoingProcess();
|
||||
$log.warn('confirmTx/Prepare error:', err);
|
||||
return self.setSendError(err);
|
||||
}
|
||||
self.setOngoingProcess(gettextCatalog.getString('Sending transaction'));
|
||||
txService.publishTx(txp, {}, function(err, txpPublished) {
|
||||
|
||||
$log.info('after .publishTx:', err);
|
||||
|
||||
if (err) {
|
||||
self.setOngoingProcess();
|
||||
self.setSendError(err);
|
||||
} else {
|
||||
txService.signAndBroadcast(txpPublished, {
|
||||
reporterFn: self.setOngoingProcess.bind(self)
|
||||
}, function(err, txp) {
|
||||
self.resetForm();
|
||||
return;
|
||||
}
|
||||
|
||||
if (err) {
|
||||
self.error = err.message ? err.message : gettext('The payment was created but could not be completed. Please try again from home screen');
|
||||
$scope.$emit('Local/TxProposalAction');
|
||||
$timeout(function() {
|
||||
$scope.$digest();
|
||||
}, 1);
|
||||
} else {
|
||||
go.walletHome();
|
||||
txStatus.notify(txp, function() {
|
||||
$scope.$emit('Local/TxProposalAction', txp.status == 'broadcasted');
|
||||
});
|
||||
}
|
||||
txService.signAndBroadcast(txpPublished, {
|
||||
reporterFn: self.setOngoingProcess.bind(self)
|
||||
}, function(err, txp) {
|
||||
$log.info('after .signAndBroadcast:', err);
|
||||
self.resetForm();
|
||||
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');
|
||||
$scope.$emit('Local/TxProposalAction');
|
||||
$timeout(function() {
|
||||
$scope.$digest();
|
||||
}, 1);
|
||||
return;
|
||||
}
|
||||
|
||||
$log.info('Transaction status:', txp.status);
|
||||
go.walletHome();
|
||||
txStatus.notify(txp, function() {
|
||||
$scope.$emit('Local/TxProposalAction', txp.status == 'broadcasted');
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue