|
@ -25,12 +25,10 @@ Window { |
|
|
signal accepted; |
|
|
signal accepted; |
|
|
|
|
|
|
|
|
function open(index, item) { |
|
|
function open(index, item) { |
|
|
valueLabel.visible = !useTransactionDefaultValue; |
|
|
rowFunction.visible = !useTransactionDefaultValue; |
|
|
valueField.visible = !useTransactionDefaultValue; |
|
|
rowValue.visible = !useTransactionDefaultValue; |
|
|
gasLabel.visible = !useTransactionDefaultValue; |
|
|
rowGas.visible = !useTransactionDefaultValue; |
|
|
gasFieldRect.visible = !useTransactionDefaultValue; |
|
|
rowGasPrice.visible = !useTransactionDefaultValue; |
|
|
gasPriceLabel.visible = !useTransactionDefaultValue; |
|
|
|
|
|
gasPriceRect.visible = !useTransactionDefaultValue; |
|
|
|
|
|
|
|
|
|
|
|
transactionIndex = index; |
|
|
transactionIndex = index; |
|
|
gasField.value = item.gas; |
|
|
gasField.value = item.gas; |
|
@ -38,9 +36,7 @@ Window { |
|
|
valueField.value = item.value; |
|
|
valueField.value = item.value; |
|
|
var functionId = item.functionId; |
|
|
var functionId = item.functionId; |
|
|
isConstructorTransaction = item.executeConstructor; |
|
|
isConstructorTransaction = item.executeConstructor; |
|
|
functionLabel.visible = !item.executeConstructor; |
|
|
rowFunction.visible = !item.executeConstructor; |
|
|
functionComboBox.visible = !item.executeConstructor; |
|
|
|
|
|
console.log(item.executeConstructor); |
|
|
|
|
|
|
|
|
|
|
|
itemParams = item.parameters !== undefined ? item.parameters : {}; |
|
|
itemParams = item.parameters !== undefined ? item.parameters : {}; |
|
|
functionsModel.clear(); |
|
|
functionsModel.clear(); |
|
@ -117,10 +113,6 @@ Window { |
|
|
var parameter = transactionDialog.transactionParams.get(p); |
|
|
var parameter = transactionDialog.transactionParams.get(p); |
|
|
var intComponent = Qt.createComponent("qrc:/qml/BigIntValue.qml"); |
|
|
var intComponent = Qt.createComponent("qrc:/qml/BigIntValue.qml"); |
|
|
var param = intComponent.createObject(modalTransactionDialog); |
|
|
var param = intComponent.createObject(modalTransactionDialog); |
|
|
console.log(param); |
|
|
|
|
|
console.log(JSON.stringify(param)); |
|
|
|
|
|
console.log(item); |
|
|
|
|
|
console.log(JSON.stringify(item)); |
|
|
|
|
|
|
|
|
|
|
|
param.setValue(parameter.value); |
|
|
param.setValue(parameter.value); |
|
|
item.parameters[parameter.name] = param; |
|
|
item.parameters[parameter.name] = param; |
|
@ -128,16 +120,20 @@ Window { |
|
|
return item; |
|
|
return item; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
GridLayout { |
|
|
ColumnLayout { |
|
|
id: dialogContent |
|
|
id: dialogContent |
|
|
columns: 2 |
|
|
width: parent.width |
|
|
anchors.fill: parent |
|
|
anchors.left: parent.left |
|
|
|
|
|
anchors.right: parent.right |
|
|
anchors.margins: 10 |
|
|
anchors.margins: 10 |
|
|
rowSpacing: 10 |
|
|
spacing: 30 |
|
|
columnSpacing: 10 |
|
|
RowLayout |
|
|
|
|
|
{ |
|
|
|
|
|
id: rowFunction |
|
|
|
|
|
Layout.fillWidth: true |
|
|
|
|
|
height: 150 |
|
|
Label { |
|
|
Label { |
|
|
id: functionLabel; |
|
|
Layout.preferredWidth: 75 |
|
|
text: qsTr("Function") |
|
|
text: qsTr("Function") |
|
|
} |
|
|
} |
|
|
ComboBox { |
|
|
ComboBox { |
|
@ -153,14 +149,19 @@ Window { |
|
|
loadParameters(); |
|
|
loadParameters(); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
RowLayout |
|
|
|
|
|
{ |
|
|
|
|
|
id: rowValue |
|
|
|
|
|
Layout.fillWidth: true |
|
|
Label { |
|
|
Label { |
|
|
id: valueLabel |
|
|
Layout.preferredWidth: 75 |
|
|
text: qsTr("Value") |
|
|
text: qsTr("Value") |
|
|
} |
|
|
} |
|
|
Rectangle |
|
|
Rectangle |
|
|
{ |
|
|
{ |
|
|
id: valueFieldRect |
|
|
|
|
|
Layout.fillWidth: true |
|
|
Layout.fillWidth: true |
|
|
Ether { |
|
|
Ether { |
|
|
id: valueField |
|
|
id: valueField |
|
@ -168,14 +169,19 @@ Window { |
|
|
displayFormattedValue: true |
|
|
displayFormattedValue: true |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
RowLayout |
|
|
|
|
|
{ |
|
|
|
|
|
id: rowGas |
|
|
|
|
|
Layout.fillWidth: true |
|
|
Label { |
|
|
Label { |
|
|
id: gasLabel |
|
|
Layout.preferredWidth: 75 |
|
|
text: qsTr("Gas") |
|
|
text: qsTr("Gas") |
|
|
} |
|
|
} |
|
|
Rectangle |
|
|
Rectangle |
|
|
{ |
|
|
{ |
|
|
id: gasFieldRect |
|
|
|
|
|
Layout.fillWidth: true |
|
|
Layout.fillWidth: true |
|
|
Ether { |
|
|
Ether { |
|
|
id: gasField |
|
|
id: gasField |
|
@ -183,14 +189,18 @@ Window { |
|
|
displayFormattedValue: true |
|
|
displayFormattedValue: true |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
RowLayout |
|
|
|
|
|
{ |
|
|
|
|
|
id: rowGasPrice |
|
|
|
|
|
Layout.fillWidth: true |
|
|
Label { |
|
|
Label { |
|
|
id: gasPriceLabel |
|
|
Layout.preferredWidth: 75 |
|
|
text: qsTr("Gas Price") |
|
|
text: qsTr("Gas Price") |
|
|
} |
|
|
} |
|
|
Rectangle |
|
|
Rectangle |
|
|
{ |
|
|
{ |
|
|
id: gasPriceRect |
|
|
|
|
|
Layout.fillWidth: true |
|
|
Layout.fillWidth: true |
|
|
Ether { |
|
|
Ether { |
|
|
id: gasPriceField |
|
|
id: gasPriceField |
|
@ -198,9 +208,14 @@ Window { |
|
|
displayFormattedValue: true |
|
|
displayFormattedValue: true |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
RowLayout |
|
|
|
|
|
{ |
|
|
|
|
|
Layout.fillWidth: true |
|
|
Label { |
|
|
Label { |
|
|
text: qsTr("Parameters") |
|
|
text: qsTr("Parameters") |
|
|
|
|
|
Layout.preferredWidth: 75 |
|
|
} |
|
|
} |
|
|
TableView { |
|
|
TableView { |
|
|
model: paramsModel |
|
|
model: paramsModel |
|
@ -227,6 +242,7 @@ Window { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
RowLayout |
|
|
RowLayout |
|
|
{ |
|
|
{ |
|
|