Skip to content
This repository has been archived by the owner on Jul 3, 2024. It is now read-only.

Commit

Permalink
fix: wrong conditions for decorators in gas estimation
Browse files Browse the repository at this point in the history
  • Loading branch information
0xtekgrinder committed Feb 18, 2024
1 parent 743ac35 commit 04c9d02
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions toolchains/solidity/extension/src/gas-estimation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -269,12 +269,12 @@ async function showReport(editor: vscode.TextEditor, reports: ReportDecorators,
let report = reports.get(editor.document.uri.path);
const reportSaved = reportsSaved.get(editor.document.uri.path);

if (!report || !reportSaved) {
if (!report && !reportSaved) {
} else if (report && !reportSaved) {
editor.setDecorations(decorationType, report);
} else if (!report && reportSaved) {
editor.setDecorations(decorationType, reportSaved);
} else {
} else if (report && reportSaved) {
report = report.filter((reportElement) => {
return !reportSaved.some((reportSavedElement) => {
return reportElement.range.isEqual(reportSavedElement.range);
Expand Down

0 comments on commit 04c9d02

Please sign in to comment.