Skip to content

Commit

Permalink
Fixed imports after refactor.
Browse files Browse the repository at this point in the history
  • Loading branch information
ricmoo committed Jan 21, 2020
1 parent 931da2f commit adf5622
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions packages/hdnode/src.ts/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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";

Expand Down Expand Up @@ -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);

Expand Down Expand Up @@ -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);
}
Expand Down
4 changes: 2 additions & 2 deletions packages/pbkdf2/src.ts/browser.ts
Original file line number Diff line number Diff line change
@@ -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;
Expand Down

0 comments on commit adf5622

Please sign in to comment.