Skip to content

Commit 8c6e2fe

Browse files
Jayant Krishnamurthyevan-gray
authored andcommitted
fix lint errors
1 parent b3ae177 commit 8c6e2fe

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

src/PythConnection.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ export class PythConnection {
4747
}
4848

4949
const priceData = parsePriceData(account.data)
50-
for (let callback of this.callbacks) {
50+
for (const callback of this.callbacks) {
5151
callback(product, priceData)
5252
}
5353
}
@@ -90,7 +90,7 @@ export class PythConnection {
9090
*/
9191
public async start() {
9292
const accounts = await this.connection.getProgramAccounts(this.pythProgramKey, this.commitment)
93-
for (let account of accounts) {
93+
for (const account of accounts) {
9494
this.handleAccount(account.pubkey, account.account, true)
9595
}
9696

src/example_usage.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,10 @@ const pythConnection = new PythConnection(connection, pythPublicKey)
1010
pythConnection.onPriceChange((product, price) => {
1111
// sample output:
1212
// SRM/USD: $8.68725 ±$0.0131
13+
// tslint:disable-next-line:no-console
1314
console.log(`${product.symbol}: $${price.price} \xB1$${price.confidence}`)
1415
})
1516

17+
// tslint:disable-next-line:no-console
1618
console.log("Reading from Pyth price feed...")
1719
pythConnection.start()

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ export function parseBaseData(data: Buffer): Base | undefined {
100100
}
101101

102102
const magic = data.readUInt32LE(0)
103-
if (magic == Magic) {
103+
if (magic === Magic) {
104104
// program version
105105
const version = data.readUInt32LE(4)
106106
// account type

0 commit comments

Comments
 (0)