From dcad173f51d047fd98b9bf431e37f14499953812 Mon Sep 17 00:00:00 2001
From: "Richard T. Carback III" <rick.carback@gmail.com>
Date: Wed, 31 May 2023 21:31:45 +0000
Subject: [PATCH] Update for HavenBeta branch

---
 go.mod             | 2 +-
 go.sum             | 2 ++
 wasm/collective.go | 8 ++++----
 3 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/go.mod b/go.mod
index 746132d7..c1b42253 100644
--- a/go.mod
+++ b/go.mod
@@ -9,7 +9,7 @@ require (
 	github.com/spf13/cobra v1.7.0
 	github.com/spf13/jwalterweatherman v1.1.0
 	github.com/stretchr/testify v1.8.2
-	gitlab.com/elixxir/client/v4 v4.6.4-0.20230531195851-a65797612a21
+	gitlab.com/elixxir/client/v4 v4.6.4-0.20230531212217-e21b55fbf23c
 	gitlab.com/elixxir/crypto v0.0.7-0.20230522162218-45433d877235
 	gitlab.com/elixxir/primitives v0.0.3-0.20230214180039-9a25e2d3969c
 	gitlab.com/elixxir/wasm-utils v0.0.0-20230522231408-a43b2c1481b2
diff --git a/go.sum b/go.sum
index 5a8bfe66..bfb69092 100644
--- a/go.sum
+++ b/go.sum
@@ -539,6 +539,8 @@ gitlab.com/elixxir/client/v4 v4.6.4-0.20230531195028-ad25aee27c19 h1:OLZTJAqRm1h
 gitlab.com/elixxir/client/v4 v4.6.4-0.20230531195028-ad25aee27c19/go.mod h1:fegbuF1/6a+H3QgsoMG8teLnyuKtDxkELMw8pn5WlZ8=
 gitlab.com/elixxir/client/v4 v4.6.4-0.20230531195851-a65797612a21 h1:u4H7ITaOwO4aQoSJCo8zpfRpenaqgHuvjqF3GAe8RrE=
 gitlab.com/elixxir/client/v4 v4.6.4-0.20230531195851-a65797612a21/go.mod h1:fegbuF1/6a+H3QgsoMG8teLnyuKtDxkELMw8pn5WlZ8=
+gitlab.com/elixxir/client/v4 v4.6.4-0.20230531212217-e21b55fbf23c h1:6OTyW9U/ntZ41Xry+8qDkOH4LoxhlyWTwKpAxi2fvZY=
+gitlab.com/elixxir/client/v4 v4.6.4-0.20230531212217-e21b55fbf23c/go.mod h1:fegbuF1/6a+H3QgsoMG8teLnyuKtDxkELMw8pn5WlZ8=
 gitlab.com/elixxir/comms v0.0.4-0.20230519211512-4a998f4b0938 h1:f27+QUFiGWrprKm+fstOg3ABkYLpWcZi3+8Lf5eDnqY=
 gitlab.com/elixxir/comms v0.0.4-0.20230519211512-4a998f4b0938/go.mod h1:z+qW0D9VpY5QKTd7wRlb5SK4kBNqLYsa4DXBcUXue9Q=
 gitlab.com/elixxir/crypto v0.0.7-0.20230522162218-45433d877235 h1:0BySdXTzRWxzH8k5RiNNMmmn2lpuQWLVcDDA/7ehyqc=
diff --git a/wasm/collective.go b/wasm/collective.go
index c2b0b3fe..e2b250a0 100644
--- a/wasm/collective.go
+++ b/wasm/collective.go
@@ -397,11 +397,11 @@ func (r *RemoteKV) ListenOnRemoteKey(_ js.Value, args []js.Value) any {
 	cb := newKeyChangedByRemoteCallback(args[2])
 
 	promiseFn := func(resolve, reject func(args ...any) js.Value) {
-		deleted, err := r.api.ListenOnRemoteKey(key, version, cb)
+		err := r.api.ListenOnRemoteKey(key, version, cb, true)
 		if err != nil {
 			reject(exception.NewTrace(err))
 		} else {
-			resolve(utils.CopyBytesToJS(deleted))
+			resolve()
 		}
 	}
 
@@ -427,11 +427,11 @@ func (r *RemoteKV) ListenOnRemoteMap(_ js.Value, args []js.Value) any {
 	cb := newMapChangedByRemoteCallback(args[2])
 
 	promiseFn := func(resolve, reject func(args ...any) js.Value) {
-		deleted, err := r.api.ListenOnRemoteMap(mapName, version, cb)
+		err := r.api.ListenOnRemoteMap(mapName, version, cb, true)
 		if err != nil {
 			reject(exception.NewTrace(err))
 		} else {
-			resolve(utils.CopyBytesToJS(deleted))
+			resolve()
 		}
 	}
 
-- 
GitLab