Skip to content

Commit 58ce79f

Browse files
committed
feat: streamline how balance updates are shown on forms
1 parent 6ea3611 commit 58ce79f

2 files changed

Lines changed: 24 additions & 5 deletions

File tree

apps/evm/src/libs/translations/translations/en.json

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,7 @@
264264
},
265265
"assetAccessor": {
266266
"disabledActionNotice": {
267+
"boost": "Boosting has been disabled for this market",
267268
"borrow": "Borrowing has been disabled for this market",
268269
"repay": "Repaying has been disabled for this market",
269270
"supply": "Supplying has been disabled for this market",
@@ -659,6 +660,13 @@
659660
},
660661
"operationForm": {
661662
"availableAmount": "Available",
663+
"boost": {
664+
"flows": {
665+
"borrow": "Borrow {{ tokenSymbol }}",
666+
"supply": "Supply {{ tokenSymbol }}",
667+
"swap": "Swap"
668+
}
669+
},
662670
"boostTabAltText": "Rocket icon",
663671
"boostTabTitle": "Boost",
664672
"borrowTabTitle": "Borrow",
@@ -675,6 +683,7 @@
675683
"noCollateral": "You need to supply tokens and enable them as collateral before you can borrow {{tokenSymbol}} from this pool",
676684
"priceImpactTooHigh": "Price impact too high",
677685
"supplyCapReached": "The supply cap of {{assetSupplyCap}} has been reached for this pool. You can not supply to this market anymore until withdraws are made or its supply cap is increased.",
686+
"tooRisky": "This transaction would get your account liquidated",
678687
"unwrappingUnsupported": "Unwrapping unsupported",
679688
"wrappingUnsupported": "Wrapping unsupported"
680689
},
@@ -688,12 +697,17 @@
688697
},
689698
"repayTabTitle": "Repay",
690699
"rightMaxButtonLabel": "MAX",
700+
"riskSlider": {
701+
"highRisk": "High risk",
702+
"lowRisk": "Low risk"
703+
},
691704
"riskyOperation": {
692705
"toggleLabel": "I acknowledge the risks involved",
693706
"warning": "Your health factor will be low after this transaction, increasing the risk of liquidation"
694707
},
695708
"safeMaxButtonLabel": "SAFE MAX",
696709
"submitButtonLabel": {
710+
"boost": "Boost",
697711
"borrow": "Borrow",
698712
"enterValidAmount": "Enter valid amount",
699713
"repay": "Repay",
@@ -1524,4 +1538,4 @@
15241538
},
15251539
"withdrawTabTitle": "Withdraw"
15261540
}
1527-
}
1541+
}

apps/evm/src/pages/Vai/Borrow/index.tsx

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -149,10 +149,15 @@ export const Borrow: React.FC = () => {
149149
},
150150
];
151151

152-
const { data: getSimulatedPoolData } = useSimulateBalanceMutations({
153-
pool: legacyPool,
154-
balanceMutations,
155-
});
152+
const { data: getSimulatedPoolData } = useSimulateBalanceMutations(
153+
{
154+
pool: legacyPool,
155+
balanceMutations,
156+
},
157+
{
158+
enabled: debouncedInputAmountTokens.isGreaterThan(0),
159+
},
160+
);
156161
const simulatedPool = getSimulatedPoolData?.pool;
157162

158163
const feeTokens = useMemo(

0 commit comments

Comments
 (0)