Skip to content

Commit

Permalink
fix eslint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
m30m committed Nov 20, 2024
1 parent be028ab commit 6a3a3de
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
7 changes: 1 addition & 6 deletions scripts/dex-router/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,11 +147,6 @@ export class DexRouter {
chain_id: string;
}> {
const order = opportunity.order;
const clientLimo = new limo.LimoClient(
this.connectionSvm,
order.state.globalConfig
);

const routeBest = await this.getBestRoute(order);

return {
Expand Down Expand Up @@ -359,7 +354,7 @@ export class DexRouter {
(key) => this.lookupTableAccounts[key.toBase58()] === undefined
);

let accountsToReturn = keys
const accountsToReturn = keys
.filter((key) => !missingKeys.includes(key))
.map((key) => this.lookupTableAccounts[key.toBase58()]);
if (missingKeys.length > 0) {
Expand Down
2 changes: 1 addition & 1 deletion scripts/dex-router/src/utils/computeBudget.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export function filterComputeBudgetIxs(
if (ixs.some((ix) => !ix.programId.equals(ComputeBudgetProgram.programId))) {
throw new Error("All instructions must be for the Compute Budget program");
}
let ixsFiltered: TransactionInstruction[] = [];
const ixsFiltered: TransactionInstruction[] = [];

const typesComputeBudget = ixs.map((ix) =>
ComputeBudgetInstruction.decodeInstructionType(ix)
Expand Down
2 changes: 2 additions & 0 deletions scripts/dex-router/src/utils/health.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ export async function checkRpcHealth(
threshold: number,
interval: number
) {
//eslint-disable-next-line no-constant-condition
while (true) {
try {
const slot = await connection.getSlot("finalized");
Expand Down Expand Up @@ -33,6 +34,7 @@ export async function checkExpressRelayHealth(
interval: number
) {
const urlExpressRelayHealth = new URL("/live", endpoint);
//eslint-disable-next-line no-constant-condition
while (true) {
try {
const responseHealth = await fetch(urlExpressRelayHealth);
Expand Down
5 changes: 4 additions & 1 deletion scripts/limonade/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ async function run() {
const connection = new Connection(argv.rpcEndpoint);

const globalConfig = new PublicKey(argv.globalConfig);
let filters: GetProgramAccountsFilter[] = [
const filters: GetProgramAccountsFilter[] = [
{
memcmp: {
bytes: globalConfig.toBase58(),
Expand Down Expand Up @@ -156,6 +156,7 @@ async function run() {
}
);
const resubmitOpportunities = async () => {
//eslint-disable-next-line no-constant-condition
while (true) {
submitExistingOpportunities().catch(console.error);
// Wait for 1 minute before resubmitting
Expand All @@ -165,6 +166,7 @@ async function run() {

const RPC_HEALTH_CHECK_SECONDS_THRESHOLD = 300;
const checkRpcHealth = async () => {
//eslint-disable-next-line no-constant-condition
while (true) {
try {
const slot = await connection.getSlot("finalized");
Expand All @@ -191,6 +193,7 @@ async function run() {

const urlExpressRelayHealth = new URL("/live", argv.endpoint);
const checkExpressRelayHealth = async () => {
//eslint-disable-next-line no-constant-condition
while (true) {
try {
const responseHealth = await fetch(urlExpressRelayHealth);
Expand Down
1 change: 1 addition & 0 deletions scripts/opportunity-provider-limo/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,7 @@ async function run() {
const connection = new Connection(argv.endpointSvm);
const interval = argv.interval;

//eslint-disable-next-line no-constant-condition
while (true) {
await createOpportunities(
skExecutor,
Expand Down
1 change: 0 additions & 1 deletion scripts/opportunity-provider/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import {
encodeFunctionData,
isHex,
http,
PublicClient,
} from "viem";
import { abi as providerAbi } from "./abi/provider";
import { abi as erc20Abi } from "./abi/erc20";
Expand Down

0 comments on commit 6a3a3de

Please sign in to comment.