File tree Expand file tree Collapse file tree 8 files changed +75
-4
lines changed Expand file tree Collapse file tree 8 files changed +75
-4
lines changed Original file line number Diff line number Diff line change @@ -246,6 +246,7 @@ ApplicationWindow {
246
246
}
247
247
}
248
248
}
249
+
249
250
}
250
251
251
252
property var blockModel: ListModel {
Original file line number Diff line number Diff line change @@ -131,6 +131,7 @@ func (gui *Gui) Start(assetPath string) {
131
131
context .SetVar ("gui" , gui )
132
132
context .SetVar ("eth" , gui .uiLib )
133
133
context .SetVar ("shh" , gui .whisper )
134
+ //clipboard.SetQMLClipboard(context)
134
135
135
136
win , err := gui .showWallet (context )
136
137
if err != nil {
Original file line number Diff line number Diff line change @@ -80,7 +80,7 @@ type RpcServer interface {
80
80
81
81
type Log struct {
82
82
Address string `json:"address"`
83
- Topics []string `json:"topics"`
83
+ Topic []string `json:"topics"`
84
84
Data string `json:"data"`
85
85
}
86
86
@@ -89,11 +89,11 @@ func toLogs(logs state.Logs) (ls []Log) {
89
89
90
90
for i , log := range logs {
91
91
var l Log
92
- l .Topics = make ([]string , len (log .Topics ()))
92
+ l .Topic = make ([]string , len (log .Topics ()))
93
93
l .Address = toHex (log .Address ())
94
94
l .Data = toHex (log .Data ())
95
95
for j , topic := range log .Topics () {
96
- l .Topics [j ] = toHex (topic )
96
+ l .Topic [j ] = toHex (topic )
97
97
}
98
98
ls [i ] = l
99
99
}
Original file line number Diff line number Diff line change
1
+ #pragma once
2
+
3
+ #include " clipboard.hpp"
4
+
5
+ typedef void Clipboard_;
6
+
7
+ Clipboard_ *initClipboard ()
8
+ {
9
+ Clipboard *clipboard = new (Clipboard);
10
+ return static_cast <Clipboard_*>(clipboard);
11
+ }
Original file line number Diff line number Diff line change
1
+ #include " clipboard.h"
2
+
3
+ #include < QClipboard>
4
+
5
+ Clipboard::Clipboard ()
6
+ {
7
+ connect (QApplication::clipboard (), &QClipboard::dataChanged, [this ] { emit clipboardChanged ();});
8
+ }
9
+
10
+ QString Clipboard::get () const
11
+ {
12
+ QClipboard *clipboard = QApplication::clipboard ();
13
+ return clipboard->text ();
14
+ }
15
+
16
+ void Clipboard::toClipboard (QString _text)
17
+ {
18
+ QClipboard *clipboard = QApplicationion::clipboard ();
19
+ clipboard->setText (_text);
20
+ }
Original file line number Diff line number Diff line change
1
+ package clipboard
2
+
3
+ // #cgo CPPFLAGS: -I./
4
+ // #cgo CXXFLAGS: -std=c++0x -pedantic-errors -Wall -fno-strict-aliasing
5
+ // #cgo LDFLAGS: -lstdc++
6
+ // #cgo pkg-config: Qt5Quick
7
+ //
8
+ // #include "capi.hpp"
9
+ import "C"
10
+
11
+ import "github.com/obscuren/qml"
12
+
13
+ func SetQMLClipboard (context * qml.Context ) {
14
+ context .SetVar ("clipboard" , (unsafe .Pointer )(C .initClipboard ()))
15
+ }
Original file line number Diff line number Diff line change
1
+ #pragma once
2
+
3
+ #ifdef __cplusplus
4
+ extern " C" {
5
+ #endif
6
+
7
+ class Clipboard : public QObject
8
+ {
9
+ Q_OBJECT
10
+ Q_PROPERTY (QString get READ get WRITE toClipboard NOTIFY clipboardChanged)
11
+ public:
12
+ Clipboard ();
13
+ virtual ~Clipboard (){}
14
+
15
+ Q_INVOKABLE void toClipboard (QString _text);
16
+
17
+ signals:
18
+ void clipboardChanged ();
19
+ };
20
+
21
+ #ifdef __cplusplus
22
+ } // extern "C"
23
+ #endif
Original file line number Diff line number Diff line change @@ -150,7 +150,7 @@ type Transaction struct {
150
150
func NewTx (tx * types.Transaction ) * Transaction {
151
151
hash := toHex (tx .Hash ())
152
152
receiver := toHex (tx .To ())
153
- if receiver == "0000000000000000000000000000000000000000" {
153
+ if len ( receiver ) == 0 {
154
154
receiver = toHex (core .AddressFromMessage (tx ))
155
155
}
156
156
sender := toHex (tx .From ())
You can’t perform that action at this time.
0 commit comments