qubic/explorer-frontend

Trx details: To use archive services from v2 and to display the timestamp information

Closed this issue · 2 comments

When loading trx details page (i.e https://betaexplorer.qubic.org/network/tx/tojgwpraniwbuabxysiupjxwsdcbimzwhxvymupcihlaljkkbapbpnmfmakc?type=latest), it's fetching the data from two services:

both from v2.

This should be change to used instead a single endpoint in v2:

https://rpc.qubic.org/v2/transactions/tojgwpraniwbuabxysiupjxwsdcbimzwhxvymupcihlaljkkbapbpnmfmakc

that returns already in the response timestamp and moneyFlew fields (this last one was in v1 in the tx-status service only):

i.e

{
"transaction": {
"sourceId": "XJKGAOXAOGQQGEPOSOLGYJDOJFUAUUXLVDPRQTQMDAEORWPZXUWGQDTAEASH",
"destId": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFXIB",
"amount": "1000000",
"tickNumber": 15975576,
"inputType": 2,
"inputSize": 64,
"inputHex": "fef03ce5ea1a58861f2b6152491d2ee1176c523316be0839b349bb9c860cb364716c692d637564617f004cf73e765650676c132d5de1085a8b2c611c5b0c3498",
"signatureHex": "d54752c09aebc24f793560eccb29131b3eca2691357d63a5fdbf7b2e4bf6880d95ee4856a87627d6d50487a19bcbdae480bc34e2e4e3c4e7dddadec740962900",
"txId": "tojgwpraniwbuabxysiupjxwsdcbimzwhxvymupcihlaljkkbapbpnmfmakc"
},
"timestamp": "1726688911000",
"moneyFlew": false
}

As we have now the timestamp information in v2. please display also this information in the screen (see Figma https://www.figma.com/design/uTkCAs5q8c1UiV9PPPRGcS/Qubic-apps?node-id=1174-397&node-type=section&t=9P20cgpygdXgteWt-0)

done in #160

v2 endpoint is being used to get the details, tick and timestamp information is displayed.
However, timestamp format is not as defined in the Figma. I'll open a separated ticket to fix this.