Skip to content

Commit

Permalink
fix(teleport, portal): disable swap, fix release (#1353)
Browse files Browse the repository at this point in the history
  • Loading branch information
dimakorzhovnik authored Jan 30, 2025
1 parent f46462e commit 312e2ce
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 6 deletions.
9 changes: 5 additions & 4 deletions src/containers/portal/release/ActionBarRelease.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ import { AccountValue } from 'src/types/defaultAccount';
import { useQueryClient } from 'src/contexts/queryClient';
import BigNumber from 'bignumber.js';
import Soft3MessageFactory from 'src/services/soft.js/api/msgs';
import { PATTERN_CYBER } from 'src/constants/patterns';
import { useAdviser } from 'src/features/adviser/context';
import { CHAIN_ID } from 'src/constants/config';
import { GIFT_ICON } from '../utils';
import { Dots, BtnGrd, ActionBar, Account } from '../../../components';
import { PATTERN_CYBER } from 'src/constants/patterns';
import { trimString } from '../../../utils/utils';
import { TxHash } from '../hook/usePingTxs';
import { CurrentRelease } from './type';
import mssgsClaim from '../utilsMsgs';
import { useAdviser } from 'src/features/adviser/context';
import { CHAIN_ID } from 'src/constants/config';

const releaseMsg = (giftAddress: string) => {
return {
Expand Down Expand Up @@ -92,7 +92,8 @@ function ActionBarRelease({
},
msgs,
availableRelease(isNanoLedger),
queryClient
queryClient,
true // onlyDelegate
);

if (isNanoLedger) {
Expand Down
12 changes: 12 additions & 0 deletions src/pages/teleport/swap/actionBar.swap.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,18 @@ function ActionBar({ stateActionBar }: { stateActionBar: Props }) {
navigate(`/warp/create-pool?from=${sortCoin[0]}&to=${sortCoin[1]}`);
}, [tokenA, tokenB, navigate]);

// eslint-disable-next-line no-constant-condition
if (true) {
return (
<ActionBarCenter
button={{
text: 'disabled',
disabled: true,
}}
/>
);
}

if (!selectedPool && stage === STAGE_INIT) {
return (
<ActionBarCenter
Expand Down
5 changes: 3 additions & 2 deletions src/pages/teleport/swap/swap.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import { useQueryClient } from 'src/contexts/queryClient';
import { createSearchParams, useSearchParams } from 'react-router-dom';
import { useAppSelector } from 'src/redux/hooks';
import { BASE_DENOM, DENOM_LIQUID } from 'src/constants/config';
import useAdviserTexts from 'src/features/adviser/useAdviserTexts';
import TokenSetterSwap, { TokenSetterId } from './components/TokenSetterSwap';
import { useGetParams, useGetSwapPrice } from '../hooks';
import { sortReserveCoinDenoms, calculatePairAmount } from './utils';
Expand All @@ -25,7 +26,6 @@ import useGetSendTxsByAddressByType from '../hooks/useGetSendTxsByAddress';
import DataSwapTxs from './components/dataSwapTxs/DataSwapTxs';
import { useTeleport } from '../Teleport.context';
import Slippage from './components/slippage/Slippage';
import useAdviserTexts from 'src/features/adviser/useAdviserTexts';

const tokenADefaultValue = BASE_DENOM;
const tokenBDefaultValue = DENOM_LIQUID;
Expand Down Expand Up @@ -347,7 +347,8 @@ function Swap() {
};

useAdviserTexts({
defaultText: 'swap tokens',
// defaultText: 'swap tokens',
defaultText: 'Launching Astroport and migrating the frontend.',
});

return (
Expand Down

0 comments on commit 312e2ce

Please sign in to comment.