Skip to content

Commit

Permalink
nip46: fix getPublicKey() by making it actually call "get_public_key".
Browse files Browse the repository at this point in the history
  • Loading branch information
fiatjaf committed Oct 23, 2024
1 parent aba266b commit 4c2d2b5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions nip46.ts
Original file line number Diff line number Diff line change
Expand Up @@ -207,11 +207,13 @@ export class BunkerSigner {
}

/**
* This was supposed to call the "get_public_key" method on the bunker,
* but instead we just returns the public key we already know.
* Calls the "get_public_key" method on the bunker.
* (before we would return the public key hardcoded in the bunker parameters, but
* that is not correct as that may be the bunker pubkey and the actual signer
* pubkey may be different.)
*/
async getPublicKey(): Promise<string> {
return this.bp.pubkey
return await this.sendRequest('get_public_key', [])
}

/**
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"type": "module",
"name": "nostr-tools",
"version": "2.8.1",
"version": "2.9.0",
"description": "Tools for making a Nostr client.",
"repository": {
"type": "git",
Expand Down

0 comments on commit 4c2d2b5

Please sign in to comment.