aboutsummaryrefslogtreecommitdiffstats
path: root/packages/subproviders/src/subproviders/ledger.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/subproviders/src/subproviders/ledger.ts')
-rw-r--r--packages/subproviders/src/subproviders/ledger.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/packages/subproviders/src/subproviders/ledger.ts b/packages/subproviders/src/subproviders/ledger.ts
index 0c037b488..9b2d9d7d0 100644
--- a/packages/subproviders/src/subproviders/ledger.ts
+++ b/packages/subproviders/src/subproviders/ledger.ts
@@ -222,7 +222,7 @@ export class LedgerSubprovider extends BaseWalletSubprovider {
};
}
private _findDerivedKeyByPublicAddress(initalHDKey: DerivedHDKey, address: string): DerivedHDKey {
- if (_.isUndefined(address)) {
+ if (_.isUndefined(address) || !addressUtils.isAddress(address)) {
throw new Error(WalletSubproviderErrors.FromAddressMissingOrInvalid);
}
const matchedDerivedKey = walletUtils.findDerivedKeyByAddress(address, initalHDKey, this._addressSearchLimit);