@binance-chain/bsc-ledger-bridge-keyring
Advanced tools
Comparing version 0.2.14 to 0.2.15
@@ -162,3 +162,3 @@ const { EventEmitter } = require('events') | ||
// tx is an instance of the ethereumjs-transaction class. | ||
signTransaction (address, tx) { | ||
signTransaction (address, tx, accountIndex) { | ||
return new Promise((resolve, reject) => { | ||
@@ -173,3 +173,3 @@ this.unlock().then((_) => { | ||
const checksummedAddress = ethUtil.toChecksumAddress(address) | ||
if (!Object.keys(this.accountIndexes).includes(checksummedAddress)) { | ||
if (!Object.keys(this.accountIndexes).includes(checksummedAddress) && !accountIndex) { | ||
reject( | ||
@@ -181,5 +181,4 @@ new Error( | ||
} | ||
hdPath = this._getPathForIndex( | ||
this.accountIndexes[checksummedAddress], | ||
) | ||
const index = this.accountIndexes[checksummedAddress] || accountIndex | ||
hdPath = this._getPathForIndex(index) | ||
} else { | ||
@@ -186,0 +185,0 @@ hdPath = this._toLedgerPath(this._pathFromAddress(address)) |
{ | ||
"name": "@binance-chain/bsc-ledger-bridge-keyring", | ||
"version": "0.2.14", | ||
"version": "0.2.15", | ||
"description": "A MetaMask compatible keyring, for ledger hardware wallets", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
15098
430