From 2639be3feca396bfcb98dee27df59e5539e29f17 Mon Sep 17 00:00:00 2001 From: Georgi Tsonev Date: Thu, 11 Jan 2024 10:41:31 +0200 Subject: [PATCH 1/2] fix: pass the correct parameter to getPublicKey() --- packages/biometric-ed25519/src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/biometric-ed25519/src/index.ts b/packages/biometric-ed25519/src/index.ts index df4e2d0246..5dbd96acac 100644 --- a/packages/biometric-ed25519/src/index.ts +++ b/packages/biometric-ed25519/src/index.ts @@ -119,7 +119,7 @@ export const getKeys = async (username: string): Promise<[KeyPair, KeyPair]> => const firstEDSecret = await firstEdSha256.digest(); const firstEDPublic = ed25519.getPublicKey(firstEDSecret); const secondEDSecret = await secondEdSha256.digest(); - const secondEDPublic = ed25519.getPublicKey(firstEDSecret); + const secondEDPublic = ed25519.getPublicKey(secondEDSecret); const firstKeyPair = KeyPair.fromString(baseEncode(new Uint8Array(Buffer.concat([firstEDSecret, Buffer.from(firstEDPublic)])))); const secondKeyPair = KeyPair.fromString(baseEncode(new Uint8Array(Buffer.concat([secondEDSecret, Buffer.from(secondEDPublic)])))); return [firstKeyPair, secondKeyPair]; From 94cd0e6511750beba87b823a1b87bf89f51ad7eb Mon Sep 17 00:00:00 2001 From: Georgi Tsonev Date: Thu, 11 Jan 2024 10:43:42 +0200 Subject: [PATCH 2/2] chore: add a changeset file --- .changeset/gold-peas-applaud.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/gold-peas-applaud.md diff --git a/.changeset/gold-peas-applaud.md b/.changeset/gold-peas-applaud.md new file mode 100644 index 0000000000..7048f09a48 --- /dev/null +++ b/.changeset/gold-peas-applaud.md @@ -0,0 +1,5 @@ +--- +"@near-js/biometric-ed25519": patch +--- + +pass the correct parameter to getPublicKey() in getKeys()