diff --git a/components/swap/SwapForm.tsx b/components/swap/SwapForm.tsx index 0609f58f..af2886b6 100644 --- a/components/swap/SwapForm.tsx +++ b/components/swap/SwapForm.tsx @@ -8,7 +8,7 @@ import SwapFormTokenList from './SwapFormTokenList' import { LinkButton } from '../shared/Button' import { EnterBottomExitBottom } from '../shared/Transitions' import { HealthType } from '@blockworks-foundation/mango-v4' -import { SWAP_MARGIN_KEY } from '../../utils/constants' +import { OUTPUT_TOKEN_DEFAULT, SWAP_MARGIN_KEY } from '../../utils/constants' import HealthImpact from '@components/shared/HealthImpact' import TokenVaultWarnings from '@components/shared/TokenVaultWarnings' import SwapSettings from './SwapSettings' @@ -103,6 +103,12 @@ const SwapForm = () => { const handleSwapOrLimit = useCallback( (orderType: string) => { setSwapOrLimit(orderType) + if (orderType !== 'swap' && outputBank?.name === OUTPUT_TOKEN_DEFAULT) { + const { group } = mangoStore.getState() + set((state) => { + state.swap.outputBank = group?.banksMapByName.get('USDC')?.[0] + }) + } }, [outputBank, set, setSwapOrLimit], ) diff --git a/public/locales/en/trade.json b/public/locales/en/trade.json index 5f6f74db..0e6b3a0f 100644 --- a/public/locales/en/trade.json +++ b/public/locales/en/trade.json @@ -23,7 +23,7 @@ "edit-order": "Edit Order", "est-liq-price": "Est. Liq. Price", "est-slippage": "Est. Slippage", - "falls-to": "falls to", + "falls-to": "falls below", "filled": "Filled", "for": "for", "funding-limits": "Funding Limits", @@ -79,7 +79,7 @@ "repay-borrow-order-desc": "Repay {{amount}} {{symbol}} if the oracle price reaches {{triggerPrice}} {{priceUnit}}", "repay-borrow-deposit-order-desc": "Repay {{borrowAmount}} and buy {{depositAmount}} {{symbol}} if the oracle price reaches {{triggerPrice}} {{priceUnit}}", "return-on-equity": "Return on Equity", - "rises-to": "rises to", + "rises-to": "rises above", "sells": "Sells", "settle-funds": "Settle Funds", "settle-funds-error": "Failed to settle funds", diff --git a/public/locales/es/trade.json b/public/locales/es/trade.json index 5f6f74db..0e6b3a0f 100644 --- a/public/locales/es/trade.json +++ b/public/locales/es/trade.json @@ -23,7 +23,7 @@ "edit-order": "Edit Order", "est-liq-price": "Est. Liq. Price", "est-slippage": "Est. Slippage", - "falls-to": "falls to", + "falls-to": "falls below", "filled": "Filled", "for": "for", "funding-limits": "Funding Limits", @@ -79,7 +79,7 @@ "repay-borrow-order-desc": "Repay {{amount}} {{symbol}} if the oracle price reaches {{triggerPrice}} {{priceUnit}}", "repay-borrow-deposit-order-desc": "Repay {{borrowAmount}} and buy {{depositAmount}} {{symbol}} if the oracle price reaches {{triggerPrice}} {{priceUnit}}", "return-on-equity": "Return on Equity", - "rises-to": "rises to", + "rises-to": "rises above", "sells": "Sells", "settle-funds": "Settle Funds", "settle-funds-error": "Failed to settle funds", diff --git a/public/locales/ru/trade.json b/public/locales/ru/trade.json index 5f6f74db..0e6b3a0f 100644 --- a/public/locales/ru/trade.json +++ b/public/locales/ru/trade.json @@ -23,7 +23,7 @@ "edit-order": "Edit Order", "est-liq-price": "Est. Liq. Price", "est-slippage": "Est. Slippage", - "falls-to": "falls to", + "falls-to": "falls below", "filled": "Filled", "for": "for", "funding-limits": "Funding Limits", @@ -79,7 +79,7 @@ "repay-borrow-order-desc": "Repay {{amount}} {{symbol}} if the oracle price reaches {{triggerPrice}} {{priceUnit}}", "repay-borrow-deposit-order-desc": "Repay {{borrowAmount}} and buy {{depositAmount}} {{symbol}} if the oracle price reaches {{triggerPrice}} {{priceUnit}}", "return-on-equity": "Return on Equity", - "rises-to": "rises to", + "rises-to": "rises above", "sells": "Sells", "settle-funds": "Settle Funds", "settle-funds-error": "Failed to settle funds", diff --git a/public/locales/zh/trade.json b/public/locales/zh/trade.json index 6630a69e..ba4e7057 100644 --- a/public/locales/zh/trade.json +++ b/public/locales/zh/trade.json @@ -23,7 +23,7 @@ "edit-order": "编辑订单", "est-liq-price": "预计清算价格", "est-slippage": "预计下滑", - "falls-to": "falls to", + "falls-to": "falls below", "filled": "Filled", "for": "for", "funding-limits": "资金费限制", @@ -79,7 +79,7 @@ "repay-borrow-order-desc": "Repay {{amount}} {{symbol}} if the oracle price reaches {{triggerPrice}} {{priceUnit}}", "repay-borrow-deposit-order-desc": "Repay {{borrowAmount}} and buy {{depositAmount}} {{symbol}} if the oracle price reaches {{triggerPrice}} {{priceUnit}}", "return-on-equity": "Return on Equity", - "rises-to": "rises to", + "rises-to": "rises above", "sells": "卖单", "settle-funds": "借清资金", "settle-funds-error": "借清出错", diff --git a/public/locales/zh_tw/trade.json b/public/locales/zh_tw/trade.json index 91979b2c..571013b3 100644 --- a/public/locales/zh_tw/trade.json +++ b/public/locales/zh_tw/trade.json @@ -23,7 +23,7 @@ "edit-order": "編輯訂單", "est-liq-price": "預計清算價格", "est-slippage": "預計下滑", - "falls-to": "falls to", + "falls-to": "falls below", "filled": "Filled", "for": "for", "funding-limits": "資金費限制", @@ -79,7 +79,7 @@ "repay-borrow-order-desc": "Repay {{amount}} {{symbol}} if the oracle price reaches {{triggerPrice}} {{priceUnit}}", "repay-borrow-deposit-order-desc": "Repay {{borrowAmount}} and buy {{depositAmount}} {{symbol}} if the oracle price reaches {{triggerPrice}} {{priceUnit}}", "return-on-equity": "Return on Equity", - "rises-to": "rises to", + "rises-to": "rises above", "sells": "賣單", "settle-funds": "借清資金", "settle-funds-error": "借清出錯",