Skip to content

Commit

Permalink
SYS-4356 Update account derivation hashing to keccak (#68)
Browse files Browse the repository at this point in the history
  • Loading branch information
fluorostani authored Jan 31, 2025
1 parent 9c18ec5 commit 57f5aef
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions lib/utils/accountUtils.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';

import { Utils } from './utils';
import { blake2AsHex, mnemonicGenerate, mnemonicToMiniSecret } from '@polkadot/util-crypto';
import { keccakAsHex, mnemonicGenerate, mnemonicToMiniSecret } from '@polkadot/util-crypto';
import { hexToU8a, u8aToHex, isHex } from '@polkadot/util';
import { AvnAccount } from '../interfaces';
import { keyring } from './index';
Expand Down Expand Up @@ -62,7 +62,7 @@ export class AccountUtils {
}

static derivedSignerAddress(ethereumAddress: string): string {
return this.convertToAddress(blake2AsHex(hexToU8a(ethereumAddress)));
return this.convertToAddress(keccakAsHex(hexToU8a(ethereumAddress)));
}

static isAccountPK(accountString: string) {
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "avn-api",
"version": "4.3.0",
"version": "4.4.0",
"description": "API wrapper around JSON-RPC calls to the AvN",
"main": "build/lib/index.js",
"types": "build/lib/index.d.ts",
Expand Down

0 comments on commit 57f5aef

Please sign in to comment.