also use the default key as the bunker client key if nothing else is provided.

This commit is contained in:
fiatjaf
2026-06-17 11:11:57 -03:00
parent b3e009730c
commit 814059fcec
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -65,7 +65,7 @@ func gatherSecretKeyOrBunkerFromArguments(ctx context.Context, c *cli.Command) (
return nostr.SecretKey{}, nil, fmt.Errorf("bunker client key '%s' is invalid: %w", clientKeyHex, err)
}
} else {
clientKey = nostr.Generate()
clientKey = defaultKey()
}
logverbose("[nip46]: connecting to %s with client key %s\n", bunkerURL, clientKey.Hex())
+1 -1
View File
@@ -46,7 +46,7 @@ var defaultKeyFlags = []cli.Flag{
&cli.StringFlag{
Name: "connect-as",
Usage: "private key to use when communicating with nip46 bunkers",
DefaultText: "a random key",
DefaultText: "the default key (see `nak key default`)",
Category: CATEGORY_SIGNER,
Sources: cli.EnvVars("NOSTR_CLIENT_KEY"),
},