mirror of https://github.com/status-im/op-geth.git
Merge branch 'develop' into miner
This commit is contained in:
commit
5da03f2e36
|
@ -199,8 +199,21 @@ 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>"
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in New Issue