Skip to content

Commit

Permalink
Fabo/add logs to txs v2 (#487)
Browse files Browse the repository at this point in the history
* add logs to txs v2

* better logic
  • Loading branch information
faboweb authored Mar 20, 2020
1 parent 5a21530 commit a21fbf8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/reducers/cosmosV0-reducers.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
1 change: 1 addition & 0 deletions lib/schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,7 @@ const typeDefs = gql`
memo: String
fees: [Coin]!
success: Boolean!
log: String
}
type SendTx {
Expand Down

0 comments on commit a21fbf8

Please sign in to comment.