diff options
Diffstat (limited to 'packages/sol-trace')
-rw-r--r-- | packages/sol-trace/CHANGELOG.json | 9 | ||||
-rw-r--r-- | packages/sol-trace/CHANGELOG.md | 4 | ||||
-rw-r--r-- | packages/sol-trace/package.json | 4 | ||||
-rw-r--r-- | packages/sol-trace/src/revert_trace_subprovider.ts | 17 |
4 files changed, 18 insertions, 16 deletions
diff --git a/packages/sol-trace/CHANGELOG.json b/packages/sol-trace/CHANGELOG.json index 8157d441e..d2ad03030 100644 --- a/packages/sol-trace/CHANGELOG.json +++ b/packages/sol-trace/CHANGELOG.json @@ -1,5 +1,14 @@ [ { + "timestamp": 1547747677, + "version": "1.0.3", + "changes": [ + { + "note": "Dependencies updated" + } + ] + }, + { "timestamp": 1547561734, "version": "1.0.2", "changes": [ diff --git a/packages/sol-trace/CHANGELOG.md b/packages/sol-trace/CHANGELOG.md index ac09a1bbf..18c1719bf 100644 --- a/packages/sol-trace/CHANGELOG.md +++ b/packages/sol-trace/CHANGELOG.md @@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only. CHANGELOG +## v1.0.3 - _January 17, 2019_ + + * Dependencies updated + ## v1.0.2 - _January 15, 2019_ * Dependencies updated diff --git a/packages/sol-trace/package.json b/packages/sol-trace/package.json index acae60303..2aedf7ebc 100644 --- a/packages/sol-trace/package.json +++ b/packages/sol-trace/package.json @@ -1,6 +1,6 @@ { "name": "@0x/sol-trace", - "version": "1.0.2", + "version": "1.0.3", "engines": { "node": ">=6.12" }, @@ -29,7 +29,7 @@ }, "homepage": "https://github.com/0xProject/0x-monorepo/packages/sol-trace/README.md", "dependencies": { - "@0x/sol-tracing-utils": "^4.0.0", + "@0x/sol-tracing-utils": "^4.0.1", "@0x/subproviders": "^2.1.11", "@0x/typescript-typings": "^3.0.8", "ethereum-types": "^1.1.6", diff --git a/packages/sol-trace/src/revert_trace_subprovider.ts b/packages/sol-trace/src/revert_trace_subprovider.ts index fa065cfcb..046dad812 100644 --- a/packages/sol-trace/src/revert_trace_subprovider.ts +++ b/packages/sol-trace/src/revert_trace_subprovider.ts @@ -109,9 +109,7 @@ export class RevertTraceSubprovider extends TraceCollectionSubprovider { const fileNameToFileIndex = _.invert(contractData.sources); const fileIndex = _.parseInt(fileNameToFileIndex[sourceRange.fileName]); const sourceSnippet = getSourceRangeSnippet(sourceRange, contractData.sourceCodes[fileIndex]); - if (sourceSnippet !== null) { - sourceSnippets.push(sourceSnippet); - } + sourceSnippets.push(sourceSnippet); } const filteredSnippets = filterSnippets(sourceSnippets); if (filteredSnippets.length > 0) { @@ -135,9 +133,7 @@ function filterSnippets(sourceSnippets: SourceSnippet[]): SourceSnippet[] { const results: SourceSnippet[] = [sourceSnippets[0]]; let prev = sourceSnippets[0]; for (const sourceSnippet of sourceSnippets) { - if (sourceSnippet.type === 'IfStatement') { - continue; - } else if (sourceSnippet.source === prev.source) { + if (sourceSnippet.source === prev.source) { prev = sourceSnippet; continue; } @@ -157,12 +153,5 @@ function getStackTraceString(sourceSnippet: SourceSnippet): string { } function getSourceSnippetString(sourceSnippet: SourceSnippet): string { - switch (sourceSnippet.type) { - case 'ContractDefinition': - return `contract ${sourceSnippet.name}`; - case 'FunctionDefinition': - return `function ${sourceSnippet.name}`; - default: - return `${sourceSnippet.source}`; - } + return `${sourceSnippet.source}`; } |