The signature is an hex string, not utf-8

This commit is contained in:
Franck Royer 2021-06-21 13:26:33 +10:00
parent 4b70af1039
commit af2b2691f1
No known key found for this signature in database
GPG Key ID: A82ED75A8DFC50A4
1 changed files with 1 additions and 1 deletions

View File

@ -24,7 +24,7 @@ export async function generateEthDmKeyPair(
web3Signer: Signer
): Promise<KeyPair> {
const signature = await web3Signer.signMessage(Salt);
const entropy = Buffer.from(toUtf8Bytes(signature));
const entropy = Buffer.from(signature, 'hex');
const keys = EthCrypto.createIdentity(entropy);
return keys;
}