Skip to content

Commit

Permalink
Merge pull request near#1259 from LimeChain/get-keys-fix
Browse files Browse the repository at this point in the history
fix: pass the correct parameter to getPublicKey() in getKeys()
  • Loading branch information
gtsonevv authored Jan 11, 2024
2 parents db20bf5 + 94cd0e6 commit 652ca91
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/gold-peas-applaud.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@near-js/biometric-ed25519": patch
---

pass the correct parameter to getPublicKey() in getKeys()
2 changes: 1 addition & 1 deletion packages/biometric-ed25519/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down

0 comments on commit 652ca91

Please sign in to comment.