Skip to content

Commit 6a6b338

Browse files
committed
Minor fixes
1 parent e20ad42 commit 6a6b338

File tree

3 files changed

+165
-81
lines changed

3 files changed

+165
-81
lines changed

ext-src/extension.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -230,9 +230,8 @@ class ReactPanel {
230230
private debug(txHash: string): void {
231231
const debugWorker = this.createWorker();
232232
console.dir("WorkerID: ", debugWorker.pid);
233+
console.dir("Debugging transaction with remix-debug...");
233234
debugWorker.on("message", (m: any) => {
234-
console.log("Debug message: ");
235-
console.dir(m.debugResp);
236235
this._panel.webview.postMessage({ txTrace: m.debugResp });
237236
});
238237
debugWorker.send({ command: "debug-transaction", payload: txHash });
@@ -241,8 +240,6 @@ class ReactPanel {
241240
private runDeploy(payload: any) {
242241
const deployWorker = this.createWorker();
243242
deployWorker.on("message", (m: any) => {
244-
console.log("Deploy message: ");
245-
console.dir(m);
246243
if(m.error) {
247244
this._panel.webview.postMessage({ errors: m.error });
248245
}
@@ -263,8 +260,6 @@ class ReactPanel {
263260
else {
264261
this._panel.webview.postMessage({ gasEstimate: m.gasEstimate });
265262
}
266-
console.log("Gas estimate message: ");
267-
console.dir(JSON.stringify(m));
268263
});
269264
deployWorker.send({ command: "get-gas-estimate", payload });
270265
}

src/components/App.tsx

Lines changed: 27 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ class App extends Component<IProps, IState> {
101101
});
102102
}
103103
if (data._importFileCb) {
104-
const result = data.result;
104+
return;
105105
}
106106
if(data.errors) {
107107
this.setState({ error: data.errors });
@@ -178,15 +178,13 @@ class App extends Component<IProps, IState> {
178178

179179
{this.props.test.testResults.length > 0 && <TestDisplay />}
180180
<p>
181-
{compiled && fileName && (
182-
<div className="compiledOutput">
183-
{Object.keys(compiled.contracts[fileName]).map(
184-
(contractName: string, i: number) => {
185-
const bytecode =
186-
compiled.contracts[fileName][contractName].evm.bytecode
187-
.object;
188-
const ContractABI =
189-
compiled.contracts[fileName][contractName].abi;
181+
{
182+
compiled && fileName && (
183+
<div className="compiledOutput">
184+
{
185+
Object.keys(compiled.contracts[fileName]).map((contractName: string, i: number) => {
186+
const bytecode = compiled.contracts[fileName][contractName].evm.bytecode.object;
187+
const ContractABI = compiled.contracts[fileName][contractName].abi;
190188
return (
191189
<div
192190
id={contractName}
@@ -204,21 +202,19 @@ class App extends Component<IProps, IState> {
204202
/>
205203
}
206204
</div>
207-
);
208-
}
209-
)}
210-
</div>
211-
)}
212-
{compiled && fileName && (
213-
<div className="compiledOutput">
214-
{
215-
Object.keys(compiled.contracts[fileName]).map((contractName: string, i: number) => {
216-
const bytecode =
217-
compiled.contracts[fileName][contractName].evm.bytecode
218-
.object;
219-
const ContractABI =
220-
compiled.contracts[fileName][contractName].abi;
221-
return(
205+
)}
206+
)}
207+
</div>
208+
)
209+
}
210+
{
211+
compiled && fileName && (
212+
<div className="compiledOutput">
213+
{
214+
Object.keys(compiled.contracts[fileName]).map((contractName: string, i: number) => {
215+
const bytecode = compiled.contracts[fileName][contractName].evm.bytecode.object;
216+
const ContractABI = compiled.contracts[fileName][contractName].abi;
217+
return(
222218
<div
223219
id={contractName}
224220
className="contract-container"
@@ -237,12 +233,12 @@ class App extends Component<IProps, IState> {
237233
/>
238234
}
239235
</div>
240-
);
241-
242-
})
243-
}
244-
</div>
245-
)}
236+
);
237+
})
238+
}
239+
</div>
240+
)
241+
}
246242
<div className="err_warning_container">
247243
{message.map((m, i) => {
248244
return (

0 commit comments

Comments
 (0)