Skip to content

Commit

Permalink
refactor: remove any type
Browse files Browse the repository at this point in the history
  • Loading branch information
coreyar committed Aug 15, 2024
1 parent 513c3f0 commit 1848a4a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions packages/cli/source/commands/convert.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { option } from "pastel";
import { Box, Spacer, Text, useApp, useStderr } from "ink";
import zod from "zod";
import { parseUnits } from "viem";
import { TokenConverter, PancakeSwapProvider, UniswapProvider } from "@venusprotocol/keeper-bots";
import { TokenConverter, PancakeSwapProvider, UniswapProvider, BalanceResult } from "@venusprotocol/keeper-bots";
import { stringifyBigInt, getConverterConfigId } from "../utils/index.js";
import { Options, Title, BorderBox } from "../components/index.js";
import { reducer, defaultState } from "../state/convert.js";
Expand Down Expand Up @@ -174,10 +174,10 @@ export default function Convert({ options }: Props) {
await tokenConverter.releaseFundsForConversions(potentialConversions);
}
await Promise.allSettled(
potentialConversions.map(async (t: any) => {
potentialConversions.map(async (t: BalanceResult) => {
let amountOut = t.assetOut.balance;

const vTokenAddress = t.assetOutVTokens.core || t.assetOutVTokens.isolated[0][1];
const vTokenAddress = t.assetOutVTokens.core || t.assetOutVTokens.isolated![0]![1];
const { underlyingPriceUsd, underlyingUsdValue, underlyingDecimals } = await tokenConverter.getUsdValue(
t.assetOut.address,
vTokenAddress,
Expand Down Expand Up @@ -224,7 +224,7 @@ export default function Convert({ options }: Props) {
type: "ExecuteTrade",
error: "Insufficient wallet balance to pay min income",
context: {
converter: t.tokenConverter.id,
converter: t.tokenConverter,
tokenToReceiveFromConverter: t.assetOut.address,
tokenToSendToConverter: t.assetIn.address,
amount,
Expand All @@ -238,7 +238,7 @@ export default function Convert({ options }: Props) {
type: "ExecuteTrade",
error: "Min income too high",
context: {
converter: t.tokenConverter.id,
converter: t.tokenConverter,
tokenToReceiveFromConverter: t.assetOut.address,
tokenToSendToConverter: t.assetIn.address,
amount,
Expand Down

0 comments on commit 1848a4a

Please sign in to comment.