From 4dbdc213f73a3ef97c43f986819d8c74bc77f525 Mon Sep 17 00:00:00 2001 From: Vlad Date: Thu, 16 Nov 2023 17:31:02 -0500 Subject: [PATCH] fix tests --- .../examples/warp-funding-account-schema.rs | 3 --- contracts/warp-resolver/src/tests.rs | 4 ++-- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/contracts/warp-funding-account/examples/warp-funding-account-schema.rs b/contracts/warp-funding-account/examples/warp-funding-account-schema.rs index 1f9d1db8..5bba9a44 100644 --- a/contracts/warp-funding-account/examples/warp-funding-account-schema.rs +++ b/contracts/warp-funding-account/examples/warp-funding-account-schema.rs @@ -2,7 +2,6 @@ use std::env::current_dir; use std::fs::create_dir_all; use controller::{ - account::{FundingAccountResponse, FundingAccountsResponse}, job::{JobResponse, JobsResponse}, }; use cosmwasm_schema::{export_schema, remove_schemas, schema_for}; @@ -19,6 +18,4 @@ fn main() { export_schema(&schema_for!(Config), &out_dir); export_schema(&schema_for!(JobResponse), &out_dir); export_schema(&schema_for!(JobsResponse), &out_dir); - export_schema(&schema_for!(FundingAccountResponse), &out_dir); - export_schema(&schema_for!(FundingAccountsResponse), &out_dir); } diff --git a/contracts/warp-resolver/src/tests.rs b/contracts/warp-resolver/src/tests.rs index bcfa91e9..a1422906 100644 --- a/contracts/warp-resolver/src/tests.rs +++ b/contracts/warp-resolver/src/tests.rs @@ -13,7 +13,7 @@ use cosmwasm_std::{ use crate::contract::query; use cosmwasm_schema::cw_serde; use cosmwasm_std::testing::{mock_info, MockApi, MockQuerier, MockStorage}; -use cosmwasm_std::{from_slice, Empty, Querier, QueryRequest, SystemError, SystemResult}; +use cosmwasm_std::{from_json, Empty, Querier, QueryRequest, SystemError, SystemResult}; use resolver::variable::{ FnValue, QueryExpr, QueryVariable, StaticVariable, Variable, VariableKind, @@ -82,7 +82,7 @@ pub struct WasmMockQuerier { impl Querier for WasmMockQuerier { fn raw_query(&self, bin_request: &[u8]) -> SystemResult> { - let request: QueryRequest = match from_slice(bin_request) { + let request: QueryRequest = match from_json(bin_request) { Ok(v) => v, Err(e) => { return SystemResult::Err(SystemError::InvalidRequest {