Skip to content

Commit

Permalink
Fixed syncScrypt declaration and use for json-wallets.
Browse files Browse the repository at this point in the history
  • Loading branch information
ricmoo committed Feb 27, 2020
1 parent 64dccb2 commit 6809c37
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/json-wallets/src.ts/keystore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ function _computeKdfKey<T>(data: any, password: Bytes | string, pbkdf2Func: Pbkd
export function decryptSync(json: string, password: Bytes | string): KeystoreAccount {
const data = JSON.parse(json);

const key = _computeKdfKey(data, password, pbkdf2Sync, scrypt.scryptSync);
const key = _computeKdfKey(data, password, pbkdf2Sync, scrypt.syncScrypt);
return _getAccount(data, key);
}

Expand Down
2 changes: 1 addition & 1 deletion packages/json-wallets/thirdparty.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ declare module "aes-js" {
declare module "scrypt-js" {
export type ProgressCallback = (progress: number) => boolean | void;
export function scrypt(password: Uint8Array, salt: Uint8Array, N: number, r: number, p: number, dkLen: number, callback?: ProgressCallback): Promise<Uint8Array>;
export function scryptSync(password: Uint8Array, salt: Uint8Array, N: number, r: number, p: number, dkLen: number): Uint8Array;
export function syncScrypt(password: Uint8Array, salt: Uint8Array, N: number, r: number, p: number, dkLen: number): Uint8Array;
}

declare module "uuid" {
Expand Down

0 comments on commit 6809c37

Please sign in to comment.