{walletBalancesLoading
? loadingString
+ : hidePrivateData
+ ? hiddenString
: formatAssetAmountCurrency({
amount: baseToAsset(sourceAssetAmountMax1e8),
asset: sourceAsset,
@@ -2006,7 +2012,9 @@ export const Swap = ({
{memoTitle}
-
{memoLabel}
+
+ {hidePrivateData ? hiddenString : memoLabel}
+
>
)}
diff --git a/src/renderer/components/uielements/button/MaxBalanceButton.tsx b/src/renderer/components/uielements/button/MaxBalanceButton.tsx
index 1a1d55cb7..d9e3cc429 100644
--- a/src/renderer/components/uielements/button/MaxBalanceButton.tsx
+++ b/src/renderer/components/uielements/button/MaxBalanceButton.tsx
@@ -4,6 +4,7 @@ import { Balance } from '@xchainjs/xchain-client'
import { BaseAmount, baseToAsset, formatAssetAmountCurrency } from '@xchainjs/xchain-util'
import { useIntl } from 'react-intl'
+import { hiddenString } from '../../../helpers/stringHelper'
import { InfoIcon } from '../info'
import { TextButton, Props as ButtonProps } from './TextButton'
@@ -15,6 +16,8 @@ export type ComponentProps = {
className?: string
classNameButton?: string
classNameIcon?: string
+ // TODO (@veado) Make it default (not) optional to handle private data everyhere properly
+ hidePrivateData?: boolean
}
export type Props = ComponentProps & Omit