diff --git a/public/locales/en/translation.json b/public/locales/en/translation.json index f28b3c5e..c8ef9bbf 100644 --- a/public/locales/en/translation.json +++ b/public/locales/en/translation.json @@ -1067,6 +1067,14 @@ "timestamp": { "message": "Timestamp:", "description": "Used for the TransferTicket component" + }, + "activationTxID": { + "message": "Activation txID:", + "description": "Used for the TransferTicket component" + }, + "ticketDetail": { + "message": "Ticket detail", + "description": "Used for the TransferTicket component" } }, "userNameChangeTicket": { diff --git a/src/components/Summary/Summary.tsx b/src/components/Summary/Summary.tsx index 7853628c..0d4818f6 100644 --- a/src/components/Summary/Summary.tsx +++ b/src/components/Summary/Summary.tsx @@ -319,7 +319,9 @@ const Summary: React.FC = () => { } if (sumKey === 'gigaHashPerSec') { - return formatNumber(Number(value) * NETWORK_RANGE, { decimalsLength: 2 }); + return formatNumber(Number(value.toString().replaceAll(',', '')) * NETWORK_RANGE, { + decimalsLength: 2, + }); } return value; @@ -351,7 +353,7 @@ const Summary: React.FC = () => { color="textSecondary" noWrap percentagecolor={`${ - difference > 0 + Number(difference) > 0 ? themeVariant.custom.green.success : themeVariant.custom.red.error }`} @@ -361,9 +363,9 @@ const Summary: React.FC = () => { : parse(translate('components.summary.last24h'))} - {`${difference > 0 ? '+' : ''}`} + {`${Number(difference) > 0 ? '+' : ''}`} {difference}% - {difference > 0 ? ( + {Number(difference) > 0 ? ( = ({ ticket, variant }) => /> ); }; + const getOfferType = () => { switch (ticket.otherData.offerType) { case 'sense': + case 'sense-offer': return parse(translate('components.ticket.offerTicket.sense')); case 'cascade': return parse(translate('components.ticket.offerTicket.cascade')); @@ -73,6 +75,18 @@ const TransferTicket: React.FC = ({ ticket, variant }) => } }; + const itemUrl = () => { + switch (ticket.otherData.offerType) { + case 'sense': + case 'sense-offer': + return `/sense?txid=${ticket.otherData.regTxId}`; + case 'cascade': + return `/cascade?txid=${ticket.otherData.regTxId}`; + default: + return `/nft?txid=${ticket.otherData.regTxId}`; + } + }; + return ( @@ -128,7 +142,7 @@ const TransferTicket: React.FC = ({ ticket, variant }) => - {parse(translate('components.ticket.transferTicket.itemTxId'))} + {parse(translate('components.ticket.transferTicket.activationTxID'))} @@ -157,7 +171,14 @@ const TransferTicket: React.FC = ({ ticket, variant }) => value={ticket.offer_txid} title={ticket.offer_txid} className="address-link" + />{' '} + ( + + ) diff --git a/src/pages/Details/CascadeDetails/Transfers.tsx b/src/pages/Details/CascadeDetails/Transfers.tsx index b4f104a7..02ba39e0 100644 --- a/src/pages/Details/CascadeDetails/Transfers.tsx +++ b/src/pages/Details/CascadeDetails/Transfers.tsx @@ -102,7 +102,7 @@ const Transfers = () => { { { { { )} {tickets.length ? ( - +