Skip to content
This repository has been archived by the owner on Apr 4, 2024. It is now read-only.

fix empty topics in a non-breaking way (#35) #848

Merged
merged 2 commits into from
Dec 16, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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#848](https://github.com/tharsis/ethermint/pull/848) 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
}