Skip to content

DeserializeOwned issue for Proto Stargate Queries #147

@CalicoNino

Description

@CalicoNino
the trait bound `QueryExchangeRateResponse: DeserializeOwned` is not satisfied
required for `QueryExchangeRateResponse` to implement `DeserializeOwned`rustc[Click for full compiler diagnostic](rust-analyzer-diagnostics-view:/diagnostic%20message%20%5B0%5D?0#file%3A%2F%2F%2Fhome%2Fcalico%2Fworkshops%2Fcw-workshop%2Fsrc%2Fcontract.rs)
traits.rs(242, 21): required by a bound in `QuerierWrapper::<'a, C>::query`

Error from here

    pub fn get_price(deps: Deps, pair: String) -> StdResult<GetPriceResp> {
        let query_request = QueryExchangeRateRequest { pair: pair.clone() };

        let query = query_request.into_stargate_query()?;

        let response: QueryExchangeRateResponse = deps.querier.query(&query)?; //error apears on .query

        Ok(response)
    }

Metadata

Metadata

Labels

Type

Projects

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions