fix account setting in Trezor/Ledger

This commit is contained in:
Matias Alejo Garcia 2017-06-13 14:44:39 -03:00
commit c5ffc4e7dd
No known key found for this signature in database
GPG key ID: 02470DB551277AB3
2 changed files with 6 additions and 6 deletions

View file

@ -297,6 +297,7 @@ angular.module('copayApp.controllers').controller('importController',
lopts.externalSource = walletService.externalSource.trezor.id;
lopts.bwsurl = $scope.formData.bwsurl;
lopts.account = account;
ongoingProcess.set('importingWallet', true);
$log.debug('Import opts', lopts);
@ -353,6 +354,7 @@ angular.module('copayApp.controllers').controller('importController',
lopts.externalSource = lopts.externalSource = walletService.externalSource.ledger.id;
lopts.bwsurl = $scope.formData.bwsurl;
lopts.account = account;
ongoingProcess.set('importingWallet', true);
$log.debug('Import opts', lopts);

View file

@ -93,7 +93,6 @@ angular.module('copayApp.services')
outputs = [];
var tmpOutputs = [];
if (txp.type && txp.type != 'simple') {
return callback('Only TXPs type SIMPLE are supported in TREZOR');
} else if (txp.outputs) {
@ -170,7 +169,6 @@ angular.module('copayApp.services')
return '';
});
inputs = lodash.map(txp.inputs, function(i) {
$log.debug("Trezor TX input path:", i.path);
var pathArr = i.path.split('/');
@ -180,12 +178,12 @@ angular.module('copayApp.services')
inAmount += i.satoshis;
var orderedPubKeys = root._orderPubKeys(xPubKeys, np);
var pubkeys = lodash(orderedPubKeys.map(function(v) {
var pubkeys = orderedPubKeys.map(function(v) {
return {
node: v,
address_n: np,
};
}));
});
return {
address_n: n,
@ -208,12 +206,12 @@ angular.module('copayApp.services')
var np = n.slice(3);
var orderedPubKeys = root._orderPubKeys(xPubKeys, np);
var pubkeys = lodash(orderedPubKeys.map(function(v) {
var pubkeys = orderedPubKeys.map(function(v) {
return {
node: v,
address_n: np,
};
}));
});
tmpOutputs.push({
address_n: n,