Skip to content

Commit

Permalink
feat(gui): Show up to 16 characters of peer id of asb (#176)
Browse files Browse the repository at this point in the history
  • Loading branch information
binarybaron authored Nov 16, 2024
1 parent 38e07c9 commit aca0d6a
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const useStyles = makeStyles((theme) => ({
*/
function ProviderMarkupChip({ provider }: { provider: ExtendedProviderStatus }) {
const marketExchangeRate = useAppSelector(s => s.rates?.xmrBtcRate);
if (marketExchangeRate === null)
if (marketExchangeRate === null)
return null;

const providerExchangeRate = satsToBtc(provider.price);
Expand Down Expand Up @@ -63,7 +63,7 @@ export default function ProviderInfo({
{provider.multiAddr}
</Typography>
<Typography color="textSecondary" gutterBottom>
<TruncatedText>{provider.peerId}</TruncatedText>
<TruncatedText limit={16} truncateMiddle>{provider.peerId}</TruncatedText>
</Typography>
<Typography variant="caption">
Exchange rate:{" "}
Expand All @@ -82,9 +82,8 @@ export default function ProviderInfo({
)}
{provider.age ? (
<Chip
label={`Went online ${Math.round(secondsToDays(provider.age))} ${
provider.age === 1 ? "day" : "days"
} ago`}
label={`Went online ${Math.round(secondsToDays(provider.age))} ${provider.age === 1 ? "day" : "days"
} ago`}
/>
) : (
<Chip label="Discovered via rendezvous point" />
Expand Down

0 comments on commit aca0d6a

Please sign in to comment.