From 63a63543be74d9e8822b7b111aa46350a5f524d8 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Tue, 15 Jan 2019 13:33:24 +0100 Subject: Make mapping namings direct --- packages/sol-trace/src/revert_trace_subprovider.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'packages/sol-trace/src') diff --git a/packages/sol-trace/src/revert_trace_subprovider.ts b/packages/sol-trace/src/revert_trace_subprovider.ts index d36cba08b..fa065cfcb 100644 --- a/packages/sol-trace/src/revert_trace_subprovider.ts +++ b/packages/sol-trace/src/revert_trace_subprovider.ts @@ -106,8 +106,8 @@ export class RevertTraceSubprovider extends TraceCollectionSubprovider { continue; } - const fileIndexByFileName = _.invert(contractData.sources); - const fileIndex = _.parseInt(fileIndexByFileName[sourceRange.fileName]); + const fileNameToFileIndex = _.invert(contractData.sources); + const fileIndex = _.parseInt(fileNameToFileIndex[sourceRange.fileName]); const sourceSnippet = getSourceRangeSnippet(sourceRange, contractData.sourceCodes[fileIndex]); if (sourceSnippet !== null) { sourceSnippets.push(sourceSnippet); -- cgit v1.2.3