diff --git a/ts/sdk/cli/commands/initVault.ts b/ts/sdk/cli/commands/initVault.ts index f3db84aa..01780b85 100644 --- a/ts/sdk/cli/commands/initVault.ts +++ b/ts/sdk/cli/commands/initVault.ts @@ -16,7 +16,6 @@ import { } from "../../src"; import { getCommandContext } from "../utils"; import { VAULT_PROGRAM_ID } from "../../src/types/types"; -import { red } from "bn.js"; export const initVault = async (program: Command, cmdOpts: OptionValues) => { const { @@ -24,7 +23,7 @@ export const initVault = async (program: Command, cmdOpts: OptionValues) => { driftVault } = await getCommandContext(program, true); - let newVaultName = cmdOpts.name; + const newVaultName = cmdOpts.name; if (!newVaultName) { throw new Error("Must provide vault name with -n/--name"); } @@ -119,7 +118,7 @@ export const initVault = async (program: Command, cmdOpts: OptionValues) => { readline.close(); process.exit(0); } - console.log('Creating vault...') + console.log('Creating vault...'); const initTx = await driftVault.initializeVault({ name: vaultNameBytes, diff --git a/ts/sdk/cli/commands/managerUpdateVault.1.ts b/ts/sdk/cli/commands/managerUpdateVault.1.ts index af1fa3ad..6e7fbf2c 100644 --- a/ts/sdk/cli/commands/managerUpdateVault.1.ts +++ b/ts/sdk/cli/commands/managerUpdateVault.1.ts @@ -4,7 +4,10 @@ import { Command } from "commander"; import { getCommandContext } from "../utils"; -import { BN, TEN } from "@drift-labs/sdk"; +import { + BN, + // TEN +} from "@drift-labs/sdk"; export const managerUpdateVault = async (program: Command, cmdOpts: OptionValues) => { @@ -31,8 +34,8 @@ export const managerUpdateVault = async (program: Command, cmdOpts: OptionValues if (!spotMarket) { throw new Error("No spot market found"); } - const spotPrecision = TEN.pow(new BN(spotMarket.decimals)); - const spotMarketName = decodeName(spotMarket.name); + // const spotPrecision = TEN.pow(new BN(spotMarket.decimals)); + // const spotMarketName = decodeName(spotMarket.name); let redeemPeriodSec = cmdOpts.redeemPeriod; if (!redeemPeriodSec) { @@ -45,21 +48,21 @@ export const managerUpdateVault = async (program: Command, cmdOpts: OptionValues maxTokens = "0"; } maxTokens = parseInt(maxTokens); - const maxTokensBN = new BN(maxTokens).mul(spotPrecision); + // const maxTokensBN = new BN(maxTokens).mul(spotPrecision); let managementFee = cmdOpts.managementFee; if (!managementFee) { managementFee = "0"; } managementFee = parseInt(managementFee); - const managementFeeBN = new BN(managementFee).mul(PERCENTAGE_PRECISION).div(new BN(100)); + // const managementFeeBN = new BN(managementFee).mul(PERCENTAGE_PRECISION).div(new BN(100)); let profitShare = cmdOpts.profitShare; if (!profitShare) { profitShare = "0"; } profitShare = parseInt(profitShare); - const profitShareBN = new BN(profitShare).mul(PERCENTAGE_PRECISION).div(new BN(100)); + // const profitShareBN = new BN(profitShare).mul(PERCENTAGE_PRECISION).div(new BN(100)); let permissioned = cmdOpts.permissioned; if (!permissioned) { @@ -71,7 +74,7 @@ export const managerUpdateVault = async (program: Command, cmdOpts: OptionValues minDepositAmount = "0"; } minDepositAmount = parseInt(minDepositAmount); - const minDepositAmountBN = new BN(minDepositAmount).mul(spotPrecision); + // const minDepositAmountBN = new BN(minDepositAmount).mul(spotPrecision); // null means unchanged const newParams = { diff --git a/ts/sdk/cli/commands/managerUpdateVault.ts b/ts/sdk/cli/commands/managerUpdateVault.ts index 1653c701..876fbbdb 100644 --- a/ts/sdk/cli/commands/managerUpdateVault.ts +++ b/ts/sdk/cli/commands/managerUpdateVault.ts @@ -81,7 +81,7 @@ export const managerUpdateVault = async (program: Command, cmdOpts: OptionValues const profitShareAfter = profitShareNumber !== null ? `${profitShareNumber / PERCENTAGE_PRECISION.toNumber() * 100.0}%` : 'unchanged'; console.log(` ProfitShare: ${profitShareBefore}% -> ${profitShareAfter}`); const permissionedBefore = vault.permissioned; - const permissionedAfter = permissioned !== null ? permissioned : 'unchanged ' + const permissionedAfter = permissioned !== null ? permissioned : 'unchanged '; console.log(` Permissioned: ${permissionedBefore} -> ${permissionedAfter}`); const readline = require('readline').createInterface({ diff --git a/ts/sdk/cli/utils.ts b/ts/sdk/cli/utils.ts index 7b9bbac8..84a4660b 100644 --- a/ts/sdk/cli/utils.ts +++ b/ts/sdk/cli/utils.ts @@ -51,7 +51,7 @@ export function printVault(vault: Vault) { return { managerShares, managerSharePct, - } + }; } export function printVaultDepositor(vaultDepositor) {