graphql: use returndata instead of return

Return() checks if there is an error. If an error is found, we return nil.
For most use cases it can be beneficial to return the output even if there
was an error. This code should be changed anyway once the spec supports
error reasons in graphql responses
This commit is contained in:
Marius van der Wijden 2020-05-27 10:14:40 +02:00 committed by Péter Szilágyi
parent d77770d96e
commit 9f13c66fbd
No known key found for this signature in database
GPG key ID: E9AE538CEDF8293D

View file

@ -813,7 +813,7 @@ func (b *Block) Call(ctx context.Context, args struct {
}
//TODO(rjl493456442, MariusVanDerWijden) return revert reason here once the spec supports an error reason.
return &CallResult{
data: result.Return(),
data: result.ReturnData,
gasUsed: hexutil.Uint64(result.UsedGas),
status: status,
}, nil
@ -883,7 +883,7 @@ func (p *Pending) Call(ctx context.Context, args struct {
}
//TODO(rjl493456442, MariusVanDerWijden) return revert reason here once the spec supports an error reason.
return &CallResult{
data: result.Return(),
data: result.ReturnData,
gasUsed: hexutil.Uint64(result.UsedGas),
status: status,
}, nil