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.externalSource = walletService.externalSource.trezor.id;
|
||||||
lopts.bwsurl = $scope.formData.bwsurl;
|
lopts.bwsurl = $scope.formData.bwsurl;
|
||||||
|
lopts.account = account;
|
||||||
ongoingProcess.set('importingWallet', true);
|
ongoingProcess.set('importingWallet', true);
|
||||||
$log.debug('Import opts', lopts);
|
$log.debug('Import opts', lopts);
|
||||||
|
|
||||||
|
@ -353,6 +354,7 @@ angular.module('copayApp.controllers').controller('importController',
|
||||||
|
|
||||||
lopts.externalSource = lopts.externalSource = walletService.externalSource.ledger.id;
|
lopts.externalSource = lopts.externalSource = walletService.externalSource.ledger.id;
|
||||||
lopts.bwsurl = $scope.formData.bwsurl;
|
lopts.bwsurl = $scope.formData.bwsurl;
|
||||||
|
lopts.account = account;
|
||||||
ongoingProcess.set('importingWallet', true);
|
ongoingProcess.set('importingWallet', true);
|
||||||
$log.debug('Import opts', lopts);
|
$log.debug('Import opts', lopts);
|
||||||
|
|
||||||
|
|
|
@ -93,7 +93,6 @@ angular.module('copayApp.services')
|
||||||
outputs = [];
|
outputs = [];
|
||||||
var tmpOutputs = [];
|
var tmpOutputs = [];
|
||||||
|
|
||||||
|
|
||||||
if (txp.type && txp.type != 'simple') {
|
if (txp.type && txp.type != 'simple') {
|
||||||
return callback('Only TXPs type SIMPLE are supported in TREZOR');
|
return callback('Only TXPs type SIMPLE are supported in TREZOR');
|
||||||
} else if (txp.outputs) {
|
} else if (txp.outputs) {
|
||||||
|
@ -170,7 +169,6 @@ angular.module('copayApp.services')
|
||||||
return '';
|
return '';
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
inputs = lodash.map(txp.inputs, function(i) {
|
inputs = lodash.map(txp.inputs, function(i) {
|
||||||
$log.debug("Trezor TX input path:", i.path);
|
$log.debug("Trezor TX input path:", i.path);
|
||||||
var pathArr = i.path.split('/');
|
var pathArr = i.path.split('/');
|
||||||
|
@ -180,12 +178,12 @@ angular.module('copayApp.services')
|
||||||
inAmount += i.satoshis;
|
inAmount += i.satoshis;
|
||||||
|
|
||||||
var orderedPubKeys = root._orderPubKeys(xPubKeys, np);
|
var orderedPubKeys = root._orderPubKeys(xPubKeys, np);
|
||||||
var pubkeys = lodash(orderedPubKeys.map(function(v) {
|
var pubkeys = orderedPubKeys.map(function(v) {
|
||||||
return {
|
return {
|
||||||
node: v,
|
node: v,
|
||||||
address_n: np,
|
address_n: np,
|
||||||
};
|
};
|
||||||
}));
|
});
|
||||||
|
|
||||||
return {
|
return {
|
||||||
address_n: n,
|
address_n: n,
|
||||||
|
@ -208,12 +206,12 @@ angular.module('copayApp.services')
|
||||||
var np = n.slice(3);
|
var np = n.slice(3);
|
||||||
|
|
||||||
var orderedPubKeys = root._orderPubKeys(xPubKeys, np);
|
var orderedPubKeys = root._orderPubKeys(xPubKeys, np);
|
||||||
var pubkeys = lodash(orderedPubKeys.map(function(v) {
|
var pubkeys = orderedPubKeys.map(function(v) {
|
||||||
return {
|
return {
|
||||||
node: v,
|
node: v,
|
||||||
address_n: np,
|
address_n: np,
|
||||||
};
|
};
|
||||||
}));
|
});
|
||||||
|
|
||||||
tmpOutputs.push({
|
tmpOutputs.push({
|
||||||
address_n: n,
|
address_n: n,
|
||||||
|
|
Loading…
Reference in New Issue