good morning!!!!
Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
B
bor
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Harbor Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
open
bor
Commits
b42c70be
Commit
b42c70be
authored
May 25, 2014
by
Jeffrey Wilcke
Browse files
Options
Downloads
Patches
Plain Diff
Recv send for txs
parent
d35380c1
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
ethereal/assets/qml/wallet.qml
+4
-5
4 additions, 5 deletions
ethereal/assets/qml/wallet.qml
ethereal/ui/gui.go
+11
-5
11 additions, 5 deletions
ethereal/ui/gui.go
with
15 additions
and
10 deletions
ethereal/assets/qml/wallet.qml
+
4
−
5
View file @
b42c70be
...
@@ -85,7 +85,6 @@ ApplicationWindow {
...
@@ -85,7 +85,6 @@ ApplicationWindow {
//color: "#D9DDE7"
//color: "#D9DDE7"
color
:
"
#252525
"
color
:
"
#252525
"
ColumnLayout
{
ColumnLayout
{
y
:
50
y
:
50
anchors.left
:
parent
.
left
anchors.left
:
parent
.
left
...
@@ -155,6 +154,7 @@ ApplicationWindow {
...
@@ -155,6 +154,7 @@ ApplicationWindow {
TableView
{
TableView
{
id
:
txTableView
id
:
txTableView
anchors.fill
:
parent
anchors.fill
:
parent
TableViewColumn
{
role
:
"
inout
"
;
title
:
""
;
width
:
40
}
TableViewColumn
{
role
:
"
value
"
;
title
:
"
Value
"
;
width
:
100
}
TableViewColumn
{
role
:
"
value
"
;
title
:
"
Value
"
;
width
:
100
}
TableViewColumn
{
role
:
"
address
"
;
title
:
"
Address
"
;
width
:
430
}
TableViewColumn
{
role
:
"
address
"
;
title
:
"
Address
"
;
width
:
430
}
TableViewColumn
{
role
:
"
contract
"
;
title
:
"
Contract
"
;
width
:
100
}
TableViewColumn
{
role
:
"
contract
"
;
title
:
"
Contract
"
;
width
:
100
}
...
@@ -404,7 +404,7 @@ ApplicationWindow {
...
@@ -404,7 +404,7 @@ ApplicationWindow {
anchors.left
:
aboutIcon
.
right
anchors.left
:
aboutIcon
.
right
anchors.leftMargin
:
10
anchors.leftMargin
:
10
font.pointSize
:
12
font.pointSize
:
12
text
:
"
<h2>Ethereal</h2><br><h3>Development</h3>Jeffrey Wilcke<br>Maran Hidskes<br>
<h3>Binary Distribution</h3>Jarrad Hope<br>
"
text
:
"
<h2>Ethereal</h2><br><h3>Development</h3>Jeffrey Wilcke<br>Maran Hidskes<br>
"
}
}
}
}
...
@@ -429,7 +429,6 @@ ApplicationWindow {
...
@@ -429,7 +429,6 @@ ApplicationWindow {
}
}
}
}
SplitView
{
SplitView
{
anchors.fill
:
parent
anchors.fill
:
parent
property
var
asmModel
:
ListModel
{
property
var
asmModel
:
ListModel
{
id
:
asmModel
id
:
asmModel
...
@@ -524,14 +523,14 @@ ApplicationWindow {
...
@@ -524,14 +523,14 @@ ApplicationWindow {
walletValueLabel
.
text
=
value
walletValueLabel
.
text
=
value
}
}
function
addTx
(
tx
)
{
function
addTx
(
tx
,
inout
)
{
var
isContract
var
isContract
if
(
tx
.
contract
==
true
){
if
(
tx
.
contract
==
true
){
isContract
=
"
Yes
"
isContract
=
"
Yes
"
}
else
{
}
else
{
isContract
=
"
No
"
isContract
=
"
No
"
}
}
txModel
.
insert
(
0
,
{
hash
:
tx
.
hash
,
address
:
tx
.
address
,
value
:
tx
.
value
,
contract
:
isContract
})
txModel
.
insert
(
0
,
{
inout
:
inout
,
hash
:
tx
.
hash
,
address
:
tx
.
address
,
value
:
tx
.
value
,
contract
:
isContract
})
}
}
function
addBlock
(
block
)
{
function
addBlock
(
block
)
{
...
...
This diff is collapsed.
Click to expand it.
ethereal/ui/gui.go
+
11
−
5
View file @
b42c70be
...
@@ -151,7 +151,15 @@ func (gui *Gui) readPreviousTransactions() {
...
@@ -151,7 +151,15 @@ func (gui *Gui) readPreviousTransactions() {
for
it
.
Next
()
{
for
it
.
Next
()
{
tx
:=
ethchain
.
NewTransactionFromBytes
(
it
.
Value
())
tx
:=
ethchain
.
NewTransactionFromBytes
(
it
.
Value
())
gui
.
win
.
Root
()
.
Call
(
"addTx"
,
ethpub
.
NewPTx
(
tx
))
var
inout
string
if
bytes
.
Compare
(
tx
.
Sender
(),
gui
.
addr
)
==
0
{
inout
=
"send"
}
else
{
inout
=
"recv"
}
gui
.
win
.
Root
()
.
Call
(
"addTx"
,
ethpub
.
NewPTx
(
tx
),
inout
)
}
}
it
.
Release
()
it
.
Release
()
}
}
...
@@ -207,12 +215,12 @@ func (gui *Gui) update() {
...
@@ -207,12 +215,12 @@ func (gui *Gui) update() {
object
:=
state
.
GetAccount
(
gui
.
addr
)
object
:=
state
.
GetAccount
(
gui
.
addr
)
if
bytes
.
Compare
(
tx
.
Sender
(),
gui
.
addr
)
==
0
{
if
bytes
.
Compare
(
tx
.
Sender
(),
gui
.
addr
)
==
0
{
gui
.
win
.
Root
()
.
Call
(
"addTx"
,
ethpub
.
NewPTx
(
tx
))
gui
.
win
.
Root
()
.
Call
(
"addTx"
,
ethpub
.
NewPTx
(
tx
)
,
"send"
)
gui
.
txDb
.
Put
(
tx
.
Hash
(),
tx
.
RlpEncode
())
gui
.
txDb
.
Put
(
tx
.
Hash
(),
tx
.
RlpEncode
())
unconfirmedFunds
.
Sub
(
unconfirmedFunds
,
tx
.
Value
)
unconfirmedFunds
.
Sub
(
unconfirmedFunds
,
tx
.
Value
)
}
else
if
bytes
.
Compare
(
tx
.
Recipient
,
gui
.
addr
)
==
0
{
}
else
if
bytes
.
Compare
(
tx
.
Recipient
,
gui
.
addr
)
==
0
{
gui
.
win
.
Root
()
.
Call
(
"addTx"
,
ethpub
.
NewPTx
(
tx
))
gui
.
win
.
Root
()
.
Call
(
"addTx"
,
ethpub
.
NewPTx
(
tx
)
,
"recv"
)
gui
.
txDb
.
Put
(
tx
.
Hash
(),
tx
.
RlpEncode
())
gui
.
txDb
.
Put
(
tx
.
Hash
(),
tx
.
RlpEncode
())
unconfirmedFunds
.
Add
(
unconfirmedFunds
,
tx
.
Value
)
unconfirmedFunds
.
Add
(
unconfirmedFunds
,
tx
.
Value
)
...
@@ -261,7 +269,5 @@ func (gui *Gui) Transact(recipient, value, gas, gasPrice, data string) (*ethpub.
...
@@ -261,7 +269,5 @@ func (gui *Gui) Transact(recipient, value, gas, gasPrice, data string) (*ethpub.
func
(
gui
*
Gui
)
Create
(
recipient
,
value
,
gas
,
gasPrice
,
data
string
)
(
*
ethpub
.
PReceipt
,
error
)
{
func
(
gui
*
Gui
)
Create
(
recipient
,
value
,
gas
,
gasPrice
,
data
string
)
(
*
ethpub
.
PReceipt
,
error
)
{
keyPair
:=
ethutil
.
GetKeyRing
()
.
Get
(
0
)
keyPair
:=
ethutil
.
GetKeyRing
()
.
Get
(
0
)
//mainInput, initInput := mutan.PreParse(data)
return
gui
.
pub
.
Create
(
ethutil
.
Hex
(
keyPair
.
PrivateKey
),
value
,
gas
,
gasPrice
,
data
)
return
gui
.
pub
.
Create
(
ethutil
.
Hex
(
keyPair
.
PrivateKey
),
value
,
gas
,
gasPrice
,
data
)
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment