From c0bd3883050dc575cb7735df5dad6e057f9830e9 Mon Sep 17 00:00:00 2001 From: yann300 Date: Thu, 24 Jun 2021 09:01:55 +0200 Subject: [PATCH] linting --- libs/remix-debug/src/code/codeManager.ts | 11 +++++------ libs/remix-debug/src/trace/traceAnalyser.ts | 4 ++-- .../debugger-ui/src/reducers/assembly-items.ts | 4 ++-- 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/libs/remix-debug/src/code/codeManager.ts b/libs/remix-debug/src/code/codeManager.ts index fb04f64945..207f3e0510 100644 --- a/libs/remix-debug/src/code/codeManager.ts +++ b/libs/remix-debug/src/code/codeManager.ts @@ -148,8 +148,8 @@ export class CodeManager { private async retrieveIndexAndTrigger (codeMananger, address, step, code) { let result let next - let returnInstructionIndexes = [] - let outOfGasInstructionIndexes = [] + const returnInstructionIndexes = [] + const outOfGasInstructionIndexes = [] try { result = codeMananger.getInstructionIndex(address, step) @@ -170,10 +170,9 @@ export class CodeManager { outOfGasInstructionIndexes.push({ instructionIndex: this.getInstructionIndex(address, value.index), address }) } } - - } catch (error) { - return console.log(error) - } + } catch (error) { + return console.log(error) + } try { codeMananger.event.trigger('changed', [code, address, result, next, returnInstructionIndexes, outOfGasInstructionIndexes]) } catch (e) { diff --git a/libs/remix-debug/src/trace/traceAnalyser.ts b/libs/remix-debug/src/trace/traceAnalyser.ts index ba66f2dbb1..74651b228d 100644 --- a/libs/remix-debug/src/trace/traceAnalyser.ts +++ b/libs/remix-debug/src/trace/traceAnalyser.ts @@ -52,14 +52,14 @@ export class TraceAnalyser { if (traceHelper.isReturnInstruction(step) || traceHelper.isStopInstruction(step) || traceHelper.isRevertInstruction(step)) { this.traceCache.pushStopIndex(index, this.traceCache.currentCall.call.address) } - + try { if (parseInt(step.gas) - parseInt(step.gasCost) <= 0 || step.error === 'OutOfGas') { this.traceCache.pushOutOfGasIndex(index, this.traceCache.currentCall.call.address) } } catch (e) { console.error(e) - } + } } buildCalldata (index, step, tx, newContext) { diff --git a/libs/remix-ui/debugger-ui/src/reducers/assembly-items.ts b/libs/remix-ui/debugger-ui/src/reducers/assembly-items.ts index d5a936bc95..18622bfa68 100644 --- a/libs/remix-ui/debugger-ui/src/reducers/assembly-items.ts +++ b/libs/remix-ui/debugger-ui/src/reducers/assembly-items.ts @@ -32,8 +32,8 @@ const reducedOpcode = (opCodes, payload) => { index: opCodes.index - bottom, nextIndex: opCodes.nextIndex - bottom, display: opCodes.code.slice(bottom, top), - returnInstructionIndexes: payload.returnInstructionIndexes.map((index) => index.instructionIndex - bottom ), - outOfGasInstructionIndexes: payload.outOfGasInstructionIndexes.map((index) => index.instructionIndex - bottom ) + returnInstructionIndexes: payload.returnInstructionIndexes.map((index) => index.instructionIndex - bottom), + outOfGasInstructionIndexes: payload.outOfGasInstructionIndexes.map((index) => index.instructionIndex - bottom) } }