diff --git a/mix/qml/DeploymentWorker.qml b/mix/qml/DeploymentWorker.qml index 11c54fe6b..76e981d8c 100644 --- a/mix/qml/DeploymentWorker.qml +++ b/mix/qml/DeploymentWorker.qml @@ -170,10 +170,11 @@ Item { if (!clientModelGasEstimation.running) { - var ctr = projectModel.codeEditor.getContracts() - for (var k in ctr) + for (var si = 0; si < projectModel.listModel.count; si++) { - codeModelGasEstimation.registerCodeChange(ctr[k].document.documentId, ctr[k].getText()); + var document = projectModel.listModel.get(si); + if (document.isContract) + codeModelGasEstimation.registerCodeChange(document.documentId, fileIo.readFile(document.path)); } gasEstimationConnect.callback = callback clientModelGasEstimation.setupScenario(scenario)