Validate presence of pubkey in config

This commit is contained in:
Jon Staab
2026-03-31 14:36:24 -07:00
parent 122b391376
commit cc6a7667cc
2 changed files with 9 additions and 4 deletions
+4
View File
@@ -77,6 +77,10 @@ func LoadConfig(filename string) (*Config, error) {
return nil, fmt.Errorf("schema is required")
}
if config.Info.Pubkey == "" {
return nil, fmt.Errorf("info.pubkey is required")
}
secret, err := nostr.SecretKeyFromHex(config.Secret)
if err != nil {
return nil, err