mirror of
https://github.com/nbd-wtf/nostr-tools.git
synced 2025-12-08 16:28:49 +00:00
nip46: fix getPublicKey() by making it actually call "get_public_key".
This commit is contained in:
8
nip46.ts
8
nip46.ts
@@ -207,11 +207,13 @@ export class BunkerSigner {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This was supposed to call the "get_public_key" method on the bunker,
|
* Calls the "get_public_key" method on the bunker.
|
||||||
* but instead we just returns the public key we already know.
|
* (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> {
|
async getPublicKey(): Promise<string> {
|
||||||
return this.bp.pubkey
|
return await this.sendRequest('get_public_key', [])
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"name": "nostr-tools",
|
"name": "nostr-tools",
|
||||||
"version": "2.8.1",
|
"version": "2.9.0",
|
||||||
"description": "Tools for making a Nostr client.",
|
"description": "Tools for making a Nostr client.",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
|||||||
Reference in New Issue
Block a user