mirror of https://github.com/BTCPrivate/copay.git
Merge pull request #6239 from matiu/bug/hw-account-multisig
fix account setting in Trezor/Ledger
This commit is contained in:
commit
47de701456
|
@ -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);
|
||||
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue