aboutsummaryrefslogtreecommitdiffstats
path: root/ethereal
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-04-05 17:20:37 +0800
committerobscuren <geffobscura@gmail.com>2014-04-05 17:20:37 +0800
commit5da03f2e3683361b6e725d96a1fbcc0d4d42613c (patch)
treeac24a57bcbfc3e6ef3a3f6612ba29b479d5a1898 /ethereal
parentee5e7f2b350202ed2d2e64265d18d0462bd21c91 (diff)
parent5660d598df3d86f892975fcf9628133529598221 (diff)
downloadgo-tangerine-5da03f2e3683361b6e725d96a1fbcc0d4d42613c.tar
go-tangerine-5da03f2e3683361b6e725d96a1fbcc0d4d42613c.tar.gz
go-tangerine-5da03f2e3683361b6e725d96a1fbcc0d4d42613c.tar.bz2
go-tangerine-5da03f2e3683361b6e725d96a1fbcc0d4d42613c.tar.lz
go-tangerine-5da03f2e3683361b6e725d96a1fbcc0d4d42613c.tar.xz
go-tangerine-5da03f2e3683361b6e725d96a1fbcc0d4d42613c.tar.zst
go-tangerine-5da03f2e3683361b6e725d96a1fbcc0d4d42613c.zip
Merge branch 'develop' into miner
Diffstat (limited to 'ethereal')
-rw-r--r--ethereal/assets/qml/wallet.qml17
-rw-r--r--ethereal/ui/library.go8
2 files changed, 19 insertions, 6 deletions
diff --git a/ethereal/assets/qml/wallet.qml b/ethereal/assets/qml/wallet.qml
index 9093e3ca8..b22e82f9a 100644
--- a/ethereal/assets/qml/wallet.qml
+++ b/ethereal/assets/qml/wallet.qml
@@ -199,9 +199,22 @@ ApplicationWindow {
text: "Send"
onClicked: {
//this.enabled = false
- console.log(eth.createTx(txRecipient.text, txValue.text, txGas.text, txGasPrice.text, codeView.text))
+ var res = eth.createTx(txRecipient.text, txValue.text, txGas.text, txGasPrice.text, codeView.text)
+ if(res[1]) {
+ txOutput.text = "Output:\n" + res[1].error()
+ } else {
+ txOutput.text = "Output:\n" + res[0]
+ }
+ txOutput.visible = true
}
}
+ TextArea {
+ id: txOutput
+ visible: false
+ Layout.fillWidth: true
+ height: 40
+ anchors.bottom: parent.bottom
+ }
}
}
@@ -391,7 +404,7 @@ ApplicationWindow {
anchors.left: aboutIcon.right
anchors.leftMargin: 10
font.pointSize: 12
- text: "<h2>Ethereum(Go)</h2><br><h3>Development</h3>Jeffrey Wilcke<br><h3>Binary Distribution</h3>Jarrad Hope<br>"
+ text: "<h2>Ethereal</h2><br><h3>Development</h3>Jeffrey Wilcke<br>Maran Hidskes<br><h3>Binary Distribution</h3>Jarrad Hope<br>"
}
}
diff --git a/ethereal/ui/library.go b/ethereal/ui/library.go
index 6f8cb6f65..7a8939bf1 100644
--- a/ethereal/ui/library.go
+++ b/ethereal/ui/library.go
@@ -15,7 +15,7 @@ type EthLib struct {
txPool *ethchain.TxPool
}
-func (lib *EthLib) CreateTx(recipient, valueStr, gasStr, gasPriceStr, data string) string {
+func (lib *EthLib) CreateTx(recipient, valueStr, gasStr, gasPriceStr, data string) (string, error) {
var hash []byte
var contractCreation bool
if len(recipient) == 0 {
@@ -24,7 +24,7 @@ func (lib *EthLib) CreateTx(recipient, valueStr, gasStr, gasPriceStr, data strin
var err error
hash, err = hex.DecodeString(recipient)
if err != nil {
- return err.Error()
+ return "", err
}
}
@@ -37,7 +37,7 @@ func (lib *EthLib) CreateTx(recipient, valueStr, gasStr, gasPriceStr, data strin
if contractCreation {
asm, err := mutan.Compile(strings.NewReader(data), false)
if err != nil {
- return err.Error()
+ return "", err
}
code := ethutil.Assemble(asm...)
@@ -55,7 +55,7 @@ func (lib *EthLib) CreateTx(recipient, valueStr, gasStr, gasPriceStr, data strin
ethutil.Config.Log.Infof("Tx hash %x", tx.Hash())
}
- return ethutil.Hex(tx.Hash())
+ return ethutil.Hex(tx.Hash()), nil
}
/*