Browse Source

Address page fixed

stuff
xcps 7 years ago
parent
commit
bdf288c91f
  1. 1
      routes/address.js
  2. 9
      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;

9
views/address.pug

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

Loading…
Cancel
Save