swaps disabled message
This commit is contained in:
parent
b09596322e
commit
17ea3b2be4
|
@ -438,9 +438,9 @@ const SwapForm = () => {
|
|||
setShowConfirm={setShowConfirm}
|
||||
amountIn={amountInAsDecimal}
|
||||
inputSymbol={inputBank?.name}
|
||||
amountOut={
|
||||
selectedRoute ? amountOutAsDecimal.toNumber() : undefined
|
||||
}
|
||||
// amountOut={
|
||||
// selectedRoute ? amountOutAsDecimal.toNumber() : undefined
|
||||
// }
|
||||
isDelegatedAccount={isDelegatedAccount}
|
||||
/>
|
||||
) : (
|
||||
|
@ -507,7 +507,7 @@ export default SwapForm
|
|||
|
||||
const SwapFormSubmitButton = ({
|
||||
amountIn,
|
||||
amountOut,
|
||||
// amountOut,
|
||||
inputSymbol,
|
||||
loadingSwapDetails,
|
||||
selectedRoute,
|
||||
|
@ -516,7 +516,7 @@ const SwapFormSubmitButton = ({
|
|||
isDelegatedAccount,
|
||||
}: {
|
||||
amountIn: Decimal
|
||||
amountOut: number | undefined
|
||||
// amountOut: number | undefined
|
||||
inputSymbol: string | undefined
|
||||
loadingSwapDetails: boolean
|
||||
selectedRoute: RouteInfo | undefined | null
|
||||
|
@ -533,12 +533,12 @@ const SwapFormSubmitButton = ({
|
|||
? amountWithBorrow.lt(amountIn)
|
||||
: tokenMax.lt(amountIn)
|
||||
|
||||
const disabled =
|
||||
connected &&
|
||||
(!amountIn.toNumber() ||
|
||||
showInsufficientBalance ||
|
||||
!amountOut ||
|
||||
!selectedRoute)
|
||||
// const disabled =
|
||||
// connected &&
|
||||
// (!amountIn.toNumber() ||
|
||||
// showInsufficientBalance ||
|
||||
// !amountOut ||
|
||||
// !selectedRoute)
|
||||
|
||||
const onClick = connected ? () => setShowConfirm(true) : handleConnect
|
||||
|
||||
|
@ -547,7 +547,8 @@ const SwapFormSubmitButton = ({
|
|||
<Button
|
||||
onClick={onClick}
|
||||
className="mt-6 mb-4 flex w-full items-center justify-center text-base"
|
||||
disabled={disabled}
|
||||
// disabled={disabled}
|
||||
disabled={true}
|
||||
size="large"
|
||||
>
|
||||
{isDelegatedAccount ? (
|
||||
|
|
|
@ -7,6 +7,7 @@ import dynamic from 'next/dynamic'
|
|||
import SwapIntroModal from '@components/modals/SwapIntroModal'
|
||||
import { useLocalStorage } from '@solana/wallet-adapter-react'
|
||||
import { SHOW_SWAP_INTRO_MODAL } from 'utils/constants'
|
||||
import { ExclamationTriangleIcon } from '@heroicons/react/20/solid'
|
||||
// import useLocalStorageState from 'hooks/useLocalStorageState'
|
||||
// import { IS_ONBOARDED_KEY } from 'utils/constants'
|
||||
const SwapTokenChart = dynamic(() => import('./SwapTokenChart'), { ssr: false })
|
||||
|
@ -22,6 +23,12 @@ const SwapPage = () => {
|
|||
|
||||
return (
|
||||
<>
|
||||
<div className="flex items-center justify-center bg-th-down-muted py-2 px-6">
|
||||
<ExclamationTriangleIcon className="mr-1.5 h-4 w-4 flex-shrink-0 text-white" />
|
||||
<span className="leading-tight text-white">
|
||||
Swaps are currently disabled. A progam update is required.
|
||||
</span>
|
||||
</div>
|
||||
<div className="grid grid-cols-12">
|
||||
<div className="col-span-12 border-th-bkg-3 md:col-span-6 md:border-b lg:col-span-7 xl:col-span-8">
|
||||
<SwapTokenChart />
|
||||
|
|
Loading…
Reference in New Issue