From 175c84187098d8110eb4dc39a3a9aafd250daf2c Mon Sep 17 00:00:00 2001 From: Martin Boehm Date: Mon, 17 Sep 2018 11:54:40 +0200 Subject: [PATCH] Show tx hex in transaction detail in explorer --- api/types.go | 2 +- api/worker.go | 2 +- static/templates/base.html | 2 +- static/templates/tx.html | 6 ++++++ 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/api/types.go b/api/types.go index 22d8d15c..83b3287a 100644 --- a/api/types.go +++ b/api/types.go @@ -77,7 +77,7 @@ type Tx struct { Size int `json:"size,omitempty"` ValueIn string `json:"valueIn"` Fees string `json:"fees"` - WithSpends bool `json:"withSpends,omitempty"` + Hex string `json:"hex"` } type Paging struct { diff --git a/api/worker.go b/api/worker.go index 6c018d7a..861b55e6 100644 --- a/api/worker.go +++ b/api/worker.go @@ -173,12 +173,12 @@ func (w *Worker) GetTransaction(txid string, bestheight uint32, spendingTxs bool Confirmations: bchainTx.Confirmations, Fees: w.chainParser.AmountToDecimalString(&feesSat), Locktime: bchainTx.LockTime, - WithSpends: spendingTxs, Time: bchainTx.Time, Txid: bchainTx.Txid, ValueIn: w.chainParser.AmountToDecimalString(&valInSat), ValueOut: w.chainParser.AmountToDecimalString(&valOutSat), Version: bchainTx.Version, + Hex: bchainTx.Hex, Vin: vins, Vout: vouts, } diff --git a/static/templates/base.html b/static/templates/base.html index 9d0b049d..c732992f 100644 --- a/static/templates/base.html +++ b/static/templates/base.html @@ -16,7 +16,7 @@