aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-08-25 19:13:46 +0800
committerobscuren <geffobscura@gmail.com>2014-08-25 19:13:46 +0800
commit4e6defd6570dd213c53d73035e235431bb5408b5 (patch)
treea81fc8cf63962cd995ea92a2ea90358c6948de10
parent1cdf0a2c514993db6d2cd27c647260585af61ed9 (diff)
downloadgo-tangerine-4e6defd6570dd213c53d73035e235431bb5408b5.tar
go-tangerine-4e6defd6570dd213c53d73035e235431bb5408b5.tar.gz
go-tangerine-4e6defd6570dd213c53d73035e235431bb5408b5.tar.bz2
go-tangerine-4e6defd6570dd213c53d73035e235431bb5408b5.tar.lz
go-tangerine-4e6defd6570dd213c53d73035e235431bb5408b5.tar.xz
go-tangerine-4e6defd6570dd213c53d73035e235431bb5408b5.tar.zst
go-tangerine-4e6defd6570dd213c53d73035e235431bb5408b5.zip
Add txs as they come in
-rw-r--r--ethereal/assets/qml/views/wallet.qml10
1 files changed, 8 insertions, 2 deletions
diff --git a/ethereal/assets/qml/views/wallet.qml b/ethereal/assets/qml/views/wallet.qml
index 4628aef38..ce472812e 100644
--- a/ethereal/assets/qml/views/wallet.qml
+++ b/ethereal/assets/qml/views/wallet.qml
@@ -5,6 +5,7 @@ import QtQuick.Dialogs 1.0;
import QtQuick.Window 2.1;
import QtQuick.Controls.Styles 1.1
import Ethereum 1.0
+import "../../ext/filter.js" as Eth
Rectangle {
id: root
@@ -151,10 +152,15 @@ Rectangle {
model: ListModel {
id: txModel
Component.onCompleted: {
- var messages = JSON.parse(eth.messages({latest: -1, from: eth.key().address}))
+ var filter = new Eth.Filter({latest: -1, from: eth.key().address})
+ filter.changed(addTxs)
+
+ addTxs(filter.messages())
+ }
+ function addTxs(messages) {
for(var i = 0; i < messages.length; i++) {
var message = messages[i];
- this.insert(0, {num: i, from: message.from, to: message.to, value: eth.numberToHuman(message.value)})
+ txModel.insert(0, {num: txModel.count, from: message.from, to: message.to, value: eth.numberToHuman(message.value)})
}
}
}