From 17acbdda6d5cf8b6547abfd0d59497499fbb7351 Mon Sep 17 00:00:00 2001 From: tenthirtyone Date: Tue, 15 Aug 2017 04:11:22 -0400 Subject: [PATCH] messiest yet, bump confs by 1 --- server/lib/api/transaction.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/server/lib/api/transaction.js b/server/lib/api/transaction.js index 83ce1e8..d1f72e9 100644 --- a/server/lib/api/transaction.js +++ b/server/lib/api/transaction.js @@ -71,7 +71,7 @@ module.exports = function transactionAPI(router) { locktime: body.locktime, blockhash: body.block, fees: body.fee / 1e8, - confirmations: height - body.height, + confirmations: height - body.height + 1, valueOut: body.outputs.reduce((sum, output) => sum + output.value, 0) / 1e8, vin: body.inputs.map(input => ({ addr: input.coin ? input.coin.address : '', @@ -120,7 +120,7 @@ module.exports = function transactionAPI(router) { txs: body.txs.map(tx => ({ txid: tx.hash, fees: tx.fee / 1e8, - confirmations: height - body.height, + confirmations: height - body.height + 1, valueOut: tx.outputs.reduce((sum, output) => sum + output.value, 0) / 1e8, vin: tx.inputs.map(input => ({ addr: input.coin ? input.coin.address : '', @@ -166,7 +166,7 @@ module.exports = function transactionAPI(router) { txs: body.map(tx => ({ txid: tx.hash, fees: tx.fee / 1e8, - confirmations: height - tx.height, + confirmations: height - tx.height + 1, valueOut: tx.outputs.reduce((sum, output) => sum + output.value, 0) / 1e8, vin: tx.inputs.map(input => ({ addr: input.coin ? input.coin.address : '',