From b41fa16e75ac68906af70eb88db1b7033440a30c Mon Sep 17 00:00:00 2001 From: IoTMOD Date: Thu, 12 Dec 2019 21:36:05 +0100 Subject: [PATCH] Fix Trinity compatibility --- plugins/webapi/transactions.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/plugins/webapi/transactions.go b/plugins/webapi/transactions.go index 9e95d5d07..227ea1dc0 100644 --- a/plugins/webapi/transactions.go +++ b/plugins/webapi/transactions.go @@ -6,12 +6,12 @@ import ( "strconv" "github.com/gin-gonic/gin" + "github.com/gohornet/hornet/packages/model/tangle" + "github.com/gohornet/hornet/plugins/gossip" "github.com/iotaledger/hive.go/parameter" "github.com/iotaledger/iota.go/address" "github.com/iotaledger/iota.go/trinary" "github.com/mitchellh/mapstructure" - "github.com/gohornet/hornet/packages/model/tangle" - "github.com/gohornet/hornet/plugins/gossip" ) func init() { @@ -79,8 +79,7 @@ func findTransactions(i interface{}, c *gin.Context) { txHashes := []string{} if len(ft.Bundles) == 0 && len(ft.Addresses) == 0 { - e.Error = "Nothing to search for" - c.JSON(http.StatusBadRequest, e) + c.JSON(http.StatusOK, FindTransactionsReturn{Hashes: []string{}}) return }