Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
xieqian committed Jan 20, 2024
1 parent 9facffe commit e7ceb6c
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions store/actions/repayFromDeposits.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand All @@ -37,7 +36,7 @@ export async function repayFromDeposits({
expandedAmount.mul(extraDecimalMultiplier).sub(suppliedBalance),
0,
);

// TODO
const transactions: Transaction[] = [];
const repayTemplate =
!position || position === DEFAULT_POSITION
Expand All @@ -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,
Expand Down

0 comments on commit e7ceb6c

Please sign in to comment.