Skip to content

Commit

Permalink
fix: copy issue (#196)
Browse files Browse the repository at this point in the history
  • Loading branch information
Rickk137 authored Mar 22, 2024
1 parent 379cad5 commit 9373653
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
15 changes: 13 additions & 2 deletions liquidity/ui/src/pages/Manage/ManageActions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -205,14 +205,25 @@ export const ManageAction = ({ liquidityPosition }: { liquidityPosition?: Liquid
const cRatioIsCloseToLiqRatio = cRatio.mul(0.9).lt(collateralType.liquidationRatioD18);

if (cRatioIsCloseToLiqRatio) {
queryParams.set('manageAction', 'repay');
queryParams.set(
'manageAction',
isBaseAndromeda(network?.id, network?.preset) ? 'deposit' : 'repay'
);
navigate({ pathname: location.pathname, search: queryParams.toString() }, { replace: true });
return;
}

queryParams.set('manageAction', 'deposit');
navigate({ pathname: location.pathname, search: queryParams.toString() }, { replace: true });
}, [collateralType, liquidityPosition, location.pathname, location.search, navigate]);
}, [
collateralType,
liquidityPosition,
location.pathname,
location.search,
navigate,
network?.id,
network?.preset,
]);

return (
<>
Expand Down
2 changes: 1 addition & 1 deletion liquidity/ui/src/pages/Manage/RepayAllDebt.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ export const RepayAllDebt = ({ liquidityPosition }: { liquidityPosition: Liquidi
data-testid="repay"
>
Repay USDC $<Amount value={currentDebt} data-testid="current debt" />
{sufficientBalance ? '' : '(Isufficient Balance)'}
{sufficientBalance ? '' : ' (Isufficient Balance)'}
</Button>
</Flex>
);
Expand Down

0 comments on commit 9373653

Please sign in to comment.