|
@ -395,19 +395,22 @@ ColumnLayout { |
|
|
text: qsTr("Add Tx") |
|
|
text: qsTr("Add Tx") |
|
|
onClicked: |
|
|
onClicked: |
|
|
{ |
|
|
{ |
|
|
var lastBlock = model.blocks[model.blocks.length - 1]; |
|
|
if (model && model.blocks) |
|
|
if (lastBlock.status === "mined") |
|
|
|
|
|
{ |
|
|
{ |
|
|
var newblock = projectModel.stateListModel.createEmptyBlock() |
|
|
var lastBlock = model.blocks[model.blocks.length - 1]; |
|
|
blockModel.appendBlock(newblock) |
|
|
if (lastBlock.status === "mined") |
|
|
model.blocks.push(newblock); |
|
|
{ |
|
|
} |
|
|
var newblock = projectModel.stateListModel.createEmptyBlock() |
|
|
|
|
|
blockModel.appendBlock(newblock) |
|
|
|
|
|
model.blocks.push(newblock); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
var item = TransactionHelper.defaultTransaction() |
|
|
var item = TransactionHelper.defaultTransaction() |
|
|
transactionDialog.stateAccounts = model.accounts |
|
|
transactionDialog.stateAccounts = model.accounts |
|
|
transactionDialog.execute = true |
|
|
transactionDialog.execute = true |
|
|
transactionDialog.editMode = false |
|
|
transactionDialog.editMode = false |
|
|
transactionDialog.open(model.blocks[model.blocks.length - 1].transactions.length, model.blocks.length - 1, item) |
|
|
transactionDialog.open(model.blocks[model.blocks.length - 1].transactions.length, model.blocks.length - 1, item) |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
width: 100 |
|
|
width: 100 |
|
|
height: 30 |
|
|
height: 30 |
|
|