Skip to content
Snippets Groups Projects
Commit bfd9b62c authored by Spencer Brown's avatar Spencer Brown
Browse files

Try populating OuterType with Unencrypted to get integration passing

parent 3e3da946
No related branches found
No related tags found
No related merge requests found
......@@ -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,
})
......
......@@ -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)
......
......@@ -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,
}
......
......@@ -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,
}
......
......@@ -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,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment