From b2f24e82f9e267463e87e79e002a8c4349cd8139 Mon Sep 17 00:00:00 2001 From: Martin Boehm Date: Wed, 2 May 2018 16:51:14 +0200 Subject: [PATCH] Fix bitcore incompatible lookupDetailedTransaction in test.html --- static/test.html | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/static/test.html b/static/test.html index 45c27e86..c911fe34 100644 --- a/static/test.html +++ b/static/test.html @@ -182,12 +182,18 @@ function lookupDetailedTransaction(hash, format, f) { const method = 'getDetailedTransaction'; - const params = [ + const af = parseInt(format) + var params = [ hash, - { - addressFormat: parseInt(format), - }, ]; + if (af !== 0) { + params = [ + hash, + { + addressFormat: af, + }, + ]; + } return socket.send({ method, params }, f); } @@ -437,4 +443,4 @@ document.getElementById('serverAddress').value = window.location.protocol.replace("http", "ws") + "//" + window.location.host; - + \ No newline at end of file