diff --git a/public/src/css/common.css b/public/src/css/common.css index bf4284f..d93ad04 100644 --- a/public/src/css/common.css +++ b/public/src/css/common.css @@ -568,9 +568,6 @@ margin-left: 0; margin: 30px 0; } -.transaction-vin-vout .ellipsis { margin-bottom: 10px; } -.transaction-vin-vout .btc-value { margin-left: 15px; } - .page-header { margin-top: 0; } /* Index */ @@ -646,3 +643,18 @@ margin-left: 0; -webkit-animation-timing-function: linear; } +.transaction-vin-vout { + +} + +.v_highlight { + background-color: #8DC429; + overflow: hidden; + color: #fff; +} + +a.v_highlight_more { + background-color: #8DC429; + color: #fff; +} + diff --git a/public/src/js/config.js b/public/src/js/config.js index b1b66f8..a48a7f7 100644 --- a/public/src/js/config.js +++ b/public/src/js/config.js @@ -11,7 +11,7 @@ angular.module('insight').config(function($routeProvider) { controller: 'BlocksController', templateUrl: '/views/redirect.html' }). - when('/tx/:txId', { + when('/tx/:txId/:v_type?/:v_index?', { templateUrl: '/views/transaction.html', title: 'Bitcoin Transaction ' }). diff --git a/public/src/js/controllers/transactions.js b/public/src/js/controllers/transactions.js index e22897c..de66b42 100644 --- a/public/src/js/controllers/transactions.js +++ b/public/src/js/controllers/transactions.js @@ -58,14 +58,14 @@ function($scope, $rootScope, $routeParams, $location, Global, Transaction, Trans tmp[addr].doubleSpentIndex = tmp[addr].doubleSpentIndex || items[i].doubleSpentIndex; tmp[addr].unconfirmedInput += items[i].unconfirmedInput; tmp[addr].dbError = tmp[addr].dbError || items[i].dbError; - tmp[addr].valueSat += items[i].value * COIN; + tmp[addr].valueSat += Math.round(items[i].value * COIN); tmp[addr].items.push(items[i]); tmp[addr].notAddr = notAddr; tmp[addr].count++; } angular.forEach(tmp, function(v) { - v.value = parseInt(v.valueSat) / COIN; + v.value = v.value || parseInt(v.valueSat) / COIN; ret.push(v); }); return ret; @@ -154,6 +154,14 @@ function($scope, $rootScope, $routeParams, $location, Global, Transaction, Trans } }; + // Highlighted txout + if ($routeParams.v_type == '>' || $routeParams.v_type == '<') { + $scope.from_vin = $routeParams.v_type == '<' ? true : false; + $scope.from_vout = $routeParams.v_type == '>' ? true : false; + $scope.v_index = parseInt($routeParams.v_index); + $scope.itemsExpanded = true; + } + //Init without txs $scope.txs = []; diff --git a/public/views/block.html b/public/views/block.html index 8a06237..78f1a89 100644 --- a/public/views/block.html +++ b/public/views/block.html @@ -2,7 +2,6 @@
-

Block

Loading Block...
@@ -16,7 +15,6 @@ {{block.hash}}
-

Hashes

@@ -35,7 +33,8 @@
-

Summary

+

Block #{{block.height}}

+

Summary

Loading Block Details... @@ -109,7 +108,7 @@
-

Transactions Transactions contained within this block

+

Transactions

diff --git a/public/views/transaction.html b/public/views/transaction.html index c36235f..c0cf9bb 100644 --- a/public/views/transaction.html +++ b/public/views/transaction.html @@ -3,7 +3,6 @@
-

Transaction

Loading Transaction...
@@ -41,10 +40,13 @@
-

- Details - View information about a bitcoin transaction -

+

Transaction + + Input + Output + {{v_index}} + +

Loading Transaction Details... @@ -53,25 +55,6 @@
-
-

Inputs and Outputs

-
- - - - - - - - - - - - - - -
Total Input{{$root.currency.getConvertion(tx.valueIn)}}
Total Output{{$root.currency.getConvertion(tx.valueOut)}}
Fees{{$root.currency.getConvertion(tx.fees)}}
-
diff --git a/public/views/transaction/tx.html b/public/views/transaction/tx.html index cd6c290..81a0bdc 100644 --- a/public/views/transaction/tx.html +++ b/public/views/transaction/tx.html @@ -51,12 +51,14 @@ -
-
+
+ show input {{ v_index }} + show all +

{{$root.currency.getConvertion(vin.value)}}

-    +    {{vin.addr}} {{vin.addr}}
@@ -65,11 +67,10 @@
Double spent attempt detected. From tx: {{vin.doubleSpentTxID}},{{vin.doubleSpentIndex}}
-
-
+
scriptSig {{vin.scriptSig.asm}} @@ -78,18 +79,20 @@
-
- -