From e7ceb6c26843425ff11f8da9776fdded39cb8d61 Mon Sep 17 00:00:00 2001 From: xieqian Date: Sat, 20 Jan 2024 23:58:50 +0800 Subject: [PATCH] update --- store/actions/repayFromDeposits.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/store/actions/repayFromDeposits.ts b/store/actions/repayFromDeposits.ts index 7ea3bd83..9ac27eb6 100644 --- a/store/actions/repayFromDeposits.ts +++ b/store/actions/repayFromDeposits.ts @@ -28,7 +28,6 @@ export async function repayFromDeposits({ const { decimals } = (await getMetadata(tokenId))!; const account = await getAccount().then(transformAccount); if (!account) return; - const extraDecimalMultiplier = expandTokenDecimal(1, extraDecimals); const expandedAmount = expandTokenDecimal(amount, decimals); @@ -37,7 +36,7 @@ export async function repayFromDeposits({ expandedAmount.mul(extraDecimalMultiplier).sub(suppliedBalance), 0, ); - + // TODO const transactions: Transaction[] = []; const repayTemplate = !position || position === DEFAULT_POSITION @@ -50,7 +49,7 @@ export async function repayFromDeposits({ : { PositionRepay: { asset_amount: { - amount: expandedAmount.mul(extraDecimalMultiplier).toFixed(0), + amount: isMax ? undefined : expandedAmount.mul(extraDecimalMultiplier).toFixed(0), token_id: tokenId, }, position,