aboutsummaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2018-11-12 20:21:25 +0800
committerFabio Berger <me@fabioberger.com>2018-11-12 20:21:25 +0800
commit320460feb92cbd65a504aca6fb095b1233776e29 (patch)
tree7910c1a8d0eede6c29b0ea75bb39659b02b14725 /packages
parentdbce3f89356f55d2298ac3e7944106f5d57550f2 (diff)
downloaddexon-sol-tools-320460feb92cbd65a504aca6fb095b1233776e29.tar
dexon-sol-tools-320460feb92cbd65a504aca6fb095b1233776e29.tar.gz
dexon-sol-tools-320460feb92cbd65a504aca6fb095b1233776e29.tar.bz2
dexon-sol-tools-320460feb92cbd65a504aca6fb095b1233776e29.tar.lz
dexon-sol-tools-320460feb92cbd65a504aca6fb095b1233776e29.tar.xz
dexon-sol-tools-320460feb92cbd65a504aca6fb095b1233776e29.tar.zst
dexon-sol-tools-320460feb92cbd65a504aca6fb095b1233776e29.zip
fix: lowercase supplied address before comparing with derived addresses (which are not checksummed)
Diffstat (limited to 'packages')
-rw-r--r--packages/subproviders/src/utils/wallet_utils.ts3
1 files changed, 2 insertions, 1 deletions
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;
}