use ledger magic number path for entropy source
This commit is contained in:
parent
06c76d6351
commit
76bc61cf99
1 changed files with 5 additions and 3 deletions
|
|
@ -5,7 +5,9 @@ angular.module('copayApp.services')
|
|||
var root = {};
|
||||
var LEDGER_CHROME_ID = "kkdpmhnladdopljabkgpacgpliggeeaf";
|
||||
root.MAX_SLOT = 20;
|
||||
root.ENTROPY_INDEX_START = 1000;
|
||||
|
||||
// Ledger magic number to get xPub without user confirmation
|
||||
root.ENTROPY_INDEX_PATH = "m/0xb11e'/";
|
||||
|
||||
root.callbacks = {};
|
||||
|
||||
|
|
@ -16,8 +18,8 @@ angular.module('copayApp.services')
|
|||
}
|
||||
|
||||
root.getEntropySource = function(index, callback) {
|
||||
index = index + root.ENTROPY_INDEX_START;
|
||||
var xpub = root.getXPubKey("m/" + index + "'", function(data) {
|
||||
var path = root.ENTROPY_INDEX_PATH + index + "'";
|
||||
var xpub = root.getXPubKey(path, function(data) {
|
||||
if (!data.success) {
|
||||
$log.warn(data.message);
|
||||
return callback(data);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue