From 4b0addbe989b5dacf91957203b1aab12cca395f1 Mon Sep 17 00:00:00 2001 From: Martin Boehm Date: Fri, 5 Apr 2019 17:13:56 +0200 Subject: [PATCH] Preserve socket.io BlockTimestamp backward compatibility --- server/socketio.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/server/socketio.go b/server/socketio.go index a1790762..4b350f27 100644 --- a/server/socketio.go +++ b/server/socketio.go @@ -328,13 +328,15 @@ func txToResTx(tx *api.Tx) resTx { outputs[i] = output } var h int + var blocktime int64 if tx.Confirmations == 0 { h = -1 } else { h = int(tx.Blockheight) + blocktime = tx.Blocktime } return resTx{ - BlockTimestamp: tx.Blocktime, + BlockTimestamp: blocktime, FeeSatoshis: tx.FeesSat.AsInt64(), Hash: tx.Txid, Height: h,