From 9bd4216db6c7bcce1933005d228791099065bfe7 Mon Sep 17 00:00:00 2001 From: kushagrasarathe <76868364+kushagrasarathe@users.noreply.github.com> Date: Wed, 15 Jan 2025 00:51:53 +0530 Subject: [PATCH 1/7] fix: claim flow + ui fixes --- src/app/(mobile-ui)/home/page.tsx | 7 +-- src/app/(mobile-ui)/layout.tsx | 6 +-- src/components/0_Bruddle/PageContainer.tsx | 13 +++--- .../Cashout/Components/Initial.view.tsx | 14 +++--- .../Cashout/Components/RecipientInfo.comp.tsx | 1 - .../Claim/Generic/AlreadyClaimed.view.tsx | 12 ++--- src/components/Claim/Link/Initial.view.tsx | 44 +++++++++---------- .../Claim/Link/Onchain/Success.view.tsx | 14 +++--- src/components/Create/Link/Confirm.view.tsx | 25 ++++++----- src/components/Create/Link/Input.view.tsx | 5 ++- src/components/Create/Link/Success.view.tsx | 6 +-- src/components/Global/CopyField/index.tsx | 6 +-- .../Global/PaymentsFooter/index.tsx | 4 +- .../Global/ValidatedInput/index.tsx | 13 ++++-- src/components/Offramp/Success.view.tsx | 10 ++--- src/components/Request/Create/Create.tsx | 10 ++--- .../Request/Create/Views/Initial.view.tsx | 26 +++++------ .../Request/Create/Views/Success.view.tsx | 12 ++--- .../Views/GeneralViews/AlreadyPaid.view.tsx | 10 ++--- .../Request/Pay/Views/Initial.view.tsx | 2 +- .../Request/Pay/Views/Success.view.tsx | 6 +-- 21 files changed, 125 insertions(+), 121 deletions(-) diff --git a/src/app/(mobile-ui)/home/page.tsx b/src/app/(mobile-ui)/home/page.tsx index 198adbcd8..f95e0e8a1 100644 --- a/src/app/(mobile-ui)/home/page.tsx +++ b/src/app/(mobile-ui)/home/page.tsx @@ -8,7 +8,6 @@ import ProfileSection from '@/components/Profile/Components/ProfileSection' import { useAuth } from '@/context/authContext' import { useWallet } from '@/context/walletContext' import { useZeroDev } from '@/context/walletContext/zeroDevContext.context' -import { WalletProviderType } from '@/interfaces' import { getUserPreferences, updateUserPreferences } from '@/utils' import classNames from 'classnames' import { motion, useAnimation } from 'framer-motion' @@ -60,11 +59,7 @@ export default function Home() { const handleCardClick = (index: number) => { if (index < wallets.length) { if (selectedWalletIndex === index) { - if (selectedWallet?.walletProviderType === WalletProviderType.PEANUT) { - router.push('/profile') - } else { - router.push('/wallet') - } + router.push('/wallet') } else { setSelectedWallet(wallets[index]) } diff --git a/src/app/(mobile-ui)/layout.tsx b/src/app/(mobile-ui)/layout.tsx index 16e57aac7..7c1708e4c 100644 --- a/src/app/(mobile-ui)/layout.tsx +++ b/src/app/(mobile-ui)/layout.tsx @@ -70,8 +70,8 @@ const Layout = ({ children }: { children: React.ReactNode }) => { > Sign In - - Don't have a penanut wallet? Get one now. + + Don't have a peanut wallet? Get one now.
@@ -79,7 +79,7 @@ const Layout = ({ children }: { children: React.ReactNode }) => {
- - + {createType == 'link' ? 'Text Tokens' : createType == 'direct' ? `Send to ${recipient.name?.endsWith('.eth') ? recipient.name : printableAddress(recipient.address ?? '')}` : `Send to ${recipient.name}`} - + {createType === 'link' && 'Make a payment with the link. Send the link to the recipient. They will be able to claim the funds in any token on any chain from the link.'} {createType === 'email_link' && @@ -254,14 +257,16 @@ export const CreateLinkConfirmView = ({ - +
+ +
{attachmentOptions.fileUrl && ( diff --git a/src/components/Create/Link/Input.view.tsx b/src/components/Create/Link/Input.view.tsx index 8ba37d039..12aec144e 100644 --- a/src/components/Create/Link/Input.view.tsx +++ b/src/components/Create/Link/Input.view.tsx @@ -309,7 +309,10 @@ export const CreateLinkInputView = ({ return ( - + {' '} {createType === 'link' ? 'Text Tokens' diff --git a/src/components/Create/Link/Success.view.tsx b/src/components/Create/Link/Success.view.tsx index 9295a81a8..cd972a8e7 100644 --- a/src/components/Create/Link/Success.view.tsx +++ b/src/components/Create/Link/Success.view.tsx @@ -80,7 +80,7 @@ export const CreateLinkSuccessView = ({ link, txHash, createType, recipient, tok Yay! - + {link && } {createType === 'direct' ? `You have successfully sent the funds to ${recipient.name?.endsWith('.eth') ? recipient.name : printableAddress(recipient.address ?? '')}.` @@ -111,10 +111,10 @@ export const CreateLinkSuccessView = ({ link, txHash, createType, recipient, tok or )} -
+
-
+
-
diff --git a/src/components/Request/Create/Views/Success.view.tsx b/src/components/Request/Create/Views/Success.view.tsx index 69002ac1b..0179dd5e7 100644 --- a/src/components/Request/Create/Views/Success.view.tsx +++ b/src/components/Request/Create/Views/Success.view.tsx @@ -1,9 +1,9 @@ -import QRCodeWrapper from '@/components/Global/QRCodeWrapper' -import * as _consts from '../Create.consts' +import { Button, Card } from '@/components/0_Bruddle' import CopyField from '@/components/Global/CopyField' -import Link from 'next/link' import Icon from '@/components/Global/Icon' -import { Button, Card } from '@/components/0_Bruddle' +import QRCodeWrapper from '@/components/Global/QRCodeWrapper' +import Link from 'next/link' +import * as _consts from '../Create.consts' export const SuccessView = ({ link }: _consts.ICreateScreenProps) => { return ( @@ -13,12 +13,12 @@ export const SuccessView = ({ link }: _consts.ICreateScreenProps) => { -
)} -
{tokenSupportsXChain ? ( -
- -
+ +
{utils.shortenAddressLong(transactionHash ?? '')} @@ -139,7 +139,7 @@ export const SuccessView = ({ transactionHash, requestLinkData, tokenPriceData } )}
-
Date: Wed, 15 Jan 2025 19:22:09 +0530 Subject: [PATCH 2/7] fix: more ui fixes + add wallet header component on screens --- .../Cashout/Components/Initial.view.tsx | 384 ++++++------ src/components/Claim/Link/Initial.view.tsx | 456 +++++++------- .../Claim/Link/Onchain/Confirm.view.tsx | 226 +++---- .../Claim/Link/Onchain/Success.view.tsx | 10 +- src/components/Create/Link/Confirm.view.tsx | 227 +++---- src/components/Create/Link/Input.view.tsx | 217 +++---- src/components/Create/Link/Success.view.tsx | 2 +- src/components/Global/FlowHeader/index.tsx | 24 + src/components/Global/WalletHeader/index.tsx | 16 +- src/components/Home/WalletCard.tsx | 2 + src/components/Offramp/Confirm.view.tsx | 559 +++++++++--------- src/components/Offramp/Success.view.tsx | 2 +- .../Request/Create/Views/Initial.view.tsx | 5 +- .../Request/Create/Views/Success.view.tsx | 2 +- .../Request/Pay/Views/Initial.view.tsx | 245 ++++---- .../Request/Pay/Views/Success.view.tsx | 12 +- 16 files changed, 1232 insertions(+), 1157 deletions(-) create mode 100644 src/components/Global/FlowHeader/index.tsx diff --git a/src/components/Cashout/Components/Initial.view.tsx b/src/components/Cashout/Components/Initial.view.tsx index 5bb6206ba..f02d88378 100644 --- a/src/components/Cashout/Components/Initial.view.tsx +++ b/src/components/Cashout/Components/Initial.view.tsx @@ -4,6 +4,7 @@ import * as assets from '@/assets' import { Button, Card } from '@/components/0_Bruddle' import { useToast } from '@/components/0_Bruddle/Toast' import { useCreateLink } from '@/components/Create/useCreateLink' +import FlowHeader from '@/components/Global/FlowHeader' import Icon from '@/components/Global/Icon' import TokenAmountInput from '@/components/Global/TokenAmountInput' import TokenSelector from '@/components/Global/TokenSelector/TokenSelector' @@ -256,202 +257,207 @@ export const InitialCashoutView = ({ } return ( - - - Cash Out - - Cash out your crypto to your bank account. Works best with popular stablecoins and other commonly - traded tokens. - -
- -
-
- - { - if (!isConnected) signInModal.open() - else handleOnNext() - }} - /> - {isBelowMinLimit && ( -
- - Minimum amount is ${MIN_CASHOUT_LIMIT} +
+ + + + Cash Out + + Cash out your crypto to your bank account. Works best with popular stablecoins and other + commonly traded tokens. + +
+
- )} - {isExternalWallet && ( - <> - - {selectedWallet!.balances!.length === 0 && ( -
{ - web3modalOpen() - }} - className="cursor-pointer text-h9 underline" - > - ( Buy Tokens ) -
- )} - - )} -
- -
- {!user && isFetchingUser ? ( -
-
- logo - Loading... + + + { + if (!isConnected) signInModal.open() + else handleOnNext() + }} + /> + {isBelowMinLimit && ( +
+ + Minimum amount is ${MIN_CASHOUT_LIMIT} +
+ )} + {isExternalWallet && ( + <> + + {selectedWallet!.balances!.length === 0 && ( +
{ + web3modalOpen() + }} + className="cursor-pointer text-h9 underline" + > + ( Buy Tokens )
-
- ) : user ? ( - <> - {!!user.accounts.filter( - (account) => account.account_type === 'iban' || account.account_type === 'us' - ).length && ( -
- - {user.accounts - .filter( - (account) => - account.account_type === 'iban' || account.account_type === 'us' - ) - ?.map((account, index) => ( -
handleBankAccountSelect(account.account_identifier)} - > -
- - -
-
- {sanitizeBankAccount(bankAccountNumber) === - sanitizeBankAccount(account.account_identifier) && ( - + )} + + )} +
+ +
+ {!user && isFetchingUser ? ( +
+
+ logo + Loading... +
+
+ ) : user ? ( + <> + {!!user.accounts.filter( + (account) => account.account_type === 'iban' || account.account_type === 'us' + ).length && ( +
+ + {user.accounts + .filter( + (account) => + account.account_type === 'iban' || account.account_type === 'us' + ) + ?.map((account, index) => ( +
+ handleBankAccountSelect(account.account_identifier) + } + > +
+ + +
+
+ {sanitizeBankAccount(bankAccountNumber) === + sanitizeBankAccount(account.account_identifier) && ( + + )} +
-
- ))} -
- )} - - ) : null} -
- - { - // Store lowercase internally - setBankAccountNumber(value.toLowerCase()) - setIsValidBankAccountNumber(isValid) - setIsValidatingBankAccountNumber(isChanging) - if (!isChanging && value && !isValid) { - setErrorState({ - showError: true, - errorMessage: - 'Invalid Bank account. If this is a US bank account, please enter it without the routing number.', - }) - } else { - setErrorState({ - showError: false, - errorMessage: '', - }) - } - }} - autoComplete="on" - name="bank-account" - formatDisplayValue={(value) => formatBankAccountDisplay(value, 'iban')} - /> + ))} +
+ )} + + ) : null} +
+ + { + // Store lowercase internally + setBankAccountNumber(value.toLowerCase()) + setIsValidBankAccountNumber(isValid) + setIsValidatingBankAccountNumber(isChanging) + if (!isChanging && value && !isValid) { + setErrorState({ + showError: true, + errorMessage: + 'Invalid Bank account. If this is a US bank account, please enter it without the routing number.', + }) + } else { + setErrorState({ + showError: false, + errorMessage: '', + }) + } + }} + autoComplete="on" + name="bank-account" + formatDisplayValue={(value) => formatBankAccountDisplay(value, 'iban')} + /> +
-
- - {errorState.showError && ( -
- -
- )} - {isBelowMinLimit && ( - - Minimum cashout amount is ${MIN_CASHOUT_LIMIT}. - - )} - {isExceedingMaxLimit && ( - - Maximum cashout amount is $ - {MAX_CASHOUT_LIMIT.toLocaleString()}. - - )} - {!xchainAllowed && ( - - You cannot cashout on this chain. - - )} - - + }} + loading={isLoading} + // Only allow the user to proceed if they are connected and the form is valid + disabled={isConnected && isDisabled} + > + {!isConnected && !isPeanutWallet ? 'Connect Wallet' : isLoading ? loadingState : 'Proceed'} + + {errorState.showError && ( +
+ +
+ )} + {isBelowMinLimit && ( + + Minimum cashout amount is ${MIN_CASHOUT_LIMIT}. + + )} + {isExceedingMaxLimit && ( + + Maximum cashout amount is $ + {MAX_CASHOUT_LIMIT.toLocaleString()}. + + )} + {!xchainAllowed && ( + + You cannot cashout on this chain. + + )} + + +
) } diff --git a/src/components/Claim/Link/Initial.view.tsx b/src/components/Claim/Link/Initial.view.tsx index 6af2132c8..24450feff 100644 --- a/src/components/Claim/Link/Initial.view.tsx +++ b/src/components/Claim/Link/Initial.view.tsx @@ -3,6 +3,7 @@ import { Button, Card } from '@/components/0_Bruddle' import { CrispButton } from '@/components/CrispChat' import AddressLink from '@/components/Global/AddressLink' +import FlowHeader from '@/components/Global/FlowHeader' import GeneralRecipientInput, { GeneralRecipientUpdate } from '@/components/Global/GeneralRecipientInput' import Icon from '@/components/Global/Icon' import MoreInfo from '@/components/Global/MoreInfo' @@ -407,140 +408,146 @@ export const InitialClaimLinkView = ({ }, [isPeanutWallet, address]) return ( - - - -
- sent you - {tokenPrice ? ( - - ) : ( - +
+ + + + +
+ sent you + {tokenPrice ? ( + + ) : ( + + )} +
+
+ + {(attachment.message || attachment.attachmentUrl) && ( + <> +
+
+ )} -
- - - {(attachment.message || attachment.attachmentUrl) && ( - <> -
-
- + + + + {isExternalWallet && recipientType !== 'iban' && recipientType !== 'us' && ( + { + resetSelectedToken() + }} + /> )} - - - - {recipientType !== 'iban' && recipientType !== 'us' && ( - { - resetSelectedToken() - }} - /> - )} - { - setRecipient(update.recipient) - if (!update.recipient.address) { - setRecipientType('address') - } else { - setRecipientType(update.type) - } - setIsValidRecipient(update.isValid) - setErrorState({ - showError: !update.isValid, - errorMessage: update.errorMessage, - }) - setInputChanging(update.isChanging) - }} - infoText={TOOLTIPS.CLAIM_RECIPIENT_INFO} - /> - {recipient && isValidRecipient && recipientType !== 'iban' && recipientType !== 'us' && ( -
- {selectedRoute && ( -
-
- - -
- - {isXchainLoading ? ( -
- ) : ( - selectedRoute && ( - <> - { - consts.supportedPeanutChains.find( - (chain) => - chain.chainId === selectedRoute.route.params.fromChain - )?.name - } - {' '} - { - supportedSquidChainsAndTokens[selectedRoute.route.params.toChain] - ?.axelarChainName - } - { + setRecipient(update.recipient) + if (!update.recipient.address) { + setRecipientType('address') + } else { + setRecipientType(update.type) + } + setIsValidRecipient(update.isValid) + setErrorState({ + showError: !update.isValid, + errorMessage: update.errorMessage, + }) + setInputChanging(update.isChanging) + }} + infoText={TOOLTIPS.CLAIM_RECIPIENT_INFO} + /> + )} + {recipient && isValidRecipient && recipientType !== 'iban' && recipientType !== 'us' && ( +
+ {selectedRoute && ( +
+
+ + +
+ + {isXchainLoading ? ( +
+ ) : ( + selectedRoute && ( + <> + { consts.supportedPeanutChains.find( (chain) => chain.chainId === selectedRoute.route.params.fromChain )?.name - } to ${selectedRoute.route.estimate.toToken.symbol.toLowerCase()} on ${ + } + {' '} + { supportedSquidChainsAndTokens[ selectedRoute.route.params.toChain ]?.axelarChainName - }.`} - /> - - ) + } + + chain.chainId === + selectedRoute.route.params.fromChain + )?.name + } to ${selectedRoute.route.estimate.toToken.symbol.toLowerCase()} on ${ + supportedSquidChainsAndTokens[ + selectedRoute.route.params.toChain + ]?.axelarChainName + }.`} + /> + + ) + )} +
+
+ )} + +
+
+ + +
+ + {isXchainLoading ? ( +
+ ) : ( + <> + $0.00 + )}
- )} - -
-
- - -
- - {isXchainLoading ? ( -
- ) : ( - <> - $0.00 - - )} -
-
- {/* TODO: correct points estimation + {/* TODO: correct points estimation
@@ -583,112 +590,113 @@ export const InitialClaimLinkView = ({
*/} -
- )} -
-
+ )} +
+ - {address && recipient.address.length < 0 && recipientType === 'address' && ( -
{ - handleConnectWallet() }} + loading={isLoading || isXchainLoading} + disabled={ + isLoading || + isXchainLoading || + inputChanging || + (hasFetchedRoute && !selectedRoute) || + (isValidRecipient === false && recipient.address.length > 0) + } > - {isConnected ? 'Or claim/swap to your connected wallet' : 'Connect a wallet'} -
- )} - {errorState.showError && ( -
- {errorState.errorMessage === 'offramp unavailable' ? ( - - ) : ( - <> - {errorState.errorMessage === 'No route found for the given token pair.' && ( - <> + {!isConnected && recipient.address.length === 0 + ? 'Connect Wallet' + : (hasFetchedRoute && selectedRoute) || recipient.address !== address + ? 'Proceed' + : 'Claim now'} + + {address && recipient.address.length < 0 && recipientType === 'address' && ( +
{ + handleConnectWallet() + }} + > + {isConnected ? 'Or claim/swap to your connected wallet' : 'Connect a wallet'} +
+ )} + {errorState.showError && ( +
+ {errorState.errorMessage === 'offramp unavailable' ? ( + + ) : ( + <> + {errorState.errorMessage === 'No route found for the given token pair.' && ( + <> + {' '} + {!isPeanutWallet && ( + { + setSelectedRoute(null) + setHasFetchedRoute(false) + setErrorState({ + showError: false, + errorMessage: '', + }) + resetSelectedToken() + }} + > + reset + + )} + + )} + {errorState.errorMessage === 'offramp_lt_minimum' && ( {' '} - {!isPeanutWallet && ( - { - setSelectedRoute(null) - setHasFetchedRoute(false) - setErrorState({ - showError: false, - errorMessage: '', - }) - resetSelectedToken() - }} - > - reset - - )} - - )} - {errorState.errorMessage === 'offramp_lt_minimum' && ( - - )} - {errorState.errorMessage === 'offramp_mt_maximum' && ( - - )} - {![ - 'offramp_lt_minimum', - 'offramp_mt_maximum', - 'No route found for the given token pair.', - ].includes(errorState.errorMessage) && ( - - )} - - )} -
- )} -
{' '} - - - + You can not claim links with less than ${MIN_CASHOUT_LIMIT} to your bank + account. + + )} + {errorState.errorMessage === 'offramp_mt_maximum' && ( + + )} + {![ + 'offramp_lt_minimum', + 'offramp_mt_maximum', + 'No route found for the given token pair.', + ].includes(errorState.errorMessage) && ( + + )} + + )} +
+ )} +
{' '} + + + +
) } diff --git a/src/components/Claim/Link/Onchain/Confirm.view.tsx b/src/components/Claim/Link/Onchain/Confirm.view.tsx index 4d3e724c3..6decd864c 100644 --- a/src/components/Claim/Link/Onchain/Confirm.view.tsx +++ b/src/components/Claim/Link/Onchain/Confirm.view.tsx @@ -1,6 +1,7 @@ 'use client' import { Button, Card } from '@/components/0_Bruddle' import AddressLink from '@/components/Global/AddressLink' +import FlowHeader from '@/components/Global/FlowHeader' import Icon from '@/components/Global/Icon' import MoreInfo from '@/components/Global/MoreInfo' import * as consts from '@/constants' @@ -110,115 +111,121 @@ export const ConfirmClaimLinkView = ({ // }, [attachment?.attachmentUrl]) return ( - - - - sent you - - - - - {(attachment.message || attachment.attachmentUrl) && ( - <> -
- {attachment.message && } - {attachment.attachmentUrl && utils.checkifImageType(fileType) ? ( - attachment - ) : ( - - - Download attachment - - )} +
+ + + + +
sent you{' '} + +
+
+ + {(attachment.message || attachment.attachmentUrl) && ( + <> +
+ {attachment.message && } + {attachment.attachmentUrl && utils.checkifImageType(fileType) ? ( + attachment + ) : ( + + + Download attachment + + )} +
+
+ + )} + {selectedRoute ? ( +
+ You are claiming{' '} + {utils.formatTokenAmount( + utils.formatAmountWithDecimals({ + amount: selectedRoute.route.estimate.toAmountMin, + decimals: selectedRoute.route.estimate.toToken.decimals, + }) + )}{' '} + {selectedRoute.route.estimate.toToken.symbol} on{' '} + {supportedSquidChainsAndTokens[selectedRoute.route.params.toChain]?.axelarChainName}
-
- - )} - {selectedRoute ? ( -
- You are claiming{' '} - {utils.formatTokenAmount( - utils.formatAmountWithDecimals({ - amount: selectedRoute.route.estimate.toAmountMin, - decimals: selectedRoute.route.estimate.toToken.decimals, - }) - )}{' '} - {selectedRoute.route.estimate.toToken.symbol} on{' '} - {supportedSquidChainsAndTokens[selectedRoute.route.params.toChain]?.axelarChainName} -
- ) : ( -
- {utils.formatTokenAmount(Number(claimLinkData.tokenAmount))} {claimLinkData.tokenSymbol} on{' '} - {consts.supportedPeanutChains.find((chain) => chain.chainId === claimLinkData.chainId)?.name} + ) : ( +
+ {utils.formatTokenAmount(Number(claimLinkData.tokenAmount))} {claimLinkData.tokenSymbol} on{' '} + { + consts.supportedPeanutChains.find((chain) => chain.chainId === claimLinkData.chainId) + ?.name + } +
+ )} +
+ + + + {recipient.name && } +
- )} -
- - - - {recipient.name && } - -
-
- {selectedRoute && ( -
-
- - -
- - {selectedRoute && ( - <> - { - consts.supportedPeanutChains.find( - (chain) => chain.chainId === selectedRoute.route.params.fromChain - )?.name - } - {' '} - { - supportedSquidChainsAndTokens[selectedRoute.route.params.toChain] - ?.axelarChainName - } - + {selectedRoute && ( +
+
+ + +
+ + {selectedRoute && ( + <> + { consts.supportedPeanutChains.find( (chain) => chain.chainId === selectedRoute.route.params.fromChain )?.name - } to ${selectedRoute.route.estimate.toToken.symbol.toLowerCase()} on ${ + } + {' '} + { supportedSquidChainsAndTokens[selectedRoute.route.params.toChain] ?.axelarChainName - }.`} - /> - - )} - -
- )} + } + + chain.chainId === selectedRoute.route.params.fromChain + )?.name + } to ${selectedRoute.route.estimate.toToken.symbol.toLowerCase()} on ${ + supportedSquidChainsAndTokens[selectedRoute.route.params.toChain] + ?.axelarChainName + }.`} + /> + + )} +
+
+ )} -
-
- - +
+
+ + +
+ + $0.00 +
- - $0.00 - -
- {/* TODO: correct points estimation + {/* TODO: correct points estimation
@@ -238,22 +245,19 @@ export const ConfirmClaimLinkView = ({
*/} -
+ - -
- {errorState.showError && ( -
- -
- )} -
- - + {errorState.showError && ( +
+ +
+ )} +
+ + +
) } diff --git a/src/components/Claim/Link/Onchain/Success.view.tsx b/src/components/Claim/Link/Onchain/Success.view.tsx index 62e180d76..d81161595 100644 --- a/src/components/Claim/Link/Onchain/Success.view.tsx +++ b/src/components/Claim/Link/Onchain/Success.view.tsx @@ -61,27 +61,27 @@ export const SuccessClaimLinkView = ({ transactionHash, claimLinkData, type }: _ return ( - Yay! - You have successfully claimed your funds! + Yay! + You have successfully claimed your funds! {type === 'claimxchain' && (
-
+
{utils.shortenAddressLong(transactionHash ?? '')}
-
+
{utils.shortenAddressLong(transactionHash ?? '')}
-
+
{!explorerUrlDestChainWithTxHash ? (
diff --git a/src/components/Create/Link/Confirm.view.tsx b/src/components/Create/Link/Confirm.view.tsx index efd06f4a1..c434784b8 100644 --- a/src/components/Create/Link/Confirm.view.tsx +++ b/src/components/Create/Link/Confirm.view.tsx @@ -4,6 +4,7 @@ import { useContext, useMemo, useState } from 'react' import { Button, Card } from '@/components/0_Bruddle' import Divider from '@/components/0_Bruddle/Divider' import ConfirmDetails from '@/components/Global/ConfirmDetails/Index' +import FlowHeader from '@/components/Global/FlowHeader' import Icon from '@/components/Global/Icon' import MoreInfo from '@/components/Global/MoreInfo' import { peanutTokenDetails, supportedPeanutChains } from '@/constants' @@ -233,103 +234,106 @@ export const CreateLinkConfirmView = ({ } return ( - - - - {createType == 'link' - ? 'Text Tokens' - : createType == 'direct' - ? `Send to ${recipient.name?.endsWith('.eth') ? recipient.name : printableAddress(recipient.address ?? '')}` - : `Send to ${recipient.name}`} - - - {createType === 'link' && - 'Make a payment with the link. Send the link to the recipient. They will be able to claim the funds in any token on any chain from the link.'} - {createType === 'email_link' && - `You will send an email to ${recipient.name ?? recipient.address} containing a link. They will be able to claim the funds in any token on any chain from the link.`} - {createType === 'sms_link' && - `You will send a text message to ${recipient.name ?? recipient.address} containing a link. They will be able to claim the funds in any token on any chain from the link.`} - {createType === 'direct' && - `You will send the tokens directly to ${recipient.name ?? recipient.address}. Ensure the recipient address is correct, else the funds might be lost.`} - - - -
- -
+ <> + -
- {attachmentOptions.fileUrl && ( -
-
- - -
- - - -
- )} - {attachmentOptions.message && ( -
-
{ - setShowMessage(!showMessage) - }} - > + + + + {createType == 'link' + ? 'Text Tokens' + : createType == 'direct' + ? `Send to ${recipient.name?.endsWith('.eth') ? recipient.name : printableAddress(recipient.address ?? '')}` + : `Send to ${recipient.name}`} + + + {createType === 'link' && + 'Make a payment with the link. Send the link to the recipient. They will be able to claim the funds in any token on any chain from the link.'} + {createType === 'email_link' && + `You will send an email to ${recipient.name ?? recipient.address} containing a link. They will be able to claim the funds in any token on any chain from the link.`} + {createType === 'sms_link' && + `You will send a text message to ${recipient.name ?? recipient.address} containing a link. They will be able to claim the funds in any token on any chain from the link.`} + {createType === 'direct' && + `You will send the tokens directly to ${recipient.name ?? recipient.address}. Ensure the recipient address is correct, else the funds might be lost.`} + + + +
+ +
+ +
+ {attachmentOptions.fileUrl && ( +
- - + +
- + + +
- {showMessage && ( -
- + )} + {attachmentOptions.message && ( +
+
{ + setShowMessage(!showMessage) + }} + > +
+ + +
+
- )} -
- )} - {transactionCostUSD !== undefined && ( -
-
- - + {showMessage && ( +
+ +
+ )}
- -
- )} -
- {/*
+ )} + {transactionCostUSD !== undefined && ( +
+
+ + +
+ +
+ )} +
+ {/*
@@ -349,26 +353,27 @@ export const CreateLinkConfirmView = ({ />
*/} - -
- - -
- {errorState.showError && ( -
- + +
+
- )} - {!crossChainDetails.find((chain: any) => chain.chainId.toString() === selectedChainID.toString()) && ( - - This chain does not support cross-chain claiming. - - )} - - + {errorState.showError && ( +
+ +
+ )} + {!crossChainDetails.find( + (chain: any) => chain.chainId.toString() === selectedChainID.toString() + ) && ( + + This chain does not support cross-chain + claiming. + + )} + + + ) } diff --git a/src/components/Create/Link/Input.view.tsx b/src/components/Create/Link/Input.view.tsx index 12aec144e..f70eb7c8f 100644 --- a/src/components/Create/Link/Input.view.tsx +++ b/src/components/Create/Link/Input.view.tsx @@ -9,6 +9,7 @@ import { useCreateLink } from '../useCreateLink' import { Button, Card } from '@/components/0_Bruddle' import { useToast } from '@/components/0_Bruddle/Toast' import FileUploadInput from '@/components/Global/FileUploadInput' +import FlowHeader from '@/components/Global/FlowHeader' import Icon from '@/components/Global/Icon' import MoreInfo from '@/components/Global/MoreInfo' import { PEANUT_WALLET_CHAIN, PEANUT_WALLET_TOKEN } from '@/constants' @@ -307,116 +308,122 @@ export const CreateLinkInputView = ({ }, [isPeanutWallet]) return ( - - - - {' '} - {createType === 'link' - ? 'Text Tokens' - : createType === 'direct' - ? `Send to ${recipient.name?.endsWith('.eth') ? recipient.name : printableAddress(recipient.address ?? '')}` - : `Send to ${recipient.name}`} - - - {createType === 'link' && - 'Deposit some crypto to the link, no need for wallet addresses. Send the link to the recipient. They will be able to claim the funds in any token on any chain from the link.'} - {createType === 'email_link' && - `You will send an email to ${recipient.name ?? recipient.address} containing a link. They will be able to claim the funds in any token on any chain from the link.`} - {createType === 'sms_link' && - `You will send a text message to ${recipient.name ?? recipient.address} containing a link. They will be able to claim the funds in any token on any chain from the link.`} - {createType === 'direct' && - `You will do a direct blockchain transaction to ${recipient.name ?? recipient.address}. Ensure the recipient address is correct, else the funds might be lost.`} - - - -
- { - if (!isConnected) signInModal.open() - else handleOnNext() - }} - /> - {isExternalWallet && ( - <> - - {selectedWallet!.balances!.length === 0 && ( -
{ - open() - }} - className="cursor-pointer text-h9 underline" - > - ( Buy Tokens ) -
- )} - - )} - {(createType === 'link' || createType === 'email_link' || createType === 'sms_link') && ( - + + + + + {' '} + {createType === 'link' + ? 'Text Tokens' + : createType === 'direct' + ? `Send to ${recipient.name?.endsWith('.eth') ? recipient.name : printableAddress(recipient.address ?? '')}` + : `Send to ${recipient.name}`} + + + {createType === 'link' && + 'Deposit some crypto to the link, no need for wallet addresses. Send the link to the recipient. They will be able to claim the funds in any token on any chain from the link.'} + {createType === 'email_link' && + `You will send an email to ${recipient.name ?? recipient.address} containing a link. They will be able to claim the funds in any token on any chain from the link.`} + {createType === 'sms_link' && + `You will send a text message to ${recipient.name ?? recipient.address} containing a link. They will be able to claim the funds in any token on any chain from the link.`} + {createType === 'direct' && + `You will do a direct blockchain transaction to ${recipient.name ?? recipient.address}. Ensure the recipient address is correct, else the funds might be lost.`} + + + +
+ { + if (!isConnected) signInModal.open() + else handleOnNext() + }} /> - )} -
-
-
+
+ - + {/* -
- {errorState.showError && ( -
- + */}
- )} - {!crossChainDetails.find((chain: any) => chain.chainId.toString() === selectedChainID.toString()) && ( - - This chain does not support cross-chain claiming. - - )} + {errorState.showError && ( +
+ +
+ )} + {!crossChainDetails.find( + (chain: any) => chain.chainId.toString() === selectedChainID.toString() + ) && ( + + This chain does not support cross-chain + claiming. + + )} - - Learn about peanut cashout - - -
-
+ + Learn about peanut cashout + + + + + ) } diff --git a/src/components/Create/Link/Success.view.tsx b/src/components/Create/Link/Success.view.tsx index cd972a8e7..a6ce0bc48 100644 --- a/src/components/Create/Link/Success.view.tsx +++ b/src/components/Create/Link/Success.view.tsx @@ -78,7 +78,7 @@ export const CreateLinkSuccessView = ({ link, txHash, createType, recipient, tok return ( - Yay! + Yay! {link && } diff --git a/src/components/Global/FlowHeader/index.tsx b/src/components/Global/FlowHeader/index.tsx new file mode 100644 index 000000000..6188021b4 --- /dev/null +++ b/src/components/Global/FlowHeader/index.tsx @@ -0,0 +1,24 @@ +import { Button } from '@/components/0_Bruddle' +import Icon from '../Icon' +import WalletHeader from '../WalletHeader' + +interface FlowHeaderProps { + onPrev?: () => void + disableBackBtn?: boolean + disableWalletHeader?: boolean +} + +const FlowHeader = ({ onPrev, disableBackBtn, disableWalletHeader = false }: FlowHeaderProps) => { + return ( +
+ {onPrev && ( + + )} + +
+ ) +} + +export default FlowHeader diff --git a/src/components/Global/WalletHeader/index.tsx b/src/components/Global/WalletHeader/index.tsx index 3b8afeef3..db1e5f1b5 100644 --- a/src/components/Global/WalletHeader/index.tsx +++ b/src/components/Global/WalletHeader/index.tsx @@ -16,13 +16,17 @@ import CopyToClipboard from '../CopyToClipboard' import Icon from '../Icon' import Modal from '../Modal' +interface WalletHeaderProps { + className?: HTMLDivElement['className'] + disabled?: boolean +} interface WalletEntryCardProps { wallet: IWallet isActive?: boolean onClick?: () => void } -const WalletHeader = () => { +const WalletHeader = ({ className, disabled }: WalletHeaderProps) => { const [showModal, setShowModal] = useState(false) const { wallets, selectedWallet, setSelectedWallet, isConnected } = useWallet() const { open: openWeb3Modal } = useAppKit() @@ -44,15 +48,19 @@ const WalletHeader = () => { } return ( -
+
{/* wallet selector button with current wallet info */} - )} - - - {errorState.showError && ( -
- {errorState.errorMessage === 'offramp unavailable' ? ( - - ) : ( - - )} + +
)} - {showRefund && ( - - Something went wrong while trying to cashout. - Click{' '} - - here - {' '} - to reclaim the funds to your wallet. - - )} -
-
-
+ +
+ {activeStep > 3 && ( + + )} + + {errorState.showError && ( +
+ {errorState.errorMessage === 'offramp unavailable' ? ( + + ) : ( + + )} +
+ )} + {showRefund && ( + + Something went wrong while trying to + cashout. Click{' '} + + here + {' '} + to reclaim the funds to your wallet. + + )} +
+ + +
) } diff --git a/src/components/Offramp/Success.view.tsx b/src/components/Offramp/Success.view.tsx index 4642295e6..ddb7a15ca 100644 --- a/src/components/Offramp/Success.view.tsx +++ b/src/components/Offramp/Success.view.tsx @@ -45,7 +45,7 @@ export const OfframpSuccessView = ({ return ( - Yay! + Yay! Your funds are on the way. A confirmation email will be sent to {offrampForm.email} shortly. Please keep in mind that it may take up to 2 days for the funds to arrive. diff --git a/src/components/Request/Create/Views/Initial.view.tsx b/src/components/Request/Create/Views/Initial.view.tsx index 6d2e292d8..cdc20937f 100644 --- a/src/components/Request/Create/Views/Initial.view.tsx +++ b/src/components/Request/Create/Views/Initial.view.tsx @@ -167,7 +167,7 @@ export const InitialView = ({ return ( - Request a payment + Request a payment Choose the amount, token and chain. You will request a payment to your wallet. Add an invoice if you want to. @@ -232,9 +232,6 @@ export const InitialView = ({ 'Confirm' )} -
{errorState.showError && (
diff --git a/src/components/Request/Create/Views/Success.view.tsx b/src/components/Request/Create/Views/Success.view.tsx index 0179dd5e7..bb9b70409 100644 --- a/src/components/Request/Create/Views/Success.view.tsx +++ b/src/components/Request/Create/Views/Success.view.tsx @@ -9,7 +9,7 @@ export const SuccessView = ({ link }: _consts.ICreateScreenProps) => { return ( - Yay! + Yay! diff --git a/src/components/Request/Pay/Views/Initial.view.tsx b/src/components/Request/Pay/Views/Initial.view.tsx index e9faaac13..3ba94f769 100644 --- a/src/components/Request/Pay/Views/Initial.view.tsx +++ b/src/components/Request/Pay/Views/Initial.view.tsx @@ -2,6 +2,7 @@ import { Button, Card } from '@/components/0_Bruddle' import { useToast } from '@/components/0_Bruddle/Toast' import { useCreateLink } from '@/components/Create/useCreateLink' import AddressLink from '@/components/Global/AddressLink' +import FlowHeader from '@/components/Global/FlowHeader' import Icon from '@/components/Global/Icon' import MoreInfo from '@/components/Global/MoreInfo' import TokenSelector from '@/components/Global/TokenSelector/TokenSelector' @@ -355,101 +356,108 @@ export const InitialView = ({ }, [resetTokenAndChain, isPeanutWallet]) return ( - - - - is requesting - - - - -
- -
-
-
- logo - chain.chainId === requestLinkData.chainId - )?.icon.url - } - className="absolute -top-1 left-3 h-4 w-4 rounded-full" // Adjust `left-3` to control the overlap - alt="logo" - /> +
+ + + + + is requesting + + + + +
+ +
+
+
+ logo + chain.chainId === requestLinkData.chainId + )?.icon.url + } + className="absolute -top-1 left-3 h-4 w-4 rounded-full" // Adjust `left-3` to control the overlap + alt="logo" + /> +
+ {formatAmountWithSignificantDigits(Number(requestLinkData.tokenAmount), 3)}{' '} + {tokenRequestedSymbol} on{' '} + { + consts.supportedPeanutChains.find( + (chain) => chain.chainId === requestLinkData.chainId + )?.name + }
- {formatAmountWithSignificantDigits(Number(requestLinkData.tokenAmount), 3)}{' '} - {tokenRequestedSymbol} on{' '} - { - consts.supportedPeanutChains.find((chain) => chain.chainId === requestLinkData.chainId) - ?.name - }
+ {tokenSupportsXChain ? ( + + ) : ( + + )}
- {tokenSupportsXChain ? ( - - ) : ( - + {isExternalWallet && tokenSupportsXChain && ( + )} -
- {isExternalWallet && tokenSupportsXChain && ( - - )} - {!isFeeEstimationError && ( - <> -
-
- - -
- -
- - {null !== calculatedSlippage && ( + {!isFeeEstimationError && ( + <>
- - + +
- )} - {/* TODO: correct points estimation + {null !== calculatedSlippage && ( +
+
+ + +
+ +
+ )} + + {/* TODO: correct points estimation
@@ -473,40 +481,41 @@ export const InitialView = ({
*/} - - )} -
- - {errorState.showError && ( -
- -
+ )} -
- - +
+ + {errorState.showError && ( +
+ +
+ )} +
+ + +
) } diff --git a/src/components/Request/Pay/Views/Success.view.tsx b/src/components/Request/Pay/Views/Success.view.tsx index acdb0745a..2c2e5277a 100644 --- a/src/components/Request/Pay/Views/Success.view.tsx +++ b/src/components/Request/Pay/Views/Success.view.tsx @@ -81,7 +81,7 @@ export const SuccessView = ({ transactionHash, requestLinkData, tokenPriceData } }, []) if (isLoading) { return ( - <> +
logo {loadingState} @@ -90,14 +90,14 @@ export const SuccessView = ({ transactionHash, requestLinkData, tokenPriceData } - +
) } return ( - + - Yay! + Yay! You have successfully paid ! @@ -117,13 +117,13 @@ export const SuccessView = ({ transactionHash, requestLinkData, tokenPriceData }
{isXChain && ( <> -
+
{utils.shortenAddressLong(transactionHash ?? '')}
-
+
{!explorerUrlDestChainWithTxHash ? (
From 4748e49ff843fc9a68627f620cec3075d236d208 Mon Sep 17 00:00:00 2001 From: kushagrasarathe <76868364+kushagrasarathe@users.noreply.github.com> Date: Wed, 15 Jan 2025 22:57:09 +0530 Subject: [PATCH 3/7] fix: claim for guests + recipient address update in input --- src/components/Claim/Link/Initial.view.tsx | 43 +++++++++++++++++----- 1 file changed, 34 insertions(+), 9 deletions(-) diff --git a/src/components/Claim/Link/Initial.view.tsx b/src/components/Claim/Link/Initial.view.tsx index 24450feff..7ceaad72e 100644 --- a/src/components/Claim/Link/Initial.view.tsx +++ b/src/components/Claim/Link/Initial.view.tsx @@ -32,7 +32,6 @@ import { } from '@/utils' import { getSquidTokenAddress, SQUID_ETH_ADDRESS } from '@/utils/token.utils' import { Popover } from '@headlessui/react' -import { useAppKit } from '@reown/appkit/react' import { getSquidRouteRaw } from '@squirrel-labs/peanut-sdk' import { useCallback, useContext, useEffect, useState } from 'react' import * as _consts from '../Claim.consts' @@ -83,8 +82,7 @@ export const InitialClaimLinkView = ({ supportedSquidChainsAndTokens, } = useContext(context.tokenSelectorContext) const { claimLink } = useClaimLink() - const { open } = useAppKit() - const { isConnected, address, signInModal, isExternalWallet, isPeanutWallet } = useWallet() + const { isConnected, address, signInModal, isExternalWallet, isPeanutWallet, selectedWallet } = useWallet() const { user } = useAuth() const resetSelectedToken = useCallback(() => { @@ -401,11 +399,38 @@ export const InitialClaimLinkView = ({ }, [recipientType]) useEffect(() => { - if (isPeanutWallet && address) { - setRecipient({ name: undefined, address: address }) - setIsValidRecipient(true) + if (!isConnected) { + setRecipient({ name: undefined, address: '' }) + setIsValidRecipient(false) + return + } + + // reset recipient when wallet type changes or when selected wallet changes + if (selectedWallet) { + // reset recipient + setRecipient({ name: undefined, address: '' }) + setIsValidRecipient(false) + + // set it to the current address after a short delay + // to ensure the ui updates properly + setTimeout(() => { + if (address) { + setRecipient({ name: undefined, address: address }) + setIsValidRecipient(true) + } + }, 100) } - }, [isPeanutWallet, address]) + }, [selectedWallet, isConnected, address]) + + useEffect(() => { + if (recipient.address) return + if (isConnected && address) { + setRecipient({ name: undefined, address }) + } else { + setRecipient({ name: undefined, address: '' }) + setIsValidRecipient(false) + } + }, [address]) return (
@@ -455,7 +480,7 @@ export const InitialClaimLinkView = ({ - {isExternalWallet && recipientType !== 'iban' && recipientType !== 'us' && ( + {(!isConnected || isExternalWallet) && recipientType !== 'iban' && recipientType !== 'us' && ( )} - {isExternalWallet && ( + {(!isConnected || isExternalWallet) && ( Date: Wed, 15 Jan 2025 23:14:06 +0530 Subject: [PATCH 4/7] fix: pnpm-locl --- pnpm-lock.yaml | 186 ++++++++++++++++++++++++------------------------- 1 file changed, 93 insertions(+), 93 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index ca483503c..5aff5ba26 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -60,7 +60,7 @@ importers: version: 9.1.0(bufferutil@4.0.9)(typescript@5.7.3)(zod@3.24.1) '@sentry/nextjs': specifier: ^8.39.0 - version: 8.48.0(@opentelemetry/core@1.30.1(@opentelemetry/api@1.9.0))(@opentelemetry/instrumentation@0.56.0(@opentelemetry/api@1.9.0))(@opentelemetry/sdk-trace-base@1.30.1(@opentelemetry/api@1.9.0))(next@14.2.23(@babel/core@7.26.0)(@opentelemetry/api@1.9.0)(babel-plugin-macros@3.1.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react@18.3.1)(webpack@5.97.1) + version: 8.50.0(@opentelemetry/core@1.30.1(@opentelemetry/api@1.9.0))(@opentelemetry/instrumentation@0.56.0(@opentelemetry/api@1.9.0))(@opentelemetry/sdk-trace-base@1.30.1(@opentelemetry/api@1.9.0))(next@14.2.23(@babel/core@7.26.0)(@opentelemetry/api@1.9.0)(babel-plugin-macros@3.1.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react@18.3.1)(webpack@5.97.1) '@serwist/next': specifier: ^9.0.10 version: 9.0.11(next@14.2.23(@babel/core@7.26.0)(@opentelemetry/api@1.9.0)(babel-plugin-macros@3.1.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(typescript@5.7.3)(webpack@5.97.1) @@ -90,7 +90,7 @@ importers: version: 0.2.3(react@18.3.1) autoprefixer: specifier: ^10.4.20 - version: 10.4.20(postcss@8.5.0) + version: 10.4.20(postcss@8.5.1) axios: specifier: ^1.7.7 version: 1.7.9 @@ -253,16 +253,16 @@ importers: version: 2.0.0 knip: specifier: ^5.37.1 - version: 5.42.0(@types/node@20.4.2)(typescript@5.7.3) + version: 5.42.1(@types/node@20.4.2)(typescript@5.7.3) ngrok: specifier: ^4.0.0 version: 4.3.3 postcss: specifier: ^8.4.49 - version: 8.5.0 + version: 8.5.1 postcss-import: specifier: ^16.1.0 - version: 16.1.0(postcss@8.5.0) + version: 16.1.0(postcss@8.5.1) prettier: specifier: ^3.3.3 version: 3.4.2 @@ -2301,28 +2301,28 @@ packages: '@scure/bip39@1.5.0': resolution: {integrity: sha512-Dop+ASYhnrwm9+HA/HwXg7j2ZqM6yk2fyLWb5znexjctFY3+E+eU8cIWI0Pql0Qx4hPZCijlGq4OL71g+Uz30A==} - '@sentry-internal/browser-utils@8.48.0': - resolution: {integrity: sha512-pLtu0Fa1Ou0v3M1OEO1MB1EONJVmXEGtoTwFRCO1RPQI2ulmkG6BikINClFG5IBpoYKZ33WkEXuM6U5xh+pdZg==} + '@sentry-internal/browser-utils@8.50.0': + resolution: {integrity: sha512-hZm6ngWTEzZhaMHpLIKB4wWp0Od1MdCZdvR5FRdIThUMLa1P8rXeolovTRfOE81NE755EiwJHzj4O7rq3EjA+A==} engines: {node: '>=14.18'} - '@sentry-internal/feedback@8.48.0': - resolution: {integrity: sha512-6PwcJNHVPg0EfZxmN+XxVOClfQpv7MBAweV8t9i5l7VFr8sM/7wPNSeU/cG7iK19Ug9ZEkBpzMOe3G4GXJ5bpw==} + '@sentry-internal/feedback@8.50.0': + resolution: {integrity: sha512-79WlvSJYCXL/D0PBC8AIT4JbyS44AE3h6lP05IESXMqzTZl3KeSqCx317rwJw1KaxzeFd/JQwkFq95jaKAcLhg==} engines: {node: '>=14.18'} - '@sentry-internal/replay-canvas@8.48.0': - resolution: {integrity: sha512-LdivLfBXXB9us1aAc6XaL7/L2Ob4vi3C/fEOXElehg3qHjX6q6pewiv5wBvVXGX1NfZTRvu+X11k6TZoxKsezw==} + '@sentry-internal/replay-canvas@8.50.0': + resolution: {integrity: sha512-Hv1bBaPpe62xFPLpuaUxVBUHd/Ed9bnGndeqN4hueeEGDT9T6NyVokgm35O5xE9/op6Yodm/3NfUkEg8oE++Aw==} engines: {node: '>=14.18'} - '@sentry-internal/replay@8.48.0': - resolution: {integrity: sha512-csILVupc5RkrsTrncuUTGmlB56FQSFjXPYWG8I8yBTGlXEJ+o8oTuF6+55R4vbw3EIzBveXWi4kEBbnQlXW/eg==} + '@sentry-internal/replay@8.50.0': + resolution: {integrity: sha512-mhRPujzO6n+mb6ZR+wQNkSpjqIqDriR0hZEvdzHQdyXu9zVdCHUJ3sINkzpT1XwiypQVCEfxB6Oh9y/NmcQfGg==} engines: {node: '>=14.18'} '@sentry/babel-plugin-component-annotate@2.22.7': resolution: {integrity: sha512-aa7XKgZMVl6l04NY+3X7BP7yvQ/s8scn8KzQfTLrGRarziTlMGrsCOBQtCNWXOPEbtxAIHpZ9dsrAn5EJSivOQ==} engines: {node: '>= 14'} - '@sentry/browser@8.48.0': - resolution: {integrity: sha512-fuuVULB5/1vI8NoIwXwR3xwhJJqk+y4RdSdajExGF7nnUDBpwUJyXsmYJnOkBO+oLeEs58xaCpotCKiPUNnE3g==} + '@sentry/browser@8.50.0': + resolution: {integrity: sha512-aGJSpuKiHVKkLvd1VklJSZ2oCsl4wcKUVxKIa8dhJC8KjDY0vREQCywrlWuS5KYP0xFy4k28pg6PPR3HKkUlNw==} engines: {node: '>=14.18'} '@sentry/bundler-plugin-core@2.22.7': @@ -2375,22 +2375,22 @@ packages: engines: {node: '>= 10'} hasBin: true - '@sentry/core@8.48.0': - resolution: {integrity: sha512-VGwYgTfLpvJ5LRO5A+qWo1gpo6SfqaGXL9TOzVgBucAdpzbrYHpZ87sEarDVq/4275uk1b0S293/mfsskFczyw==} + '@sentry/core@8.50.0': + resolution: {integrity: sha512-q71m8Ha9YGwqn4Gd7sWvcFTRgbHXxEfU4QeIFtwMBpwHfq2Q+9koiF8DOoOHqIEOsnlvZWRQgGggIOdHzajnVw==} engines: {node: '>=14.18'} - '@sentry/nextjs@8.48.0': - resolution: {integrity: sha512-eKbhUW+9KCyK2xIO09iUI3KszfCxtmKgamSYED+N5bb1DzySjDur6BabHFBgA7BcQmYKpTSj/lVxznFNw3H1uQ==} + '@sentry/nextjs@8.50.0': + resolution: {integrity: sha512-ob0MnHGHXrjL1CZvQtGg5v+eXT9dJYM7PqeCMgvHG7IZT+2dhyqqhhmASZCf0g+2P9Wei1fhan7mvqNgG+wfVg==} engines: {node: '>=14.18'} peerDependencies: next: ^13.2.0 || ^14.0 || ^15.0.0-rc.0 - '@sentry/node@8.48.0': - resolution: {integrity: sha512-pnprAuUOc8cxnJdZA09hutHXNsbQZoDgzf3zPyXMNx0ewB/RviFMOgfe7ViX1mIB/oVrcFenXBgO5uvTd7JwPg==} + '@sentry/node@8.50.0': + resolution: {integrity: sha512-I9eGIdcoWKVy4O8a1f2t0jGVTdN1z9McxbGW8aWwDE5Vd9gpuNjFh9qGapmBEPzysWBX8rjsemDdSa3TcijJMw==} engines: {node: '>=14.18'} - '@sentry/opentelemetry@8.48.0': - resolution: {integrity: sha512-1JLXgmIvD3T7xn9ypwWW0V3GirNy4BN2fOUbZau/nUX/Jj5DttSoPn7x7xTaPSpfaA24PiP93zXmJEfZvCk00Q==} + '@sentry/opentelemetry@8.50.0': + resolution: {integrity: sha512-uAZjAMPAulFHL88ThK2k+XPx2QzvZ/I7e7sP1In28Tb/yLH0mi+51AUH+zcnLELIPC86m1aDYl8uwYcP6tV4dA==} engines: {node: '>=14.18'} peerDependencies: '@opentelemetry/api': ^1.9.0 @@ -2399,14 +2399,14 @@ packages: '@opentelemetry/sdk-trace-base': ^1.29.0 '@opentelemetry/semantic-conventions': ^1.28.0 - '@sentry/react@8.48.0': - resolution: {integrity: sha512-J8XAUOJYbsjXnowTEXE+zWJWLWUzQGP8kMb+smoGdRzFJwwXKrbE709Kr/Boz6rK48EbbRT4UUINoTbHgL3RHQ==} + '@sentry/react@8.50.0': + resolution: {integrity: sha512-qkDW5dieROPDf0uk1usXib/SLZTEveN5jvKgBFd+HKWz5JNu+M7L53t9KdZ7ryn4T68utI/LWs4qR3QhmXzUbQ==} engines: {node: '>=14.18'} peerDependencies: react: ^16.14.0 || 17.x || 18.x || 19.x - '@sentry/vercel-edge@8.48.0': - resolution: {integrity: sha512-5bxMCTkadnvJvCC363ZXEdAHaWS/RAAvsI+8RAFObJO0tUemjKrgbHM/1YcvLRZSuBs6BSn9RjDipzzlFgtBWw==} + '@sentry/vercel-edge@8.50.0': + resolution: {integrity: sha512-1SgvxKMS7XDp9aL/05rvm3I+9Vte8Piov+3Rq/sh8NJUvc51HstC4+KUrxyobKgO2uSc34jemH2Jt6UKpTQdXw==} engines: {node: '>=14.18'} '@sentry/webpack-plugin@2.22.7': @@ -3810,8 +3810,8 @@ packages: engines: {node: '>=0.10.0'} hasBin: true - electron-to-chromium@1.5.80: - resolution: {integrity: sha512-LTrKpW0AqIuHwmlVNV+cjFYTnXtM9K37OGhpe0ZI10ScPSxqVSryZHIY3WnCS5NSYbBODRTZyhRMS2h5FAEqAw==} + electron-to-chromium@1.5.82: + resolution: {integrity: sha512-Zq16uk1hfQhyGx5GpwPAYDwddJuSGhtRhgOA2mCxANYaDT79nAeGnaXogMGng4KqLaJUVnOnuL0+TDop9nLOiA==} elliptic@6.5.4: resolution: {integrity: sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==} @@ -3878,8 +3878,8 @@ packages: es-module-lexer@1.6.0: resolution: {integrity: sha512-qqnD1yMU6tk/jnaMosogGySTZP8YtUgAffA9nMN+E/rjxcfRQ6IEk7IiozUjgxKoFHBGjTLnrHB/YC45r/59EQ==} - es-object-atoms@1.0.1: - resolution: {integrity: sha512-BPOBuyUF9QIVhuNLhbToCLHP6+0MHwZ7xLBkPPCZqK4JmpJgGnv10035STzzQwFpqdzNFMB3irvDI63IagvDwA==} + es-object-atoms@1.1.1: + resolution: {integrity: sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==} engines: {node: '>= 0.4'} escalade@3.2.0: @@ -4788,8 +4788,8 @@ packages: resolution: {integrity: sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==} engines: {node: '>=6'} - knip@5.42.0: - resolution: {integrity: sha512-/+/GV+oIJ0A2l2LBaiHvp4sGj448T1EMQm2S1I6sPh9AIR9riBaYY19ZYq743Ql/GR0lgwwGoQ2UKNp0B93HNA==} + knip@5.42.1: + resolution: {integrity: sha512-xTnwo0I5TLAEU1BNqi8EwnvxI/5yJUJmBiXJdnS0+2FDE6WQII3upoImuUbx1GxrftHmY+prqfL6XuO6JEtYBw==} engines: {node: '>=18.18.0'} hasBin: true peerDependencies: @@ -5484,8 +5484,8 @@ packages: resolution: {integrity: sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ==} engines: {node: ^10 || ^12 || >=14} - postcss@8.5.0: - resolution: {integrity: sha512-27VKOqrYfPncKA2NrFOVhP5MGAfHKLYn/Q0mz9cNQyRAKYi3VNHwYU2qKKqPCqgBmeeJ0uAFB56NumXZ5ZReXg==} + postcss@8.5.1: + resolution: {integrity: sha512-6oz2beyjc5VMn/KV1pPw8fliQkhBXrVn1Z3TVyqZxU8kZpzEKhBdmCFqI6ZbmGtamQvQGuU1sgPTk8ZrXDD7jQ==} engines: {node: ^10 || ^12 || >=14} postgres-array@2.0.0: @@ -9877,33 +9877,33 @@ snapshots: '@noble/hashes': 1.6.1 '@scure/base': 1.2.1 - '@sentry-internal/browser-utils@8.48.0': + '@sentry-internal/browser-utils@8.50.0': dependencies: - '@sentry/core': 8.48.0 + '@sentry/core': 8.50.0 - '@sentry-internal/feedback@8.48.0': + '@sentry-internal/feedback@8.50.0': dependencies: - '@sentry/core': 8.48.0 + '@sentry/core': 8.50.0 - '@sentry-internal/replay-canvas@8.48.0': + '@sentry-internal/replay-canvas@8.50.0': dependencies: - '@sentry-internal/replay': 8.48.0 - '@sentry/core': 8.48.0 + '@sentry-internal/replay': 8.50.0 + '@sentry/core': 8.50.0 - '@sentry-internal/replay@8.48.0': + '@sentry-internal/replay@8.50.0': dependencies: - '@sentry-internal/browser-utils': 8.48.0 - '@sentry/core': 8.48.0 + '@sentry-internal/browser-utils': 8.50.0 + '@sentry/core': 8.50.0 '@sentry/babel-plugin-component-annotate@2.22.7': {} - '@sentry/browser@8.48.0': + '@sentry/browser@8.50.0': dependencies: - '@sentry-internal/browser-utils': 8.48.0 - '@sentry-internal/feedback': 8.48.0 - '@sentry-internal/replay': 8.48.0 - '@sentry-internal/replay-canvas': 8.48.0 - '@sentry/core': 8.48.0 + '@sentry-internal/browser-utils': 8.50.0 + '@sentry-internal/feedback': 8.50.0 + '@sentry-internal/replay': 8.50.0 + '@sentry-internal/replay-canvas': 8.50.0 + '@sentry/core': 8.50.0 '@sentry/bundler-plugin-core@2.22.7': dependencies: @@ -9959,19 +9959,19 @@ snapshots: - encoding - supports-color - '@sentry/core@8.48.0': {} + '@sentry/core@8.50.0': {} - '@sentry/nextjs@8.48.0(@opentelemetry/core@1.30.1(@opentelemetry/api@1.9.0))(@opentelemetry/instrumentation@0.56.0(@opentelemetry/api@1.9.0))(@opentelemetry/sdk-trace-base@1.30.1(@opentelemetry/api@1.9.0))(next@14.2.23(@babel/core@7.26.0)(@opentelemetry/api@1.9.0)(babel-plugin-macros@3.1.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react@18.3.1)(webpack@5.97.1)': + '@sentry/nextjs@8.50.0(@opentelemetry/core@1.30.1(@opentelemetry/api@1.9.0))(@opentelemetry/instrumentation@0.56.0(@opentelemetry/api@1.9.0))(@opentelemetry/sdk-trace-base@1.30.1(@opentelemetry/api@1.9.0))(next@14.2.23(@babel/core@7.26.0)(@opentelemetry/api@1.9.0)(babel-plugin-macros@3.1.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react@18.3.1)(webpack@5.97.1)': dependencies: '@opentelemetry/api': 1.9.0 '@opentelemetry/semantic-conventions': 1.28.0 '@rollup/plugin-commonjs': 28.0.1(rollup@3.29.5) - '@sentry-internal/browser-utils': 8.48.0 - '@sentry/core': 8.48.0 - '@sentry/node': 8.48.0 - '@sentry/opentelemetry': 8.48.0(@opentelemetry/api@1.9.0)(@opentelemetry/core@1.30.1(@opentelemetry/api@1.9.0))(@opentelemetry/instrumentation@0.56.0(@opentelemetry/api@1.9.0))(@opentelemetry/sdk-trace-base@1.30.1(@opentelemetry/api@1.9.0))(@opentelemetry/semantic-conventions@1.28.0) - '@sentry/react': 8.48.0(react@18.3.1) - '@sentry/vercel-edge': 8.48.0 + '@sentry-internal/browser-utils': 8.50.0 + '@sentry/core': 8.50.0 + '@sentry/node': 8.50.0 + '@sentry/opentelemetry': 8.50.0(@opentelemetry/api@1.9.0)(@opentelemetry/core@1.30.1(@opentelemetry/api@1.9.0))(@opentelemetry/instrumentation@0.56.0(@opentelemetry/api@1.9.0))(@opentelemetry/sdk-trace-base@1.30.1(@opentelemetry/api@1.9.0))(@opentelemetry/semantic-conventions@1.28.0) + '@sentry/react': 8.50.0(react@18.3.1) + '@sentry/vercel-edge': 8.50.0 '@sentry/webpack-plugin': 2.22.7(webpack@5.97.1) chalk: 3.0.0 next: 14.2.23(@babel/core@7.26.0)(@opentelemetry/api@1.9.0)(babel-plugin-macros@3.1.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) @@ -9987,7 +9987,7 @@ snapshots: - supports-color - webpack - '@sentry/node@8.48.0': + '@sentry/node@8.50.0': dependencies: '@opentelemetry/api': 1.9.0 '@opentelemetry/context-async-hooks': 1.30.1(@opentelemetry/api@1.9.0) @@ -10021,32 +10021,32 @@ snapshots: '@opentelemetry/sdk-trace-base': 1.30.1(@opentelemetry/api@1.9.0) '@opentelemetry/semantic-conventions': 1.28.0 '@prisma/instrumentation': 5.22.0 - '@sentry/core': 8.48.0 - '@sentry/opentelemetry': 8.48.0(@opentelemetry/api@1.9.0)(@opentelemetry/core@1.30.1(@opentelemetry/api@1.9.0))(@opentelemetry/instrumentation@0.56.0(@opentelemetry/api@1.9.0))(@opentelemetry/sdk-trace-base@1.30.1(@opentelemetry/api@1.9.0))(@opentelemetry/semantic-conventions@1.28.0) + '@sentry/core': 8.50.0 + '@sentry/opentelemetry': 8.50.0(@opentelemetry/api@1.9.0)(@opentelemetry/core@1.30.1(@opentelemetry/api@1.9.0))(@opentelemetry/instrumentation@0.56.0(@opentelemetry/api@1.9.0))(@opentelemetry/sdk-trace-base@1.30.1(@opentelemetry/api@1.9.0))(@opentelemetry/semantic-conventions@1.28.0) import-in-the-middle: 1.12.0 transitivePeerDependencies: - supports-color - '@sentry/opentelemetry@8.48.0(@opentelemetry/api@1.9.0)(@opentelemetry/core@1.30.1(@opentelemetry/api@1.9.0))(@opentelemetry/instrumentation@0.56.0(@opentelemetry/api@1.9.0))(@opentelemetry/sdk-trace-base@1.30.1(@opentelemetry/api@1.9.0))(@opentelemetry/semantic-conventions@1.28.0)': + '@sentry/opentelemetry@8.50.0(@opentelemetry/api@1.9.0)(@opentelemetry/core@1.30.1(@opentelemetry/api@1.9.0))(@opentelemetry/instrumentation@0.56.0(@opentelemetry/api@1.9.0))(@opentelemetry/sdk-trace-base@1.30.1(@opentelemetry/api@1.9.0))(@opentelemetry/semantic-conventions@1.28.0)': dependencies: '@opentelemetry/api': 1.9.0 '@opentelemetry/core': 1.30.1(@opentelemetry/api@1.9.0) '@opentelemetry/instrumentation': 0.56.0(@opentelemetry/api@1.9.0) '@opentelemetry/sdk-trace-base': 1.30.1(@opentelemetry/api@1.9.0) '@opentelemetry/semantic-conventions': 1.28.0 - '@sentry/core': 8.48.0 + '@sentry/core': 8.50.0 - '@sentry/react@8.48.0(react@18.3.1)': + '@sentry/react@8.50.0(react@18.3.1)': dependencies: - '@sentry/browser': 8.48.0 - '@sentry/core': 8.48.0 + '@sentry/browser': 8.50.0 + '@sentry/core': 8.50.0 hoist-non-react-statics: 3.3.2 react: 18.3.1 - '@sentry/vercel-edge@8.48.0': + '@sentry/vercel-edge@8.50.0': dependencies: '@opentelemetry/api': 1.9.0 - '@sentry/core': 8.48.0 + '@sentry/core': 8.50.0 '@sentry/webpack-plugin@2.22.7(webpack@5.97.1)': dependencies: @@ -11350,14 +11350,14 @@ snapshots: dependencies: react: 18.3.1 - autoprefixer@10.4.20(postcss@8.5.0): + autoprefixer@10.4.20(postcss@8.5.1): dependencies: browserslist: 4.24.4 caniuse-lite: 1.0.30001692 fraction.js: 4.3.7 normalize-range: 0.1.2 picocolors: 1.1.1 - postcss: 8.5.0 + postcss: 8.5.1 postcss-value-parser: 4.2.0 available-typed-arrays@1.0.7: @@ -11520,7 +11520,7 @@ snapshots: browserslist@4.24.4: dependencies: caniuse-lite: 1.0.30001692 - electron-to-chromium: 1.5.80 + electron-to-chromium: 1.5.82 node-releases: 2.0.19 update-browserslist-db: 1.1.2(browserslist@4.24.4) @@ -11997,7 +11997,7 @@ snapshots: dependencies: jake: 10.9.2 - electron-to-chromium@1.5.80: {} + electron-to-chromium@1.5.82: {} elliptic@6.5.4: dependencies: @@ -12080,7 +12080,7 @@ snapshots: es-module-lexer@1.6.0: {} - es-object-atoms@1.0.1: + es-object-atoms@1.1.1: dependencies: es-errors: 1.3.0 @@ -12383,7 +12383,7 @@ snapshots: call-bind-apply-helpers: 1.0.1 es-define-property: 1.0.1 es-errors: 1.3.0 - es-object-atoms: 1.0.1 + es-object-atoms: 1.1.1 function-bind: 1.1.2 get-proto: 1.0.1 gopd: 1.2.0 @@ -12398,7 +12398,7 @@ snapshots: get-proto@1.0.1: dependencies: dunder-proto: 1.0.1 - es-object-atoms: 1.0.1 + es-object-atoms: 1.1.1 get-stream@5.2.0: dependencies: @@ -13268,7 +13268,7 @@ snapshots: kleur@3.0.3: {} - knip@5.42.0(@types/node@20.4.2)(typescript@5.7.3): + knip@5.42.1(@types/node@20.4.2)(typescript@5.7.3): dependencies: '@nodelib/fs.walk': 3.0.1 '@snyk/github-codeowners': 1.1.0 @@ -14025,35 +14025,35 @@ snapshots: possible-typed-array-names@1.0.0: {} - postcss-import@15.1.0(postcss@8.5.0): + postcss-import@15.1.0(postcss@8.5.1): dependencies: - postcss: 8.5.0 + postcss: 8.5.1 postcss-value-parser: 4.2.0 read-cache: 1.0.0 resolve: 1.22.10 - postcss-import@16.1.0(postcss@8.5.0): + postcss-import@16.1.0(postcss@8.5.1): dependencies: - postcss: 8.5.0 + postcss: 8.5.1 postcss-value-parser: 4.2.0 read-cache: 1.0.0 resolve: 1.22.10 - postcss-js@4.0.1(postcss@8.5.0): + postcss-js@4.0.1(postcss@8.5.1): dependencies: camelcase-css: 2.0.1 - postcss: 8.5.0 + postcss: 8.5.1 - postcss-load-config@4.0.2(postcss@8.5.0): + postcss-load-config@4.0.2(postcss@8.5.1): dependencies: lilconfig: 3.1.3 yaml: 2.7.0 optionalDependencies: - postcss: 8.5.0 + postcss: 8.5.1 - postcss-nested@6.2.0(postcss@8.5.0): + postcss-nested@6.2.0(postcss@8.5.1): dependencies: - postcss: 8.5.0 + postcss: 8.5.1 postcss-selector-parser: 6.1.2 postcss-selector-parser@6.1.2: @@ -14069,7 +14069,7 @@ snapshots: picocolors: 1.1.1 source-map-js: 1.2.1 - postcss@8.5.0: + postcss@8.5.1: dependencies: nanoid: 3.3.8 picocolors: 1.1.1 @@ -14890,11 +14890,11 @@ snapshots: normalize-path: 3.0.0 object-hash: 3.0.0 picocolors: 1.1.1 - postcss: 8.5.0 - postcss-import: 15.1.0(postcss@8.5.0) - postcss-js: 4.0.1(postcss@8.5.0) - postcss-load-config: 4.0.2(postcss@8.5.0) - postcss-nested: 6.2.0(postcss@8.5.0) + postcss: 8.5.1 + postcss-import: 15.1.0(postcss@8.5.1) + postcss-js: 4.0.1(postcss@8.5.1) + postcss-load-config: 4.0.2(postcss@8.5.1) + postcss-nested: 6.2.0(postcss@8.5.1) postcss-selector-parser: 6.1.2 resolve: 1.22.10 sucrase: 3.35.0 From 2eb474c08c93352e5c86e36736729be0a76f6961 Mon Sep 17 00:00:00 2001 From: kushagrasarathe <76868364+kushagrasarathe@users.noreply.github.com> Date: Thu, 16 Jan 2025 16:57:00 +0530 Subject: [PATCH 5/7] fix: center claim flow text --- src/components/Claim/Link/Initial.view.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Claim/Link/Initial.view.tsx b/src/components/Claim/Link/Initial.view.tsx index 380e953db..dfb63beac 100644 --- a/src/components/Claim/Link/Initial.view.tsx +++ b/src/components/Claim/Link/Initial.view.tsx @@ -437,7 +437,7 @@ export const InitialClaimLinkView = ({ - +
sent you {tokenPrice ? ( From 4ee1d41e37b8fbe8b3ea2cf97b067245c179a21b Mon Sep 17 00:00:00 2001 From: kushagrasarathe <76868364+kushagrasarathe@users.noreply.github.com> Date: Thu, 16 Jan 2025 17:11:10 +0530 Subject: [PATCH 6/7] fix: center claim flow text --- src/components/Claim/Link/Onchain/Confirm.view.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Claim/Link/Onchain/Confirm.view.tsx b/src/components/Claim/Link/Onchain/Confirm.view.tsx index 67f6e3819..1d8dac43d 100644 --- a/src/components/Claim/Link/Onchain/Confirm.view.tsx +++ b/src/components/Claim/Link/Onchain/Confirm.view.tsx @@ -115,7 +115,7 @@ export const ConfirmClaimLinkView = ({ - +
sent you{' '}