1
0
mirror of https://github.com/GOSTSec/gostexplr synced 2025-01-14 16:58:02 +00:00

Pretty html

This commit is contained in:
xcps 2018-08-16 01:49:00 +05:00 committed by R4SAS
parent bf5643525e
commit ad830004d4
3 changed files with 4 additions and 5 deletions

2
app.js
View File

@ -18,6 +18,8 @@ var app = express();
app.set('views', path.join(__dirname, 'views'));
app.set('view engine', 'pug');
app.locals.pretty = true;
// uncomment after placing your favicon in /public
app.use(favicon(path.join(__dirname, 'public', 'favicon.ico')));
if (env === 'development') {

View File

@ -15,7 +15,7 @@ router.get('/:address/:offset*?', async function(req, res, next) {
model: models.Vout,
include: {
model: models.Transaction,
},
},
});
@ -32,7 +32,6 @@ router.get('/:address/:offset*?', async function(req, res, next) {
const nextpage = address.Vouts.length === 30 ? page + 1 : null;
const prevpage = page > 1 ? page - 1 : null;
console.log(address.toJSON());
res.render('address', {
address: address.toJSON(),

View File

@ -37,15 +37,13 @@ router.get('/:txid', async function(req, res, next) {
raw: true,
});
const confirmations = lastBlock.maxheight - transaction.Block.height + 1;
const txJson = transaction.toJSON();
const txTemplate = Object.assign(txJson, {
vins: txJson.Vouts.filter((vout) => vout.TransactionVouts.direction === 0),
vouts: txJson.Vouts.filter((vout) => vout.TransactionVouts.direction === 1),
});
console.log(transaction.Vouts.length);
txTemplate.blockTime = transaction.Block.time.toUTCString();
res.render('transaction', {