You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`SELECT ${columns} FROM transactions WHERE tx_to = decode($1, 'hex') ORDER BY block_num DESC OFFSET $2 LIMIT $3`,
23
-
[worldAddress,offset,limit],
21
+
constblocks=awaitclient.query(
22
+
`SELECT DISTINCT encode(block_hash, 'hex') as block_hash, block_num, block_time FROM transactions WHERE tx_to = decode($1, 'hex') ORDER BY block_num DESC OFFSET $2 LIMIT $3`,
23
+
[worldAddress.replace("0x",""),offset,limit],
24
24
);
25
25
26
-
returnResponse.json({
27
-
transactions: transactions.rows,
28
-
});
26
+
returnResponse.json({blocks: blocks.rows});
29
27
}catch(error){
30
28
console.error("Database error:",error);
31
29
returnResponse.json({error: "Failed to fetch transactions"},{status: 500});
0 commit comments