From 5aa4fbcc7214c33b782d968e7959586fef688cff Mon Sep 17 00:00:00 2001 From: fiatjaf Date: Sat, 2 Mar 2024 07:48:41 -0300 Subject: [PATCH] nip46: fix assigning client secret key to struct. --- nip46/client.go | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/nip46/client.go b/nip46/client.go index 2e0ced9..974bab6 100644 --- a/nip46/client.go +++ b/nip46/client.go @@ -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() {