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) {
res.status(404).render('404'); res.status(404).render('404');
return; return;
} }
const limit = 30; const limit = 30;
const paramPage = parseInt(req.params.offset); const paramPage = parseInt(req.params.offset);
const page = isNaN(paramPage) || paramPage < 1 ? 1 : paramPage; const page = isNaN(paramPage) || paramPage < 1 ? 1 : paramPage;

17
views/address.pug

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

Loading…
Cancel
Save