Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions src/components/dropdowns/AssetDropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ type AssetDropdownProps = SelectProps & {
label?: string;
assetLabel?: string;
blockchainLabel?: string;
disabledFilter?: (symbol: BridgeCurrency | string) => boolean;
};

const getAssetData = (
Expand Down Expand Up @@ -129,6 +130,7 @@ export const AssetDropdown: FunctionComponent<AssetDropdownProps> = ({
balances,
assetLabel = "Asset",
blockchainLabel = "Blockchain",
disabledFilter = () => false,
...rest
}) => {
const styles = useAssetDropdownStyles();
Expand Down Expand Up @@ -210,10 +212,7 @@ export const AssetDropdown: FunctionComponent<AssetDropdownProps> = ({
<MenuItem
key={symbol}
value={symbol}
disabled={
symbol === BridgeCurrency.LUNA ||
symbol === BridgeCurrency.RENLUNA
}
disabled={disabledFilter(symbol)}
>
<Box display="flex" alignItems="center" width="100%">
<Box width="45px" className={styles.iconWrapper}>
Expand Down
5 changes: 5 additions & 0 deletions src/features/mint/steps/MintInitialStep.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import {
} from "../../../components/dropdowns/AssetDropdown";
import { PaperContent } from "../../../components/layout/Paper";
import {
BridgeCurrency,
supportedLockCurrencies,
supportedMintDestinationChains,
toMintedCurrency,
Expand All @@ -27,6 +28,9 @@ import {
import { MintIntro } from "../components/MintHelpers";
import { $mint, setMintCurrency } from "../mintSlice";

const mintDisabledFilter = (symbol: BridgeCurrency | string) => {
return symbol === BridgeCurrency.LUNA || symbol === BridgeCurrency.RENLUNA;
};
export const MintInitialStep: FunctionComponent<TxConfigurationStepProps> = ({
onNext,
}) => {
Expand Down Expand Up @@ -75,6 +79,7 @@ export const MintInitialStep: FunctionComponent<TxConfigurationStepProps> = ({
available={supportedLockCurrencies}
value={currency}
onChange={handleCurrencyChange}
disabledFilter={mintDisabledFilter}
/>
</AssetDropdownWrapper>
<AssetDropdownWrapper>
Expand Down
14 changes: 1 addition & 13 deletions src/features/release/steps/ReleaseProcessStep.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,7 @@ import { paths } from "../../../pages/routes";
import { useNotifications } from "../../../providers/Notifications";
import { usePageTitle, usePaperTitle } from "../../../providers/TitleProviders";
import { getBurnChainMap } from "../../../services/rentx";
import {
BridgeCurrency,
getChainConfigByRentxName,
} from "../../../utils/assetConfigs";
import { getChainConfigByRentxName } from "../../../utils/assetConfigs";
import { $exchangeRates } from "../../marketData/marketDataSlice";
import { findExchangeRate } from "../../marketData/marketDataUtils";
import {
Expand All @@ -58,7 +55,6 @@ import { TransactionFees } from "../../transactions/components/TransactionFees";
import { TransactionMenu } from "../../transactions/components/TransactionMenu";
import {
AnyBurnSession,
LunaWarningDialog,
ProgressStatus,
} from "../../transactions/components/TransactionsHelpers";
import { useTransactionMenuControl } from "../../transactions/transactionsHooks";
Expand Down Expand Up @@ -263,14 +259,6 @@ export const ReleaseProcessStep: FunctionComponent<RouteComponentProps> = ({
onClose={handleModalClose}
onEnable={handleEnable}
/>
<LunaWarningDialog
open={
releaseCurrencyConfig.symbol === BridgeCurrency.LUNA ||
releaseCurrencyConfig.symbol === BridgeCurrency.RENLUNA
}
onMainAction={handlePreviousStepClick}
mainActionText="Go to Home"
/>
<TransactionMenu tx={tx} open={menuOpened} onClose={handleMenuClose} />
<Debug it={{ tooltipOpened, parsedTx, txState: txState }} />
</>
Expand Down