From adf56229c6cc83003d319ea9a004677e2555d478 Mon Sep 17 00:00:00 2001 From: Richard Moore Date: Mon, 20 Jan 2020 19:34:55 -0500 Subject: [PATCH] Fixed imports after refactor. --- packages/hdnode/src.ts/index.ts | 6 +++--- packages/pbkdf2/src.ts/browser.ts | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/hdnode/src.ts/index.ts b/packages/hdnode/src.ts/index.ts index 2be84fd850..d15e58531b 100644 --- a/packages/hdnode/src.ts/index.ts +++ b/packages/hdnode/src.ts/index.ts @@ -12,7 +12,7 @@ import { toUtf8Bytes, UnicodeNormalizationForm } from "@ethersproject/strings"; import { pbkdf2 } from "@ethersproject/pbkdf2"; import { defineReadOnly } from "@ethersproject/properties"; import { SigningKey } from "@ethersproject/signing-key"; -import { computeHmac, ripemd160, sha256, SupportedAlgorithms } from "@ethersproject/sha2"; +import { computeHmac, ripemd160, sha256, SupportedAlgorithm } from "@ethersproject/sha2"; import { computeAddress } from "@ethersproject/transactions"; import { Wordlist, wordlists } from "@ethersproject/wordlists"; @@ -190,7 +190,7 @@ export class HDNode implements ExternallyOwnedAccount { // Data += ser_32(i) for (let i = 24; i >= 0; i -= 8) { data[33 + (i >> 3)] = ((index >> (24 - i)) & 0xff); } - const I = arrayify(computeHmac(SupportedAlgorithms.sha512, this.chainCode, data)); + const I = arrayify(computeHmac(SupportedAlgorithm.sha512, this.chainCode, data)); const IL = I.slice(0, 32); const IR = I.slice(32); @@ -254,7 +254,7 @@ export class HDNode implements ExternallyOwnedAccount { const seedArray: Uint8Array = arrayify(seed); if (seedArray.length < 16 || seedArray.length > 64) { throw new Error("invalid seed"); } - const I: Uint8Array = arrayify(computeHmac(SupportedAlgorithms.sha512, MasterSecret, seedArray)); + const I: Uint8Array = arrayify(computeHmac(SupportedAlgorithm.sha512, MasterSecret, seedArray)); return new HDNode(_constructorGuard, bytes32(I.slice(0, 32)), null, "0x00000000", bytes32(I.slice(32)), 0, 0, mnemonic); } diff --git a/packages/pbkdf2/src.ts/browser.ts b/packages/pbkdf2/src.ts/browser.ts index e787460718..41a5bd39dc 100644 --- a/packages/pbkdf2/src.ts/browser.ts +++ b/packages/pbkdf2/src.ts/browser.ts @@ -1,9 +1,9 @@ "use strict"; import { arrayify, BytesLike, hexlify } from "@ethersproject/bytes"; -import { computeHmac, SupportedAlgorithms } from "@ethersproject/sha2"; +import { computeHmac, SupportedAlgorithm } from "@ethersproject/sha2"; -export function pbkdf2(password: BytesLike, salt: BytesLike, iterations: number, keylen: number, hashAlgorithm: SupportedAlgorithms): string { +export function pbkdf2(password: BytesLike, salt: BytesLike, iterations: number, keylen: number, hashAlgorithm: SupportedAlgorithm): string { password = arrayify(password); salt = arrayify(salt); let hLen;