mobile: fixed FilterLogs

It used to write a pointer to a local variable, that led to fill a result array with the latest log
This commit is contained in:
Eugene Valeyev 2017-11-03 13:17:45 +03:00 committed by GitHub
parent 0131bd6ff9
commit 7d785c14e1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -199,7 +199,7 @@ func (ec *EthereumClient) FilterLogs(ctx *Context, query *FilterQuery) (logs *Lo
// Temp hack due to vm.Logs being []*vm.Log // Temp hack due to vm.Logs being []*vm.Log
res := make([]*types.Log, len(rawLogs)) res := make([]*types.Log, len(rawLogs))
for i, log := range rawLogs { for i, log := range rawLogs {
res[i] = &log res[i] = &rawLogs[i]
} }
return &Logs{res}, nil return &Logs{res}, nil
} }