diff --git a/src/components/Cashout/Components/Initial.view.tsx b/src/components/Cashout/Components/Initial.view.tsx index b662b543c..a0bcbdbdc 100644 --- a/src/components/Cashout/Components/Initial.view.tsx +++ b/src/components/Cashout/Components/Initial.view.tsx @@ -62,12 +62,6 @@ export const InitialCashoutView = ({ inputDenomination === 'TOKEN' ? tokenValue : usdValue ) - useEffect(() => { - if (!_tokenValue) { - _setTokenValue('0') - } - }, []) - const { prepareCreateLinkWrapper } = useCreateLink() const { isConnected } = useAccount() @@ -402,7 +396,8 @@ export const InitialCashoutView = ({ if (!isConnected) handleConnectWallet() else handleOnNext() }} - disabled={isDisabled} + // Only allow the user to proceed if they are connected and the form is valid + disabled={isConnected && isDisabled} > {!isConnected ? ( 'Connect Wallet' diff --git a/src/components/Create/Components/RecentRecipients.tsx b/src/components/Create/Components/RecentRecipients.tsx new file mode 100644 index 000000000..86e75a1eb --- /dev/null +++ b/src/components/Create/Components/RecentRecipients.tsx @@ -0,0 +1,63 @@ +import Icon from '@/components/Global/Icon' +import * as utils from '@/utils' + +type RecentRecipientsProps = { + recentRecipients: { address: string; count: number }[] + isLoading: boolean + onClick: (address: string) => void +} + +const RecentRecipients = ({ recentRecipients, onClick, isLoading }: RecentRecipientsProps) => { + if (isLoading) { + return ( +
+ + {[0, 1, 2].map((idx) => ( +
+
+
+
+ +
+
+
+
+
+ ))} +
+ ) + } + + return ( + recentRecipients.length > 0 && ( +
+ + {recentRecipients.map((recipient) => ( +
onClick(recipient.address)} + > +
+
+
+ +
+
{utils.shortenAddressLong(recipient.address, 6)}
+
+ +
+
+ ))} +
+ ) + ) +} + +export default RecentRecipients diff --git a/src/components/Create/Link/Initial.view.tsx b/src/components/Create/Link/Initial.view.tsx index a89bcc63a..ae7a80be7 100644 --- a/src/components/Create/Link/Initial.view.tsx +++ b/src/components/Create/Link/Initial.view.tsx @@ -195,7 +195,7 @@ export const CreateLinkInitialView = ({ }} />
- {inputValue.length > 0 ? ( + {inputValue.length > 0 && (
}
- ) : ( - isConnected && - (recentRecipients.length > 0 ? ( -
- - {recentRecipients.map((recipient) => ( -
{ - handleOnNext(recipient.address) - }} - > -
-
-
- -
-
{utils.printableAddress(recipient.address)}
-
- -
-
- ))} -
- ) : ( -
- - {[0, 1, 2].map((idx) => ( -
-
-
-
- -
-
-
-
-
- ))} -
- )) )} {errorState.showError && ( <> diff --git a/src/components/Profile/Components/MobileTableComponent.tsx b/src/components/Profile/Components/MobileTableComponent.tsx index 6651c8d73..d9832fc8c 100644 --- a/src/components/Profile/Components/MobileTableComponent.tsx +++ b/src/components/Profile/Components/MobileTableComponent.tsx @@ -96,7 +96,7 @@ export const MobileTableComponent = ({ {type === 'history' ? ( <> {dashboardItem?.type !== 'Link Received' && - dashboardItem?.type === 'Request Link' && + dashboardItem?.type !== 'Request Link' && dashboardItem?.status === 'pending' && (
{