update copy and set default buy token to usdc for trigger order
This commit is contained in:
parent
a86f6dd94a
commit
06fc6dcefc
|
@ -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],
|
||||
)
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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": "借清出错",
|
||||
|
|
|
@ -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": "借清出錯",
|
||||
|
|
Loading…
Reference in New Issue