Skip to content
This repository has been archived by the owner on Jul 9, 2021. It is now read-only.

Commit

Permalink
Merge pull request #1248 from 0xProject/fixLowercaseAddressBug
Browse files Browse the repository at this point in the history
Fix lowercase address bug in LedgerSubprovider and MnemonicSubprovider
  • Loading branch information
fabioberger authored Nov 13, 2018
2 parents 161a935 + 320460f commit 3fb2904
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 0 additions & 1 deletion packages/subproviders/src/subproviders/ledger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
3 changes: 2 additions & 1 deletion packages/subproviders/src/utils/wallet_utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 3fb2904

Please sign in to comment.