Disable swap and deposits. Add deprecation notice
This commit is contained in:
parent
abb6720a13
commit
60878e0daf
31
src/App.tsx
31
src/App.tsx
|
@ -6,6 +6,37 @@ import { Routes } from "./routes";
|
|||
function App() {
|
||||
return (
|
||||
<div className="App">
|
||||
<div className="Banner">
|
||||
<div
|
||||
className="Banner-description"
|
||||
style={{
|
||||
textAlign: 'left',
|
||||
paddingLeft: '30px',
|
||||
paddingTop: '5px'
|
||||
}}
|
||||
>
|
||||
<strong>Swap is being deprecated.</strong>
|
||||
<div
|
||||
style={{
|
||||
textAlign: 'left',
|
||||
paddingLeft: '10px'
|
||||
}}
|
||||
>
|
||||
<ul>
|
||||
<li>
|
||||
Removing liquidity is enabled through the My Pools tab
|
||||
</li>
|
||||
<li>
|
||||
The Provide Liquidity and Swap functionalities have been disabled
|
||||
</li>
|
||||
<li>
|
||||
For easy swapping using the on-chain Serum orderbook consider using
|
||||
<a href={'https://raydium.io/swap/'} target="_blank" rel="noopener noreferrer"> raydium.io</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<Routes />
|
||||
<div className="social-buttons">
|
||||
<GitHubButton
|
||||
|
|
|
@ -191,17 +191,18 @@ export const AddToLiquidity = () => {
|
|||
className="add-button"
|
||||
onClick={() => executeAction(pool)}
|
||||
trigger={["click"]}
|
||||
disabled={
|
||||
connected &&
|
||||
(depositType === "both"
|
||||
? pendingTx ||
|
||||
!A.account ||
|
||||
!B.account ||
|
||||
A.account === B.account ||
|
||||
!hasSufficientBalance
|
||||
: !getDepositToken()?.account ||
|
||||
!getDepositToken()?.sufficientBalance())
|
||||
}
|
||||
// disabled={
|
||||
// connected &&
|
||||
// (depositType === "both"
|
||||
// ? pendingTx ||
|
||||
// !A.account ||
|
||||
// !B.account ||
|
||||
// A.account === B.account ||
|
||||
// !hasSufficientBalance
|
||||
// : !getDepositToken()?.account ||
|
||||
// !getDepositToken()?.sufficientBalance())
|
||||
// }
|
||||
disabled={true}
|
||||
type="primary"
|
||||
size="large"
|
||||
overlay={
|
||||
|
@ -212,16 +213,17 @@ export const AddToLiquidity = () => {
|
|||
/>
|
||||
}
|
||||
>
|
||||
{depositType === "both"
|
||||
? generateActionLabel(
|
||||
pool ? ADD_LIQUIDITY_LABEL : CREATE_POOL_LABEL,
|
||||
connected,
|
||||
tokenMap,
|
||||
A,
|
||||
B
|
||||
)
|
||||
: generateExactOneLabel(connected, tokenMap, getDepositToken())}
|
||||
{pendingTx && <Spin indicator={antIcon} className="add-spinner" />}
|
||||
{/*{depositType === "both"*/}
|
||||
{/* ? generateActionLabel(*/}
|
||||
{/* pool ? ADD_LIQUIDITY_LABEL : CREATE_POOL_LABEL,*/}
|
||||
{/* connected,*/}
|
||||
{/* tokenMap,*/}
|
||||
{/* A,*/}
|
||||
{/* B*/}
|
||||
{/* )*/}
|
||||
{/* : generateExactOneLabel(connected, tokenMap, getDepositToken())}*/}
|
||||
{/*{pendingTx && <Spin indicator={antIcon} className="add-spinner" />}*/}
|
||||
Swap is being deprecated
|
||||
</Dropdown.Button>
|
||||
);
|
||||
|
||||
|
|
|
@ -146,30 +146,32 @@ export const TradeEntry = () => {
|
|||
size="large"
|
||||
onClick={connected ? handleSwap : connect}
|
||||
style={{ width: "100%" }}
|
||||
disabled={
|
||||
connected &&
|
||||
(pendingTx ||
|
||||
!A.account ||
|
||||
!B.mintAddress ||
|
||||
A.account === B.account ||
|
||||
!A.sufficientBalance() ||
|
||||
!pool)
|
||||
}
|
||||
disabled={true}
|
||||
// disabled={
|
||||
// connected &&
|
||||
// (pendingTx ||
|
||||
// !A.account ||
|
||||
// !B.mintAddress ||
|
||||
// A.account === B.account ||
|
||||
// !A.sufficientBalance() ||
|
||||
// !pool)
|
||||
// }
|
||||
>
|
||||
{generateActionLabel(
|
||||
!pool
|
||||
? POOL_NOT_AVAILABLE(
|
||||
getTokenName(tokenMap, A.mintAddress),
|
||||
getTokenName(tokenMap, B.mintAddress)
|
||||
)
|
||||
: SWAP_LABEL,
|
||||
connected,
|
||||
tokenMap,
|
||||
A,
|
||||
B,
|
||||
true
|
||||
)}
|
||||
{pendingTx && <Spin indicator={antIcon} className="add-spinner" />}
|
||||
{/*{generateActionLabel(*/}
|
||||
{/* !pool*/}
|
||||
{/* ? POOL_NOT_AVAILABLE(*/}
|
||||
{/* getTokenName(tokenMap, A.mintAddress),*/}
|
||||
{/* getTokenName(tokenMap, B.mintAddress)*/}
|
||||
{/* )*/}
|
||||
{/* : SWAP_LABEL,*/}
|
||||
{/* connected,*/}
|
||||
{/* tokenMap,*/}
|
||||
{/* A,*/}
|
||||
{/* B,*/}
|
||||
{/* true*/}
|
||||
{/*)}*/}
|
||||
{/*{pendingTx && <Spin indicator={antIcon} className="add-spinner" />}*/}
|
||||
Swap is being deprecated
|
||||
</Button>
|
||||
<TradeInfo pool={pool} />
|
||||
</>
|
||||
|
|
Loading…
Reference in New Issue