aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-12-22 21:59:52 +0800
committerobscuren <geffobscura@gmail.com>2014-12-22 21:59:52 +0800
commite32f7baa0d5d949a84a3b29c57220f837eae356a (patch)
treee72da9048605b8b3aa1679f1371cdc32d15b185f /ui
parent60b1f9629cf422c4ea2244f673b90553407f1276 (diff)
downloadgo-tangerine-e32f7baa0d5d949a84a3b29c57220f837eae356a.tar
go-tangerine-e32f7baa0d5d949a84a3b29c57220f837eae356a.tar.gz
go-tangerine-e32f7baa0d5d949a84a3b29c57220f837eae356a.tar.bz2
go-tangerine-e32f7baa0d5d949a84a3b29c57220f837eae356a.tar.lz
go-tangerine-e32f7baa0d5d949a84a3b29c57220f837eae356a.tar.xz
go-tangerine-e32f7baa0d5d949a84a3b29c57220f837eae356a.tar.zst
go-tangerine-e32f7baa0d5d949a84a3b29c57220f837eae356a.zip
Concat and pad data
Diffstat (limited to 'ui')
-rw-r--r--ui/qt/qwhisper/whisper.go9
1 files changed, 7 insertions, 2 deletions
diff --git a/ui/qt/qwhisper/whisper.go b/ui/qt/qwhisper/whisper.go
index 62676daf5..0627acd29 100644
--- a/ui/qt/qwhisper/whisper.go
+++ b/ui/qt/qwhisper/whisper.go
@@ -33,8 +33,13 @@ func (self *Whisper) SetView(view qml.Object) {
self.view = view
}
-func (self *Whisper) Post(data, to, from string, topics []string, priority, ttl uint32) {
- msg := whisper.NewMessage(fromHex(data))
+func (self *Whisper) Post(payload []string, to, from string, topics []string, priority, ttl uint32) {
+ var data []byte
+ for _, d := range payload {
+ data = append(data, fromHex(d)...)
+ }
+
+ msg := whisper.NewMessage(data)
envelope, err := msg.Seal(time.Duration(priority*100000), whisper.Opts{
Ttl: time.Duration(ttl),
To: crypto.ToECDSAPub(fromHex(to)),