nip46: fix assigning client secret key to struct.

This commit is contained in:
fiatjaf 2024-03-02 07:48:41 -03:00
parent 9cb740764b
commit 5aa4fbcc72
No known key found for this signature in database
GPG Key ID: BAD43C4BE5C1A3A1

View File

@ -98,14 +98,15 @@ func NewBunker(
sharedSecret, _ := nip04.ComputeSharedSecret(targetPublicKey, clientSecretKey)
bunker := &BunkerClient{
pool: pool,
target: targetPublicKey,
relays: relays,
sharedSecret: sharedSecret,
listeners: xsync.NewMapOf[string, chan Response](),
expectingAuth: xsync.NewMapOf[string, struct{}](),
onAuth: onAuth,
idPrefix: "gn-" + strconv.Itoa(rand.Intn(65536)),
pool: pool,
clientSecretKey: clientSecretKey,
target: targetPublicKey,
relays: relays,
sharedSecret: sharedSecret,
listeners: xsync.NewMapOf[string, chan Response](),
expectingAuth: xsync.NewMapOf[string, struct{}](),
onAuth: onAuth,
idPrefix: "gn-" + strconv.Itoa(rand.Intn(65536)),
}
go func() {