Skip to content
This repository was archived by the owner on Jun 20, 2024. It is now read-only.

Fix saving privatekey, add onlymentions#48

Open
vicariousdrama wants to merge 1 commit into
fiatjaf:masterfrom
vicariousdrama:filter-by-mentions
Open

Fix saving privatekey, add onlymentions#48
vicariousdrama wants to merge 1 commit into
fiatjaf:masterfrom
vicariousdrama:filter-by-mentions

Conversation

@vicariousdrama

Copy link
Copy Markdown
  • home option can now filter for events mentioning caller even if no followers using --onlymentions flag
  • fixed bug in storage of private key. it should be in a format that can be consistently decoded for future calls.
  • restored call to printPublishStatus in message handler

@fiatjaf

fiatjaf commented Mar 10, 2023

Copy link
Copy Markdown
Owner

@honza do you have an opinion?

@vicariousdrama

Copy link
Copy Markdown
Author

getPubKey expects config.PrivateKey to be in hex format.

func getPubKey(privateKey string) string {
	if keyb, err := hex.DecodeString(config.PrivateKey); err != nil {
		log.Printf("Error decoding key from hex: %s\n", err.Error())
		return ""
	} else {
		_, pubkey := btcec.PrivKeyFromBytes(keyb)
		return hex.EncodeToString(schnorr.SerializePubKey(pubkey))
	}
}

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants