diff --git a/apps/web/src/components/AddressTile/AddressTile.tsx b/apps/web/src/components/AddressTile/AddressTile.tsx index bbc110e275..1930219d1b 100644 --- a/apps/web/src/components/AddressTile/AddressTile.tsx +++ b/apps/web/src/components/AddressTile/AddressTile.tsx @@ -21,8 +21,9 @@ import { CopyAddressButton } from "../CopyAddressButton"; export const AddressTile = ({ size = "sm", address, + hideBalance = false, ...flexProps -}: { address: Address; size?: "xs" | "sm" } & FlexProps) => { +}: { address: Address; size?: "xs" | "sm"; hideBalance?: boolean } & FlexProps) => { const addressKind = useAddressKind(address); const color = useColor(); @@ -71,7 +72,9 @@ export const AddressTile = ({ isLong={addressKind.type === "unknown"} variant={isSmall ? "unstyled" : "ghost"} /> - {balance !== undefined && prettyTezAmount(balance)} + {!hideBalance && ( + {balance !== undefined && prettyTezAmount(balance)} + )} diff --git a/apps/web/src/components/SendFlow/NFT/SignPage.tsx b/apps/web/src/components/SendFlow/NFT/SignPage.tsx index 9713824020..06aaf61195 100644 --- a/apps/web/src/components/SendFlow/NFT/SignPage.tsx +++ b/apps/web/src/components/SendFlow/NFT/SignPage.tsx @@ -8,6 +8,7 @@ import { ModalContent, ModalFooter, Text, + useBreakpointValue, VStack, } from "@chakra-ui/react"; import { type EstimatedAccountOperations, type FA2Transfer, type NFTBalance } from "@umami/core"; @@ -27,6 +28,7 @@ export const SignPage = (props: { nft: NFTBalance; operations: EstimatedAccountO const { fee, operations, estimationFailed, isLoading, form, signer, onSign } = useSignPageHelpers(initialOperations); const color = useColor(); + const hideBalance = useBreakpointValue({ base: true, md: false }); const { recipient, amount } = operations.operations[0] as FA2Transfer; @@ -52,11 +54,11 @@ export const SignPage = (props: { nft: NFTBalance; operations: EstimatedAccountO From - + To - + diff --git a/apps/web/src/components/SendFlow/Tez/SignPage.tsx b/apps/web/src/components/SendFlow/Tez/SignPage.tsx index 5af9d0ce8c..444dc7e666 100644 --- a/apps/web/src/components/SendFlow/Tez/SignPage.tsx +++ b/apps/web/src/components/SendFlow/Tez/SignPage.tsx @@ -5,6 +5,7 @@ import { ModalBody, ModalContent, ModalFooter, + useBreakpointValue, } from "@chakra-ui/react"; import { type TezTransfer } from "@umami/core"; import { FormProvider } from "react-hook-form"; @@ -21,6 +22,7 @@ export const SignPage = (props: SignPageProps) => { const { operations: initialOperations } = props; const { fee, operations, estimationFailed, isLoading, form, signer, onSign } = useSignPageHelpers(initialOperations); + const hideBalance = useBreakpointValue({ base: true, md: false }); const { amount: mutezAmount, recipient } = operations.operations[0] as TezTransfer; @@ -39,11 +41,11 @@ export const SignPage = (props: SignPageProps) => { From - + To - + diff --git a/apps/web/src/components/SendFlow/Token/SignPage.tsx b/apps/web/src/components/SendFlow/Token/SignPage.tsx index 27b2dcef84..cae07bbcb6 100644 --- a/apps/web/src/components/SendFlow/Token/SignPage.tsx +++ b/apps/web/src/components/SendFlow/Token/SignPage.tsx @@ -5,6 +5,7 @@ import { ModalBody, ModalContent, ModalFooter, + useBreakpointValue, } from "@chakra-ui/react"; import { type FA12TokenBalance, type FA2TokenBalance, type TokenTransfer } from "@umami/core"; import { FormProvider } from "react-hook-form"; @@ -24,7 +25,7 @@ export const SignPage = (props: SignPageProps<{ token: FA12TokenBalance | FA2Tok } = props; const { fee, operations, estimationFailed, isLoading, form, signer, onSign } = useSignPageHelpers(initialOperations); - + const hideBalance = useBreakpointValue({ base: true, md: false }); const { amount, recipient } = operations.operations[0] as TokenTransfer; return ( @@ -42,11 +43,11 @@ export const SignPage = (props: SignPageProps<{ token: FA12TokenBalance | FA2Tok From - + To - +