aboutsummaryrefslogtreecommitdiffstats
path: root/packages/subproviders/src/utils
diff options
context:
space:
mode:
authorJacob Evans <jacob@dekz.net>2018-04-11 12:22:02 +0800
committerJacob Evans <jacob@dekz.net>2018-04-11 12:39:55 +0800
commit3ad693d33409dfd9d61beff3f43c4abaa369c6b1 (patch)
tree54eb616082ac245555a8072020b387a50eee42fa /packages/subproviders/src/utils
parent4aa67e292504fea307a4e5f15a124349fc769da6 (diff)
downloaddexon-sol-tools-3ad693d33409dfd9d61beff3f43c4abaa369c6b1.tar
dexon-sol-tools-3ad693d33409dfd9d61beff3f43c4abaa369c6b1.tar.gz
dexon-sol-tools-3ad693d33409dfd9d61beff3f43c4abaa369c6b1.tar.bz2
dexon-sol-tools-3ad693d33409dfd9d61beff3f43c4abaa369c6b1.tar.lz
dexon-sol-tools-3ad693d33409dfd9d61beff3f43c4abaa369c6b1.tar.xz
dexon-sol-tools-3ad693d33409dfd9d61beff3f43c4abaa369c6b1.tar.zst
dexon-sol-tools-3ad693d33409dfd9d61beff3f43c4abaa369c6b1.zip
Test valid address format but not found
Diffstat (limited to 'packages/subproviders/src/utils')
-rw-r--r--packages/subproviders/src/utils/wallet_utils.ts9
1 files changed, 5 insertions, 4 deletions
diff --git a/packages/subproviders/src/utils/wallet_utils.ts b/packages/subproviders/src/utils/wallet_utils.ts
index 097d2b82f..d5ebf5ce6 100644
--- a/packages/subproviders/src/utils/wallet_utils.ts
+++ b/packages/subproviders/src/utils/wallet_utils.ts
@@ -22,19 +22,20 @@ class DerivedHDKeyIterator implements IterableIterator<DerivedHDKey> {
public next(): IteratorResult<DerivedHDKey> {
const derivationBasePath = this._initialDerivedKey.derivationBasePath;
const derivationIndex = this._index;
+ const isChildKey = this._initialDerivedKey.isChildKey;
// If the DerivedHDKey is a child then we walk relative, if not we walk the full derivation path
const fullDerivationPath = `m/${derivationBasePath}/${derivationIndex}`;
const relativeDerivationPath = `m/${derivationIndex}`;
- const path = this._initialDerivedKey.isChildKey ? relativeDerivationPath : fullDerivationPath;
+ const path = isChildKey ? relativeDerivationPath : fullDerivationPath;
const hdKey = this._initialDerivedKey.hdKey.derive(path);
const address = walletUtils.addressOfHDKey(hdKey);
const derivedKey: DerivedHDKey = {
address,
hdKey,
- derivationPath: fullDerivationPath,
- derivationBasePath: this._initialDerivedKey.derivationBasePath,
+ derivationBasePath,
derivationIndex,
- isChildKey: this._initialDerivedKey.isChildKey,
+ derivationPath: fullDerivationPath,
+ isChildKey,
};
const done = this._index === this._searchLimit;
this._index++;