Skip to content

Commit

Permalink
using _privateKey rather than undefined getter
Browse files Browse the repository at this point in the history
  • Loading branch information
retog committed Jan 4, 2023
1 parent 47ec4b6 commit 515a15e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/nostr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ class Nostr extends EventEmitter {
}

private async signId(id: string) {
return await (await secp.schnorr.sign(id, this.privateKey));
return await (await secp.schnorr.sign(id, this._privateKey));
}

private async sendPost(content: string, rootReference?: string, reference?: string, mention?: string) {
Expand Down
2 changes: 1 addition & 1 deletion mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27708,7 +27708,7 @@ class Nostr extends EventEmitter {
return this.hexEncode(await sha256(buf));
}
async signId(id) {
return await await schnorr.sign(id, this.privateKey);
return await await schnorr.sign(id, this._privateKey);
}
async sendPost(content, rootReference, reference, mention) {
const event = {
Expand Down

0 comments on commit 515a15e

Please sign in to comment.