diff --git a/go.mod b/go.mod index 34c28069e30b83a0cab2463324e4655d8a6f40c6..fdec09b74eaa51ed17afab407bbc60a2d8861638 100644 --- a/go.mod +++ b/go.mod @@ -8,7 +8,7 @@ require ( github.com/pkg/errors v0.9.1 github.com/spf13/jwalterweatherman v1.1.0 gitlab.com/elixxir/client/v4 v4.3.9-0.20221215212713-60855bdff085 - gitlab.com/elixxir/crypto v0.0.7-0.20221214233734-3c27a1e92343 + gitlab.com/elixxir/crypto v0.0.7-0.20221214192244-6783272c04a0 gitlab.com/elixxir/primitives v0.0.3-0.20221214192222-988b44a6958a gitlab.com/xx_network/crypto v0.0.5-0.20221121220724-8eefdbb0eb46 gitlab.com/xx_network/primitives v0.0.4-0.20221209210320-376735467d58 diff --git a/go.sum b/go.sum index 043ea7137a5417d4a96eab7ce1ed2af6efb1d08b..fe843f34165a5bc229bec0a82bf8594510d06067 100644 --- a/go.sum +++ b/go.sum @@ -373,8 +373,8 @@ gitlab.com/elixxir/client/v4 v4.3.9-0.20221215212713-60855bdff085 h1:r0ViDvdl6kC gitlab.com/elixxir/client/v4 v4.3.9-0.20221215212713-60855bdff085/go.mod h1:5WIUMXJnpLi5uThXJPL7DpAgnINm+sR2o7t/Bh4QrJg= gitlab.com/elixxir/comms v0.0.4-0.20221215202150-4ff70a83d4a4 h1:aCKKTGRJHoB67SivOHtmUBBP/Xqw8iWLbCMtzVCTAU4= gitlab.com/elixxir/comms v0.0.4-0.20221215202150-4ff70a83d4a4/go.mod h1:P7j/b/HLQHAybShZiGWUxEQ8kmGpsfWP0V9QZov7zis= -gitlab.com/elixxir/crypto v0.0.7-0.20221214233734-3c27a1e92343 h1:9g499Lf25k8uCF+c0l8ThOlEQESi/0qYteV6fxo54f8= -gitlab.com/elixxir/crypto v0.0.7-0.20221214233734-3c27a1e92343/go.mod h1:oRh3AwveOEvpk9E3kRcMGK8fImcEnN0PY4jr9HDgQE8= +gitlab.com/elixxir/crypto v0.0.7-0.20221214192244-6783272c04a0 h1:dwCf7wKv2DCuYZZ394bSQWdUOXiABLsEyDvXZUOo83o= +gitlab.com/elixxir/crypto v0.0.7-0.20221214192244-6783272c04a0/go.mod h1:oRh3AwveOEvpk9E3kRcMGK8fImcEnN0PY4jr9HDgQE8= gitlab.com/elixxir/ekv v0.2.1 h1:dtwbt6KmAXG2Tik5d60iDz2fLhoFBgWwST03p7T+9Is= gitlab.com/elixxir/ekv v0.2.1/go.mod h1:USLD7xeDnuZEavygdrgzNEwZXeLQJK/w1a+htpN+JEU= gitlab.com/elixxir/primitives v0.0.3-0.20221214192222-988b44a6958a h1:F17FfEjS+/uDI/TTYQD21S5JvNZ9+p9bieau2nyLCzo= diff --git a/indexedDb/channels/implementation.go b/indexedDb/channels/implementation.go index c51af2cd17478f8f0c838ff1b62bdbf9a22c6198..f757bd9b49ab083f6202afeff60fe6e224b0560c 100644 --- a/indexedDb/channels/implementation.go +++ b/indexedDb/channels/implementation.go @@ -352,7 +352,7 @@ func (w *wasmModel) updateMessage(currentMsgJson string, newMessage := &Message{} err := json.Unmarshal([]byte(currentMsgJson), newMessage) if err != nil { - return 0, nil + return 0, err } if status != nil { diff --git a/indexedDb/channels/implementation_test.go b/indexedDb/channels/implementation_test.go index f51b226fe8073b4b05f7c93b874b635d4680e73b..8f9c24f202424ce52a1f760b9fdf1534dc9fb644 100644 --- a/indexedDb/channels/implementation_test.go +++ b/indexedDb/channels/implementation_test.go @@ -47,23 +47,24 @@ func TestWasmModel_msgIDLookup(t *testing.T) { testMsg := buildMessage([]byte(testString), testMsgId.Bytes(), nil, testString, []byte(testString), []byte{8, 6, 7, 5}, 0, netTime.Now(), - time.Second, 0, 0, channels.Sent) + time.Second, 0, 0, false, false, channels.Sent) _, err = eventModel.receiveHelper(testMsg, false) if err != nil { t.Fatalf("%+v", err) } - uuid, err := eventModel.msgIDLookup(testMsgId) + msg, err := eventModel.msgIDLookup(testMsgId) if err != nil { t.Fatalf("%+v", err) } - if uuid == 0 { + if msg.ID == 0 { t.Fatalf("Expected to get a UUID!") } } // Test wasmModel.UpdateSentStatus happy path and ensure fields don't change. func Test_wasmModel_UpdateSentStatus(t *testing.T) { + storage.GetLocalStorage().Clear() testString := "test" testMsgId := channel.MakeMessageID([]byte(testString), &id.ID{1}) eventModel, err := newWASMModel(testString, nil, dummyCallback)