Skip to content

Commit

Permalink
fix empty topics in a non-breaking way (#35)
Browse files Browse the repository at this point in the history
related: evmos#840
  • Loading branch information
yihuang committed Dec 16, 2021
1 parent d5775ee commit c91948b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ Ref: https://keepachangelog.com/en/1.0.0/
### Bug Fixes

* (rpc) [tharsis#667](https://github.com/tharsis/ethermint/issues/667) Fix `ExpandHome` restrictions bypass
* (rpc) [tharsis#]() fix empty topics in a non-breaking way

## [v0.7.1] - 2021-10-08

Expand Down
8 changes: 7 additions & 1 deletion rpc/ethereum/backend/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,5 +155,11 @@ func TxLogsFromEvents(events []abci.Event) ([]*ethtypes.Log, error) {
logs = append(logs, &log)
}
}
return evmtypes.LogsToEthereum(logs), nil
ethLogs := evmtypes.LogsToEthereum(logs)
for i := range ethLogs {
if ethLogs[i].Topics == nil {
ethLogs[i].Topics = make([]common.Hash, 0)
}
}
return ethLogs, nil
}

0 comments on commit c91948b

Please sign in to comment.