Skip to content

Commit 41e19fc

Browse files
committed
feat(gui): Show up to 16 characters of peer id of asb
1 parent 2724636 commit 41e19fc

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src-gui/src/renderer/components/modal/provider/ProviderInfo.tsx

+4-5
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ const useStyles = makeStyles((theme) => ({
3131
*/
3232
function ProviderMarkupChip({ provider }: { provider: ExtendedProviderStatus }) {
3333
const marketExchangeRate = useAppSelector(s => s.rates?.xmrBtcRate);
34-
if (marketExchangeRate === null)
34+
if (marketExchangeRate === null)
3535
return null;
3636

3737
const providerExchangeRate = satsToBtc(provider.price);
@@ -63,7 +63,7 @@ export default function ProviderInfo({
6363
{provider.multiAddr}
6464
</Typography>
6565
<Typography color="textSecondary" gutterBottom>
66-
<TruncatedText>{provider.peerId}</TruncatedText>
66+
<TruncatedText limit={16} truncateMiddle>{provider.peerId}</TruncatedText>
6767
</Typography>
6868
<Typography variant="caption">
6969
Exchange rate:{" "}
@@ -82,9 +82,8 @@ export default function ProviderInfo({
8282
)}
8383
{provider.age ? (
8484
<Chip
85-
label={`Went online ${Math.round(secondsToDays(provider.age))} ${
86-
provider.age === 1 ? "day" : "days"
87-
} ago`}
85+
label={`Went online ${Math.round(secondsToDays(provider.age))} ${provider.age === 1 ? "day" : "days"
86+
} ago`}
8887
/>
8988
) : (
9089
<Chip label="Discovered via rendezvous point" />

0 commit comments

Comments
 (0)