messiest yet, bump confs by 1
This commit is contained in:
parent
2b8eee6e03
commit
17acbdda6d
@ -71,7 +71,7 @@ module.exports = function transactionAPI(router) {
|
|||||||
locktime: body.locktime,
|
locktime: body.locktime,
|
||||||
blockhash: body.block,
|
blockhash: body.block,
|
||||||
fees: body.fee / 1e8,
|
fees: body.fee / 1e8,
|
||||||
confirmations: height - body.height,
|
confirmations: height - body.height + 1,
|
||||||
valueOut: body.outputs.reduce((sum, output) => sum + output.value, 0) / 1e8,
|
valueOut: body.outputs.reduce((sum, output) => sum + output.value, 0) / 1e8,
|
||||||
vin: body.inputs.map(input => ({
|
vin: body.inputs.map(input => ({
|
||||||
addr: input.coin ? input.coin.address : '',
|
addr: input.coin ? input.coin.address : '',
|
||||||
@ -120,7 +120,7 @@ module.exports = function transactionAPI(router) {
|
|||||||
txs: body.txs.map(tx => ({
|
txs: body.txs.map(tx => ({
|
||||||
txid: tx.hash,
|
txid: tx.hash,
|
||||||
fees: tx.fee / 1e8,
|
fees: tx.fee / 1e8,
|
||||||
confirmations: height - body.height,
|
confirmations: height - body.height + 1,
|
||||||
valueOut: tx.outputs.reduce((sum, output) => sum + output.value, 0) / 1e8,
|
valueOut: tx.outputs.reduce((sum, output) => sum + output.value, 0) / 1e8,
|
||||||
vin: tx.inputs.map(input => ({
|
vin: tx.inputs.map(input => ({
|
||||||
addr: input.coin ? input.coin.address : '',
|
addr: input.coin ? input.coin.address : '',
|
||||||
@ -166,7 +166,7 @@ module.exports = function transactionAPI(router) {
|
|||||||
txs: body.map(tx => ({
|
txs: body.map(tx => ({
|
||||||
txid: tx.hash,
|
txid: tx.hash,
|
||||||
fees: tx.fee / 1e8,
|
fees: tx.fee / 1e8,
|
||||||
confirmations: height - tx.height,
|
confirmations: height - tx.height + 1,
|
||||||
valueOut: tx.outputs.reduce((sum, output) => sum + output.value, 0) / 1e8,
|
valueOut: tx.outputs.reduce((sum, output) => sum + output.value, 0) / 1e8,
|
||||||
vin: tx.inputs.map(input => ({
|
vin: tx.inputs.map(input => ({
|
||||||
addr: input.coin ? input.coin.address : '',
|
addr: input.coin ? input.coin.address : '',
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user