Skip to content

Commit

Permalink
Hide to-address in wallet transaction history
Browse files Browse the repository at this point in the history
  • Loading branch information
ChiaMineJP committed Aug 14, 2024
1 parent d92ed1d commit 36503d9
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions packages/wallets/src/components/WalletHistory.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@ import {
import {
AddressBookContext,
Card,
CopyToClipboard,
// CopyToClipboard,
Flex,
StateColor,
// StateColor,
TableControlled,
useCurrencyCode,
useSerializedNavigationState,
mojoToChia,
mojoToCAT,
FormatLargeNumber,
truncateValue,
// truncateValue,
} from '@chia-network/core';
import type { Row } from '@chia-network/core';
import { Trans } from '@lingui/macro';
Expand All @@ -29,7 +29,7 @@ import {
TableBody,
TableCell,
TableRow,
Tooltip,
// Tooltip,
Typography,
Chip,
} from '@mui/material';
Expand Down Expand Up @@ -68,9 +68,11 @@ const StyledTableCellSmallRight = styled(StyledTableCellSmall)`
padding-left: 1rem;
`;

/*
const StyledWarning = styled(Box)`
color: ${StateColor.WARNING};
`;
*/

async function handleRowClick(
event: React.MouseEvent<HTMLTableRowElement>,
Expand Down Expand Up @@ -139,6 +141,8 @@ const getCols = (type: WalletType, isSyncing, getOfferRecord, navigate, location
// const hasMemos = !!memos && !!Object.keys(memos).length && !!memos[Object.keys(memos)[0]];
const isRetire = row.toAddress === metadata.retireAddress;
const isOffer = row.toAddress === metadata.offerTakerAddress;

/*
const shouldObscureAddress = isRetire || isOffer;
let displayAddress = truncateValue(row.toAddress, {});
Expand All @@ -152,6 +156,7 @@ const getCols = (type: WalletType, isSyncing, getOfferRecord, navigate, location
}
});
}
*/

return (
<Flex
Expand All @@ -163,6 +168,7 @@ const getCols = (type: WalletType, isSyncing, getOfferRecord, navigate, location
}
}}
>
{/*
<div>
<Typography variant="caption" component="span">
<Trans>To: </Trans>
Expand All @@ -187,6 +193,7 @@ const getCols = (type: WalletType, isSyncing, getOfferRecord, navigate, location
</span>
</Tooltip>
</div>
*/}
<Flex gap={0.5}>
{isIncomingClawback && (
<WalletHistoryClawbackChip
Expand Down

0 comments on commit 36503d9

Please sign in to comment.