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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
elixxir
client
Commits
bfd9b62c
Commit
bfd9b62c
authored
Mar 29, 2019
by
Spencer Brown
Browse files
Options
Downloads
Patches
Plain Diff
Try populating OuterType with Unencrypted to get integration passing
parent
3e3da946
No related branches found
No related tags found
No related merge requests found
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
bindings/client.go
+7
-7
7 additions, 7 deletions
bindings/client.go
cmd/root.go
+7
-5
7 additions, 5 deletions
cmd/root.go
io/collate.go
+2
-0
2 additions, 0 deletions
io/collate.go
payment/transaction.go
+5
-3
5 additions, 3 deletions
payment/transaction.go
payment/wallet.go
+19
-15
19 additions, 15 deletions
payment/wallet.go
with
40 additions
and
30 deletions
bindings/client.go
+
7
−
7
View file @
bfd9b62c
...
...
@@ -11,12 +11,12 @@ import (
"gitlab.com/elixxir/client/api"
"gitlab.com/elixxir/client/globals"
"gitlab.com/elixxir/client/parse"
"gitlab.com/elixxir/primitives/switchboard"
"gitlab.com/elixxir/client/user"
"gitlab.com/elixxir/crypto/certs"
"gitlab.com/elixxir/primitives/format"
"gitlab.com/elixxir/primitives/id"
"gitlab.com/elixxir/primitives/switchboard"
"io"
"gitlab.com/elixxir/primitives/format"
)
// Copy of the storage interface.
...
...
@@ -75,7 +75,6 @@ func Listen(userId []byte, messageType int32, newListener Listener) string {
// Returns a parsed message
// Pass the listener handle that Listen() returned to delete the listener
func
StopListening
(
listenerHandle
string
)
{
api
.
StopListening
(
listenerHandle
,
switchboard
.
Listeners
)
...
...
@@ -197,6 +196,7 @@ func Send(m Message) error {
InnerType
:
m
.
GetType
(),
Body
:
m
.
GetPayload
(),
},
OuterType
:
format
.
Unencrypted
,
Sender
:
sender
,
Receiver
:
recipient
,
})
...
...
This diff is collapsed.
Click to expand it.
cmd/root.go
+
7
−
5
View file @
bfd9b62c
...
...
@@ -19,17 +19,17 @@ import (
"gitlab.com/elixxir/client/cmixproto"
"gitlab.com/elixxir/client/globals"
"gitlab.com/elixxir/client/parse"
"gitlab.com/elixxir/primitives/switchboard"
"gitlab.com/elixxir/client/user"
"gitlab.com/elixxir/comms/connect"
"gitlab.com/elixxir/primitives/format"
"gitlab.com/elixxir/primitives/id"
"gitlab.com/elixxir/primitives/switchboard"
"io/ioutil"
"log"
"math/big"
"os"
"sync/atomic"
"time"
"gitlab.com/elixxir/primitives/format"
)
var
verbose
bool
...
...
@@ -290,6 +290,7 @@ var rootCmd = &cobra.Command{
InnerType
:
int32
(
cmixproto
.
Type_TEXT_MESSAGE
),
Body
:
wireOut
,
},
OuterType
:
format
.
Unencrypted
,
Receiver
:
recipientId
,
}})
}
...
...
@@ -318,6 +319,7 @@ var rootCmd = &cobra.Command{
InnerType
:
int32
(
cmixproto
.
Type_TEXT_MESSAGE
),
Body
:
bindings
.
FormatTextMessage
(
message
),
},
OuterType
:
format
.
Unencrypted
,
Receiver
:
recipientId
}}
bindings
.
Send
(
message
)
...
...
This diff is collapsed.
Click to expand it.
io/collate.go
+
2
−
0
View file @
bfd9b62c
...
...
@@ -73,6 +73,7 @@ func (mb *collator) AddMessage(message *format.Message,
msg
:=
parse
.
Message
{
TypedBody
:
*
typedBody
,
OuterType
:
format
.
Unencrypted
,
Sender
:
sender
,
Receiver
:
user
.
TheSession
.
GetCurrentUser
()
.
User
,
}
...
...
@@ -137,6 +138,7 @@ func (mb *collator) AddMessage(message *format.Message,
msg
:=
parse
.
Message
{
TypedBody
:
*
typedBody
,
OuterType
:
format
.
Unencrypted
,
Sender
:
sender
,
Receiver
:
recipient
,
}
...
...
This diff is collapsed.
Click to expand it.
payment/transaction.go
+
5
−
3
View file @
bfd9b62c
...
...
@@ -11,6 +11,7 @@ import (
"gitlab.com/elixxir/client/cmixproto"
"gitlab.com/elixxir/client/parse"
"gitlab.com/elixxir/crypto/coin"
"gitlab.com/elixxir/primitives/format"
"gitlab.com/elixxir/primitives/id"
"time"
)
...
...
@@ -60,6 +61,7 @@ func (t *Transaction) FormatPaymentInvoice() *parse.Message {
// money
Sender
:
t
.
Recipient
,
Receiver
:
t
.
Sender
,
OuterType
:
format
.
Unencrypted
,
// TODO populate nonce and panic if any outgoing message has none
Nonce
:
nil
,
}
...
...
This diff is collapsed.
Click to expand it.
payment/wallet.go
+
19
−
15
View file @
bfd9b62c
...
...
@@ -273,6 +273,7 @@ func (il *InvoiceListener) Hear(msg switchboard.Item, isHeardElsewhere bool) {
InnerType
:
int32
(
cmixproto
.
Type_PAYMENT_INVOICE_UI
),
Body
:
invoiceID
[
:
],
},
OuterType
:
format
.
Unencrypted
,
Sender
:
getPaymentBotID
(),
Receiver
:
id
.
ZeroID
,
Nonce
:
nil
,
...
...
@@ -349,6 +350,7 @@ func (w *Wallet) pay(inboundRequest *Transaction) (*parse.Message, error) {
InnerType
:
int32
(
cmixproto
.
Type_PAYMENT_TRANSACTION
),
Body
:
paymentMessage
,
},
OuterType
:
format
.
Unencrypted
,
Sender
:
w
.
session
.
GetCurrentUser
()
.
User
,
Receiver
:
getPaymentBotID
(),
// TODO panic on blank nonce
...
...
@@ -443,6 +445,7 @@ func (l *ResponseListener) formatReceipt(transaction *Transaction) *parse.Messag
InnerType
:
int32
(
cmixproto
.
Type_PAYMENT_RECEIPT
),
Body
:
transaction
.
OriginID
[
:
],
},
OuterType
:
format
.
Unencrypted
,
Sender
:
l
.
wallet
.
session
.
GetCurrentUser
()
.
User
,
Receiver
:
transaction
.
Recipient
,
Nonce
:
nil
,
...
...
@@ -472,6 +475,7 @@ func (rl *ReceiptListener) Hear(msg switchboard.Item, isHeardElsewhere bool) {
InnerType
:
int32
(
cmixproto
.
Type_PAYMENT_RECEIPT_UI
),
Body
:
invoiceID
[
:
],
},
OuterType
:
format
.
Unencrypted
,
Sender
:
m
.
Sender
,
Receiver
:
id
.
ZeroID
,
Nonce
:
nil
,
...
...
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