From dbce3f89356f55d2298ac3e7944106f5d57550f2 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Mon, 12 Nov 2018 13:20:41 +0100 Subject: Remove unused instance variable --- packages/subproviders/src/subproviders/ledger.ts | 1 - 1 file changed, 1 deletion(-) (limited to 'packages') diff --git a/packages/subproviders/src/subproviders/ledger.ts b/packages/subproviders/src/subproviders/ledger.ts index 28e348f90..b5ca10ce1 100644 --- a/packages/subproviders/src/subproviders/ledger.ts +++ b/packages/subproviders/src/subproviders/ledger.ts @@ -32,7 +32,6 @@ const DEFAULT_ADDRESS_SEARCH_LIMIT = 1000; */ export class LedgerSubprovider extends BaseWalletSubprovider { // tslint:disable-next-line:no-unused-variable - private readonly _nonceLock = new Lock(); private readonly _connectionLock = new Lock(); private readonly _networkId: number; private _baseDerivationPath: string; -- cgit From 320460feb92cbd65a504aca6fb095b1233776e29 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Mon, 12 Nov 2018 13:21:25 +0100 Subject: fix: lowercase supplied address before comparing with derived addresses (which are not checksummed) --- packages/subproviders/src/utils/wallet_utils.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'packages') diff --git a/packages/subproviders/src/utils/wallet_utils.ts b/packages/subproviders/src/utils/wallet_utils.ts index 4c233645b..7027ca8a0 100644 --- a/packages/subproviders/src/utils/wallet_utils.ts +++ b/packages/subproviders/src/utils/wallet_utils.ts @@ -56,10 +56,11 @@ export const walletUtils = { parentDerivedKeyInfo: DerivedHDKeyInfo, searchLimit: number, ): DerivedHDKeyInfo | undefined { + const lowercaseAddress = address.toLowerCase(); let matchedKey: DerivedHDKeyInfo | undefined; const derivedKeyIterator = new DerivedHDKeyInfoIterator(parentDerivedKeyInfo, searchLimit); for (const key of derivedKeyIterator) { - if (key.address === address) { + if (key.address === lowercaseAddress) { matchedKey = key; break; } -- cgit