add transactions pool tx_id display

This commit is contained in:
andrewprog97 2024-09-09 21:12:56 +03:00
parent 7bbfb4c3ee
commit 37e1357ccc
2 changed files with 4 additions and 2 deletions

View file

@ -160,7 +160,7 @@ export async function getTxPoolDetails(count: number) {
// When count is 0, retrieve all records ordered by timestamp DESC
if (count === 0) {
const result = await Pool.findAll({
attributes: ['blob_size', 'fee', 'id', 'timestamp'],
attributes: ['blob_size', 'fee', 'id', 'timestamp', 'tx_id'],
order: [['timestamp', 'DESC']]
});
return result.length > 0 ? result : [];
@ -173,6 +173,7 @@ export async function getTxPoolDetails(count: number) {
'fee',
'id',
'timestamp',
'tx_id',
[literal('false'), 'isNew'] // Adding a literal false as "isNew"
],
order: [['timestamp', 'DESC']],

View file

@ -12,6 +12,7 @@ function TransactionPool() {
fee: string,
id: string,
timestamp: string,
tx_id: string,
}
const [turnedOn, setTurnedOn] = useState(true);
@ -77,7 +78,7 @@ function TransactionPool() {
timeAgo(parseInt(element.timestamp, 10)*1000),
element.blob_size + " bytes",
parseInt(element.fee, 10)/10**12,
<AliasText to={`/transaction/${element.id}`}>{element.id}</AliasText>
<AliasText to={`/transaction/${element.id}`}>{element.tx_id}</AliasText>
]));
return (