mirror of
https://github.com/GOSTSec/gostexplr
synced 2025-01-14 16:58:02 +00:00
Pretty html
This commit is contained in:
parent
bf5643525e
commit
ad830004d4
2
app.js
2
app.js
@ -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') {
|
||||
|
@ -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(),
|
||||
|
@ -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', {
|
||||
|
Loading…
Reference in New Issue
Block a user