diff --git a/mix/qml/DeployContractStep.qml b/mix/qml/DeployContractStep.qml index c239e03a5..2523f4cac 100644 --- a/mix/qml/DeployContractStep.qml +++ b/mix/qml/DeployContractStep.qml @@ -28,9 +28,7 @@ Rectangle { contractList.change() accountsModel.clear() for (var k in worker.accounts) - { accountsModel.append(worker.accounts[k]) - } if (worker.currentAccount === "" && worker.accounts.length > 0) { @@ -395,9 +393,12 @@ Rectangle { Layout.fillWidth: true Layout.preferredHeight: parent.height + 25 color: "transparent" + id: rectDeploymentVariable ScrollView { anchors.fill: parent + anchors.topMargin: 4 + anchors.bottomMargin: 4 ColumnLayout { RowLayout @@ -426,6 +427,7 @@ Rectangle { { textAddresses.text = "" deployedRow.visible = Object.keys(projectModel.deploymentAddresses).length > 0 + rectDeploymentVariable.visible = Object.keys(projectModel.deploymentAddresses).length > 0 textAddresses.text = JSON.stringify(projectModel.deploymentAddresses, null, ' ') } TextArea @@ -466,7 +468,6 @@ Rectangle { } } } - } } diff --git a/mix/qml/ProjectModel.qml b/mix/qml/ProjectModel.qml index 624ed7812..14cc4ec39 100644 --- a/mix/qml/ProjectModel.qml +++ b/mix/qml/ProjectModel.qml @@ -86,14 +86,8 @@ Item { function cleanDeploymentStatus() { deployedScenarioIndex = 0 - applicationUrlEth = "" - applicationUrlHttp = "" deployBlockNumber = "" deploymentTrHashes = {} - registerContentHashTrHash = "" - registerUrlTrHash = "" - registerContentHashBlockNumber = -1 - registerUrlBlockNumber = -1 deploymentAddresses = {} deploymentDir = "" deploymentDialog.packageStep.packageHash = "" @@ -102,6 +96,18 @@ Item { deploymentDialog.packageStep.lastDeployDate = "" deploymentDialog.packageStep.localPackageUrl = "" saveProject() + cleanRegisteringStatus() + } + + function cleanRegisteringStatus() + { + applicationUrlEth = "" + applicationUrlHttp = "" + registerContentHashTrHash = "" + registerUrlTrHash = "" + registerContentHashBlockNumber = -1 + registerUrlBlockNumber = -1 + saveProject() } Connections { diff --git a/mix/qml/RegisteringStep.qml b/mix/qml/RegisteringStep.qml index f2ff80f03..319c52da5 100644 --- a/mix/qml/RegisteringStep.qml +++ b/mix/qml/RegisteringStep.qml @@ -24,27 +24,35 @@ Rectangle { function show() { ctrRegisterLabel.calculateRegisterGas() - applicationUrlEthCtrl.text = projectModel.applicationUrlEth - applicationUrlHttpCtrl.text = projectModel.applicationUrlHttp + if (applicationUrlHttpCtrl.text === "") + applicationUrlHttpCtrl.text = projectModel.applicationUrlHttp + + if (applicationUrlEthCtrl.text === "") + applicationUrlEthCtrl.text = projectModel.applicationUrlEth + visible = true verificationEthUrl.text = "" - if (projectModel.registerContentHashTrHash !== "") + if (projectModel.registerContentHashTrHash !== "" && projectModel.registerContentHashBlockNumber !== -1) { worker.verifyHash("registerHash", projectModel.registerContentHashTrHash, function(bn, trLost) { updateVerification(projectModel.registerContentHashBlockNumber, bn, trLost, verificationEthUrl, "registerHash") }); } + else if (projectModel.registerContentHashTrHash !== "" && projectModel.registerContentHashBlockNumber === -1) + verificationEthUrl.text = qsTr("waiting verification") verificationUrl.text = "" - if (projectModel.registerUrlTrHash !== "") + if (projectModel.registerUrlTrHash !== "" && projectModel.registerUrlBlockNumber !== -1) { worker.verifyHash("registerUrl", projectModel.registerUrlTrHash, function(bn, trLost) { updateVerification(projectModel.registerUrlBlockNumber, bn, trLost, verificationUrl, "registerUrl") }); } + else if (projectModel.registerUrlTrHash !== "" && projectModel.registerUrlBlockNumber === -1) + verificationUrl.text = qsTr("waiting verification") } function updateVerification(originbn, bn, trLost, ctrl, trContext) @@ -259,6 +267,7 @@ Rectangle { NetworkDeploymentCode.registerDapp(ethUrl, gasPrice, function(){ projectModel.applicationUrlEth = applicationUrlEthCtrl.text projectModel.saveProject() + verificationEthUrl.text = qsTr("waiting verifications") worker.waitForTrReceipt(projectModel.registerContentHashTrHash, function(status, receipt) { worker.verifyHash("registerHash", projectModel.registerContentHashTrHash, function(bn, trLost) @@ -290,6 +299,7 @@ Rectangle { registerToUrlHint(applicationUrlHttpCtrl.text, gasPrice, function(){ projectModel.applicationUrlHttp = applicationUrlHttpCtrl.text projectModel.saveProject() + verificationUrl.text = qsTr("waiting verifications") worker.waitForTrReceipt(projectModel.registerUrlTrHash, function(status, receipt) { worker.verifyHash("registerUrl", projectModel.registerUrlTrHash, function(bn, trLost) @@ -313,6 +323,9 @@ Rectangle { width: 30 onClicked: { + verificationEthUrl.text = "" + verificationUrl.text = "" + projectModel.cleanRegisteringStatus() var gasPrice = deploymentDialog.deployStep.gasPrice.toHexWei() parent.registerHash(gasPrice, function(){ parent.registerUrl(gasPrice, function(){}) diff --git a/mix/qml/WebPreview.qml b/mix/qml/WebPreview.qml index 5d0f208af..1b3b1dc40 100644 --- a/mix/qml/WebPreview.qml +++ b/mix/qml/WebPreview.qml @@ -272,7 +272,8 @@ Item { Button { - height: 28 + height: 22 + width: 22 anchors.verticalCenter: parent.verticalCenter action: expressionAction iconSource: "qrc:/qml/img/console.png"