Skip to content

Commit bca5322

Browse files
committed
fix: emode exit
1 parent 0369447 commit bca5322

6 files changed

Lines changed: 11 additions & 15 deletions

File tree

src/components/transactions/Emode/EmodeModalContent.tsx

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -150,13 +150,11 @@ export const EmodeModalContent = ({ user }: { user: ExtendedFormattedUser }) =>
150150
)
151151
.map((r) => r.reserve.symbol);
152152

153-
const hasBorrows = Number(user.totalBorrowsUSD) > 0;
154-
155153
// error handling
156154
let blockingError: ErrorType | undefined = undefined;
157155
// if user is disabling eMode
158156
if (user.isInEmode && disableEmode) {
159-
if (hasBorrows && zeroLtvCollateralSymbols.length > 0) {
157+
if (zeroLtvCollateralSymbols.length > 0) {
160158
blockingError = ErrorType.ZERO_LTV_COLLATERAL_BLOCKING;
161159
} else if (Number(newSummary.healthFactor) < 1.01 && newSummary.healthFactor !== '-1') {
162160
blockingError = ErrorType.EMODE_DISABLED_LIQUIDATION;
@@ -173,10 +171,8 @@ export const EmodeModalContent = ({ user }: { user: ExtendedFormattedUser }) =>
173171
</Typography>
174172
<Typography variant="caption">
175173
<Trans>
176-
You must repay your borrow positions before exiting E-Mode.{' '}
177-
{zeroLtvCollateralSymbols.join(', ')}{' '}
178-
{zeroLtvCollateralSymbols.length === 1 ? 'has' : 'have'} 0 LTV outside of E-Mode and
179-
cannot remain as collateral.
174+
You must disable {zeroLtvCollateralSymbols.join(', ')} as collateral before exiting
175+
E-Mode. These assets have 0 LTV outside of E-Mode and cannot be used as collateral.
180176
</Trans>
181177
</Typography>
182178
</Warning>

src/locales/el/messages.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/locales/en/messages.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/locales/en/messages.po

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3639,10 +3639,6 @@ msgstr "Exchange rate"
36393639
msgid "You unstake here"
36403640
msgstr "You unstake here"
36413641

3642-
#: src/components/transactions/Emode/EmodeModalContent.tsx
3643-
msgid "You must repay your borrow positions before exiting E-Mode. {0} {1} 0 LTV outside of E-Mode and cannot remain as collateral."
3644-
msgstr "You must repay your borrow positions before exiting E-Mode. {0} {1} 0 LTV outside of E-Mode and cannot remain as collateral."
3645-
36463642
#: src/components/caps/CapsHint.tsx
36473643
#: src/modules/dashboard/lists/BorrowAssetsList/BorrowAssetsListMobileItem.tsx
36483644
#: src/modules/reserve-overview/ReserveActions.tsx
@@ -3723,6 +3719,10 @@ msgstr "Merit Program rewards can be claimed"
37233719
msgid "Your supplies"
37243720
msgstr "Your supplies"
37253721

3722+
#: src/components/transactions/Emode/EmodeModalContent.tsx
3723+
msgid "You must disable {0} as collateral before exiting E-Mode. These assets have 0 LTV outside of E-Mode and cannot be used as collateral."
3724+
msgstr "You must disable {0} as collateral before exiting E-Mode. These assets have 0 LTV outside of E-Mode and cannot be used as collateral."
3725+
37263726
#: src/components/transactions/FlowCommons/Error.tsx
37273727
msgid "Transaction failed"
37283728
msgstr "Transaction failed"

src/locales/es/messages.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/locales/fr/messages.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)