Skip to content

Commit 98b7380

Browse files
author
Jayant Krishnamurthy
committed
fix lint errors
1 parent a72908c commit 98b7380

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/index.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -268,8 +268,9 @@ export const parsePriceData = (data: Buffer): PriceData => {
268268
const drv3 = Number(drv3Component) * 10 ** exponent
269269
const aggregate = parsePriceInfo(data.slice(208, 240), exponent)
270270

271-
let price, confidence = undefined
272-
if (aggregate.status == 1) {
271+
let price
272+
let confidence
273+
if (aggregate.status === 1) {
273274
price = aggregate.price
274275
confidence = aggregate.confidence
275276
}
@@ -282,11 +283,11 @@ export const parsePriceData = (data: Buffer): PriceData => {
282283
const publisher = PKorNull(data.slice(offset, offset + 32))
283284
offset += 32
284285
if (publisher) {
285-
const aggregate = parsePriceInfo(data.slice(offset, offset + 32), exponent)
286+
const componentAggregate = parsePriceInfo(data.slice(offset, offset + 32), exponent)
286287
offset += 32
287288
const latest = parsePriceInfo(data.slice(offset, offset + 32), exponent)
288289
offset += 32
289-
priceComponents.push({ publisher, aggregate, latest })
290+
priceComponents.push({ publisher, aggregate: componentAggregate, latest })
290291
} else {
291292
shouldContinue = false
292293
}

0 commit comments

Comments
 (0)