Skip to content
Snippets Groups Projects
Commit 160601e4 authored by Jono Wenger's avatar Jono Wenger
Browse files

Merge remote-tracking branch 'origin/clientIntegration' into clientIntegration

# Conflicts:
#	main.go
parents c34d64fd aa004776
No related branches found
No related tags found
No related merge requests found
......@@ -2,7 +2,9 @@ package main
import (
"gitlab.com/elixxir/client/api"
"gitlab.com/elixxir/client/interfaces/contact"
"gitlab.com/elixxir/client/interfaces/params"
"gitlab.com/xx_network/primitives/utils"
"io/ioutil"
"gitlab.com/elixxir/client/single"
"os"
......@@ -101,3 +103,21 @@ func waitUntilConnected(connected chan bool) {
}
}()
}
func readBotContact() contact.Contact {
// Read from file
data, err := utils.ReadFile(botContactPath)
jww.INFO.Printf("Contact file size read in: %d bytes", len(data))
if err != nil {
jww.FATAL.Panicf("Failed to read contact file: %+v", err)
}
// Unmarshal contact
c, err := contact.Unmarshal(data)
if err != nil {
jww.FATAL.Panicf("Failed to unmarshal contact: %+v", err)
}
return c
}
\ No newline at end of file
......@@ -8,17 +8,21 @@ import (
"time"
)
var password string
var session string
var ndfPath string
var singleMngr *single.Manager
var password = "password"
var session = ".session"
var ndfPath = "ndf.json"
var botContactPath = "botContact.bin"
var botContact contact.Contact
var singleMngr *single.Manager
var body *gowd.Element
func main() {
//_, singleMngr = initClient()
botContact = readBotContact()
_, singleMngr = initClient()
// creates a new bootstrap fluid container
body = bootstrap.NewContainer(false)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment