Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
client
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
elixxir
client
Commits
7ce5e8cc
Commit
7ce5e8cc
authored
2 years ago
by
Richard T. Carback III
Browse files
Options
Downloads
Patches
Plain Diff
Fix parsing of E2E Params JSON when calling SendE2E in bindings
parent
05dbec16
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!510
Release
,
!353
Figure out why bindings is not passing parameters correctly
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
bindings/e2eHandler.go
+8
-8
8 additions, 8 deletions
bindings/e2eHandler.go
with
8 additions
and
8 deletions
bindings/e2eHandler.go
+
8
−
8
View file @
7ce5e8cc
...
...
@@ -16,7 +16,6 @@ import (
"gitlab.com/elixxir/client/catalog"
"gitlab.com/elixxir/client/cmix/identity/receptionID"
"gitlab.com/elixxir/client/cmix/rounds"
"gitlab.com/elixxir/client/e2e"
"gitlab.com/elixxir/primitives/format"
"gitlab.com/xx_network/primitives/id"
)
...
...
@@ -124,15 +123,15 @@ func (e *E2e) RemoveService(tag string) error {
// - []byte - the JSON marshalled bytes of the E2ESendReport object, which can
// be passed into Cmix.WaitForRoundResult to see if the send succeeded.
func
(
e
*
E2e
)
SendE2E
(
messageType
int
,
recipientId
,
payload
,
e2eParams
[]
byte
)
([]
byte
,
error
)
{
// Note that specifically these are the Base params from xxdk.E2EParams
params
:=
e2e
.
GetDefaultParams
()
err
:=
params
.
UnmarshalJSON
(
e2eParams
)
e2eParamsJSON
[]
byte
)
([]
byte
,
error
)
{
if
len
(
e2eParamsJSON
)
==
0
{
jww
.
WARN
.
Printf
(
"e2e params not specified, using defaults..."
)
e2eParamsJSON
=
GetDefaultE2EParams
()
}
params
,
err
:=
parseE2EParams
(
e2eParamsJSON
)
if
err
!=
nil
{
return
nil
,
err
}
jww
.
DEBUG
.
Printf
(
"SendE2E Parameters Received: %s, Parsed: %s"
,
e2eParams
,
params
.
String
())
recipient
,
err
:=
id
.
Unmarshal
(
recipientId
)
if
err
!=
nil
{
...
...
@@ -140,7 +139,8 @@ func (e *E2e) SendE2E(messageType int, recipientId, payload,
}
sendReport
,
err
:=
e
.
api
.
GetE2E
()
.
SendE2E
(
catalog
.
MessageType
(
messageType
),
recipient
,
payload
,
params
)
catalog
.
MessageType
(
messageType
),
recipient
,
payload
,
params
.
Base
)
if
err
!=
nil
{
return
nil
,
err
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment