diff --git a/lib/BlockDb.js b/lib/BlockDb.js index 05c0650..97e2a32 100644 --- a/lib/BlockDb.js +++ b/lib/BlockDb.js @@ -139,8 +139,8 @@ function spec(b) { if (err && err.code === -5) return cb(); if (err) return cb(err); - info.reward = BitcoreBlock.getBlockValue(info.height) / util.COIN ; - + if (info.result.height) + info.result.reward = BitcoreBlock.getBlockValue(info.result.height) / util.COIN ; return cb(null, { hash: hash, info: info.result, diff --git a/lib/TransactionRpc.js b/lib/TransactionRpc.js index cd439ec..0eaef27 100644 --- a/lib/TransactionRpc.js +++ b/lib/TransactionRpc.js @@ -24,10 +24,6 @@ function spec(b) { // Inputs if (tx.isCoinBase()) { info.isCoinBase = true; - - var reward = BitcoreBlock.getBlockValue(info.height) / util.COIN; - info.vin[0].reward = reward; - info.valueIn = reward; } var n =0; diff --git a/public/views/block.html b/public/views/block.html index 07662f5..09646fd 100644 --- a/public/views/block.html +++ b/public/views/block.html @@ -47,6 +47,11 @@ Height {{block.height}} + + Block Reward + {{$root.currency.getConvertion(block.reward)}} + + Timestamp {{block.time * 1000 | date:'medium'}} diff --git a/public/views/transaction/tx.html b/public/views/transaction/tx.html index e5eddc7..4a64860 100644 --- a/public/views/transaction/tx.html +++ b/public/views/transaction/tx.html @@ -14,7 +14,6 @@
-
{{$root.currency.getConvertion(vin.reward)}}
No Inputs (Newly Generated Coins)