diff --git a/packages/ui/src/components/common/MultiWalletDropdown.tsx b/packages/ui/src/components/common/MultiWalletDropdown.tsx index 464de861..6aefa899 100644 --- a/packages/ui/src/components/common/MultiWalletDropdown.tsx +++ b/packages/ui/src/components/common/MultiWalletDropdown.tsx @@ -15,7 +15,7 @@ import { ProviderOptionsContext } from '../../providers/RelayKitProvider.js' type MultiWalletDropdownProps = { context: 'origin' | 'destination' wallets: LinkedWallet[] - selectedWalletAddress: string + selectedWalletAddress?: string chain?: RelayChain onSelect: (wallet: LinkedWallet) => void onLinkNewWallet: () => void diff --git a/packages/ui/src/components/widgets/SwapButton.tsx b/packages/ui/src/components/widgets/SwapButton.tsx index 06136a17..f21d5268 100644 --- a/packages/ui/src/components/widgets/SwapButton.tsx +++ b/packages/ui/src/components/widgets/SwapButton.tsx @@ -6,6 +6,7 @@ import { EventNames } from '../../constants/events.js' type SwapButtonProps = { transactionModalOpen: boolean + depositAddressModalOpen: boolean onConnectWallet?: () => void onAnalyticEvent?: (eventName: string, data?: any) => void onClick: () => void @@ -28,6 +29,7 @@ type SwapButtonProps = { const SwapButton: FC = ({ transactionModalOpen, + depositAddressModalOpen, isValidFromAddress, isValidToAddress, context, @@ -48,21 +50,25 @@ const SwapButton: FC = ({ const isMounted = useMounted() if (isMounted && (address || !fromChainWalletVMSupported)) { + const invalidAmount = + !price || + Number(debouncedInputAmountValue) === 0 || + Number(debouncedOutputAmountValue) === 0 + return (