diff options
author | Leonid Logvinov <logvinov.leon@gmail.com> | 2019-01-18 19:53:04 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-18 19:53:04 +0800 |
commit | c8212f1d4d255120e5e683664b86f1830fb45ae6 (patch) | |
tree | 73f1528a36b8fc8a0778e164b1579eb5865d944a /packages/sol-trace | |
parent | 7d166dc7da23c30540fb554727a955015073286f (diff) | |
parent | bef30e4209b26c8d4f443f8672e9acb9471c6a37 (diff) | |
download | dexon-sol-tools-c8212f1d4d255120e5e683664b86f1830fb45ae6.tar dexon-sol-tools-c8212f1d4d255120e5e683664b86f1830fb45ae6.tar.gz dexon-sol-tools-c8212f1d4d255120e5e683664b86f1830fb45ae6.tar.bz2 dexon-sol-tools-c8212f1d4d255120e5e683664b86f1830fb45ae6.tar.lz dexon-sol-tools-c8212f1d4d255120e5e683664b86f1830fb45ae6.tar.xz dexon-sol-tools-c8212f1d4d255120e5e683664b86f1830fb45ae6.tar.zst dexon-sol-tools-c8212f1d4d255120e5e683664b86f1830fb45ae6.zip |
Merge branch 'development' into feature/bignumber-8.0
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 1b7aef0f3..550ca2feb 100644 --- a/packages/sol-trace/CHANGELOG.json +++ b/packages/sol-trace/CHANGELOG.json @@ -9,6 +9,15 @@ ] }, { + "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}`; } |