chore: docs + lint

This commit is contained in:
aryan
2025-01-06 20:39:55 +05:30
parent 94af73e3a5
commit 2504450e1a
35 changed files with 69 additions and 77 deletions

View File

@@ -794,8 +794,6 @@ export class SolanaFlashOpenTrade extends Tool {
try {
const parsedInput = JSON.parse(input);
console.log(parsedInput);
// Validate input parameters
if (!parsedInput.token) {
throw new Error("Token is required, received: " + parsedInput.token);

View File

@@ -1,11 +1,5 @@
import { PublicKey, ComputeBudgetProgram } from "@solana/web3.js";
import {
PerpetualsClient,
OraclePrice,
PoolConfig,
Privilege,
Side,
} from "flash-sdk";
import { ComputeBudgetProgram } from "@solana/web3.js";
import { PoolConfig, Privilege, Side } from "flash-sdk";
import { BN } from "@coral-xyz/anchor";
import { SolanaAgentKit } from "../index";
import {
@@ -54,7 +48,7 @@ export async function flashCloseTrade(
const [targetSymbol, collateralSymbol] = marketData.tokenPair.split("/");
// Fetch oracle prices
const [targetPrice, collateralPrice] = await Promise.all([
const [targetPrice] = await Promise.all([
fetchOraclePrice(targetSymbol),
fetchOraclePrice(collateralSymbol),
]);

View File

@@ -1,4 +1,4 @@
import { PublicKey, ComputeBudgetProgram } from "@solana/web3.js";
import { ComputeBudgetProgram } from "@solana/web3.js";
import {
PerpetualsClient,
OraclePrice,

View File

@@ -49,4 +49,4 @@ export * from "./transfer";
export * from "./withdraw_all";
export * from "./flash_open_trade";
export * from "./flash_close_trade";
export * from "./flash_close_trade";

View File

@@ -238,7 +238,7 @@ export async function getNftTradingAccountInfo(
nftOwnerRebateTokenAccountPk,
);
if (!accountExists) {
console.log(
console.error(
"NFT owner rebate token account does not exist and may need to be created",
);
}