Open
Description
When a secret contract attempts to do the Rewards query from the Distribution module like follows (where delegator is the HumanAddr whose rewards you want to view):
let rewards_resp: RewardsResponse = deps.querier.query(&QueryRequest::Dist(DistQuery::Rewards {
delegator,
}))?;
If the delegator does not have any pending rewards, the query returns a null response which causes a parse error. Instead it should always return a valid RewardsResponse
, but when there are no rewards, the rewards
and total
fields should be empty Vecs.