Skip to content

Commit

Permalink
fix: Ethr-did toEthereumAddress
Browse files Browse the repository at this point in the history
  • Loading branch information
simonas-notcat committed Mar 3, 2020
1 parent bc9f498 commit 7335390
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/daf-ethr-did/src/identity-provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import Debug from 'debug'
const debug = Debug('daf:ethr-did:identity-provider')

export function toEthereumAddress(hexPublicKey: string): string {
return `0x${Buffer.from(keccak_256(Buffer.from(hexPublicKey.slice(2), 'hex')))
return `0x${Buffer.from(keccak_256.arrayBuffer(Buffer.from(hexPublicKey.slice(2), 'hex')))
.slice(-20)
.toString('hex')}`
}
Expand Down

0 comments on commit 7335390

Please sign in to comment.