Skip to content

Commit

Permalink
Fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
forshtat committed Oct 1, 2023
1 parent ed0e734 commit 43a59bb
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions packages/bundler/src/modules/MempoolManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,22 +31,21 @@ export class MempoolManager {
return this._entryCount[address.toLowerCase()]
}

incrementEntryCount (address?: string) {
incrementEntryCount (address?: string): void {
address = address?.toLowerCase()
if (address == null) {
return
}
this._entryCount[address] = (this._entryCount[address] ?? 0) + 1
return this._entryCount[address]
}

decrementEntryCount (address?: string) {
decrementEntryCount (address?: string): void {
address = address?.toLowerCase()
if (address == null || this._entryCount[address] == null) {
return
}
this._entryCount[address] = (this._entryCount[address] ?? 0) - 1
if (this._entryCount[address] ?? 0 <= 0) {
if ((this._entryCount[address] ?? 0) <= 0) {
// eslint-disable-next-line @typescript-eslint/no-dynamic-delete
delete this._entryCount[address]
}
Expand Down

0 comments on commit 43a59bb

Please sign in to comment.