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

View File

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