mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2025-11-26 18:56:23 -05:00
feat(gui): Show up to 16 characters of peer id of asb (#176)
This commit is contained in:
parent
38e07c9937
commit
aca0d6aa74
1 changed files with 4 additions and 5 deletions
|
|
@ -31,7 +31,7 @@ const useStyles = makeStyles((theme) => ({
|
||||||
*/
|
*/
|
||||||
function ProviderMarkupChip({ provider }: { provider: ExtendedProviderStatus }) {
|
function ProviderMarkupChip({ provider }: { provider: ExtendedProviderStatus }) {
|
||||||
const marketExchangeRate = useAppSelector(s => s.rates?.xmrBtcRate);
|
const marketExchangeRate = useAppSelector(s => s.rates?.xmrBtcRate);
|
||||||
if (marketExchangeRate === null)
|
if (marketExchangeRate === null)
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
const providerExchangeRate = satsToBtc(provider.price);
|
const providerExchangeRate = satsToBtc(provider.price);
|
||||||
|
|
@ -63,7 +63,7 @@ export default function ProviderInfo({
|
||||||
{provider.multiAddr}
|
{provider.multiAddr}
|
||||||
</Typography>
|
</Typography>
|
||||||
<Typography color="textSecondary" gutterBottom>
|
<Typography color="textSecondary" gutterBottom>
|
||||||
<TruncatedText>{provider.peerId}</TruncatedText>
|
<TruncatedText limit={16} truncateMiddle>{provider.peerId}</TruncatedText>
|
||||||
</Typography>
|
</Typography>
|
||||||
<Typography variant="caption">
|
<Typography variant="caption">
|
||||||
Exchange rate:{" "}
|
Exchange rate:{" "}
|
||||||
|
|
@ -82,9 +82,8 @@ export default function ProviderInfo({
|
||||||
)}
|
)}
|
||||||
{provider.age ? (
|
{provider.age ? (
|
||||||
<Chip
|
<Chip
|
||||||
label={`Went online ${Math.round(secondsToDays(provider.age))} ${
|
label={`Went online ${Math.round(secondsToDays(provider.age))} ${provider.age === 1 ? "day" : "days"
|
||||||
provider.age === 1 ? "day" : "days"
|
} ago`}
|
||||||
} ago`}
|
|
||||||
/>
|
/>
|
||||||
) : (
|
) : (
|
||||||
<Chip label="Discovered via rendezvous point" />
|
<Chip label="Discovered via rendezvous point" />
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue