From a21fbf8866eb2ef66f74850413012639e797cff5 Mon Sep 17 00:00:00 2001 From: Fabian Date: Fri, 20 Mar 2020 11:08:12 -0500 Subject: [PATCH] Fabo/add logs to txs v2 (#487) * add logs to txs v2 * better logic --- lib/reducers/cosmosV0-reducers.js | 8 +++++++- lib/schema.js | 1 + 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/reducers/cosmosV0-reducers.js b/lib/reducers/cosmosV0-reducers.js index 2ea23caa27..cb84a2a6b2 100644 --- a/lib/reducers/cosmosV0-reducers.js +++ b/lib/reducers/cosmosV0-reducers.js @@ -553,7 +553,13 @@ function transactionReducerV2(transaction, reducers, stakingDenom) { success: transaction.logs && transaction.logs[index] ? transaction.logs[index].success || false - : false + : false, + log: + transaction.logs && transaction.logs[index] + ? transaction.logs[index].log + : transaction.logs[0] // failing txs show the first logs + ? transaction.logs[0].log + : '' })) return returnedMessages } diff --git a/lib/schema.js b/lib/schema.js index 3f097f003a..ec9372c2a5 100644 --- a/lib/schema.js +++ b/lib/schema.js @@ -203,6 +203,7 @@ const typeDefs = gql` memo: String fees: [Coin]! success: Boolean! + log: String } type SendTx {