Browse Source

Address page fixed

stuff
xcps 7 years ago
parent
commit
bdf288c91f
  1. 1
      routes/address.js
  2. 17
      views/address.pug

1
routes/address.js

@ -26,6 +26,7 @@ router.get('/:address/:offset*?', async function(req, res, next) { @@ -26,6 +26,7 @@ router.get('/:address/:offset*?', async function(req, res, next) {
res.status(404).render('404');
return;
}
const limit = 30;
const paramPage = parseInt(req.params.offset);
const page = isNaN(paramPage) || paramPage < 1 ? 1 : paramPage;

17
views/address.pug

@ -6,14 +6,15 @@ block content @@ -6,14 +6,15 @@ block content
h3 Transactions
table
each vout in address.Vouts
tr
if vout.Transactions[0].TransactionVouts.direction == 1
td OUT
else
td IN
td
a(href=`/transaction/${vout.Transactions[0].txid}/`) #{vout.Transactions[0].txid}
each vout in address.Vouts
each transaction in vout.Transactions
tr
if transaction.TransactionVouts.direction == 1
td INCOME
else
td OUTCOME
td
a(href=`/transaction/${transaction.txid}/`) #{transaction.txid}
div.pagination
if prevpage
a(href=`/address/#{address}/${prevpage}/`, style='float:left') Back

Loading…
Cancel
Save