better error handling 2
This commit is contained in:
parent
9918f95289
commit
ba9d6b044b
2 changed files with 20 additions and 20 deletions
|
|
@ -569,15 +569,11 @@ console.log('[profileService.js.239:walletClient:]',walletClient); //TODO
|
|||
var fc = root.focusedClient;
|
||||
$log.info('Requesting Trezor to sign the transaction');
|
||||
|
||||
console.log('[profileService.js.570] xPub:', fc.credentials.xPubKey); //TODO
|
||||
var xPubKeys = lodash.pluck(fc.credentials.publicKeyRing,'xPubKey');
|
||||
console.log('[profileService.js.571:xPubKeys:]',xPubKeys); //TODO
|
||||
trezor.signTx(xPubKeys, txp, 0, function(err, result) {
|
||||
if (err) return cb(err);
|
||||
|
||||
trezor.signTx(xPubKeys, txp, 0, function(result) {
|
||||
$log.debug('Trezor response',result);
|
||||
if (!result.success)
|
||||
return cb(result.error || result);
|
||||
|
||||
txp.signatures = result.signatures;
|
||||
return fc.signTxProposal(txp, cb);
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue