From 72a3a0049ff957997dada433c283e5312e33a3c1 Mon Sep 17 00:00:00 2001 From: Tracey Boydston Date: Wed, 27 Jan 2021 10:29:02 +0800 Subject: [PATCH] Fixes pathing issue that caused an error when trying to verify if a coin had a test. --- ReadMe.md | 1 + hdAddressGenerator.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ReadMe.md b/ReadMe.md index 906c3e6..4648023 100644 --- a/ReadMe.md +++ b/ReadMe.md @@ -63,6 +63,7 @@ Note: Not all initiation functions require all options. - change: Used in HD address path to signify if address is for change. - bip38Password: Additional password used to encrypt private keys. - customPath: Custom path overwriting the path generated using bip/account/change. +- hashAlgo: Algorithm used to hash the address. Coin must have supporting network information. Options: p2pkh,p2wpkhInP2sh,p2wpkh ### Generate BIP 44(legacy),49(segwit compatible), or 84(bech32) address using mnemonic and optional pass phrase. diff --git a/hdAddressGenerator.js b/hdAddressGenerator.js index dada6fc..e8cd1f1 100644 --- a/hdAddressGenerator.js +++ b/hdAddressGenerator.js @@ -556,7 +556,7 @@ class AddressGenerator { coinHasTest(coinName){ let coinList = [] - const coins = fs.readdirSync('tests/coins') + const coins = fs.readdirSync(__dirname+'/tests/coins/') coins.forEach(coin => { coinList.push(coin.split(".")[0]) })