From 3fa51d78af6663c161a59dd7e852a6dff8fe5de1 Mon Sep 17 00:00:00 2001 From: Ethan Frey Date: Thu, 9 May 2024 14:37:51 +0200 Subject: [PATCH] More virtual staking cleanup --- contracts/consumer/virtual-staking/src/multitest.rs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/contracts/consumer/virtual-staking/src/multitest.rs b/contracts/consumer/virtual-staking/src/multitest.rs index 79c28351..032c08eb 100644 --- a/contracts/consumer/virtual-staking/src/multitest.rs +++ b/contracts/consumer/virtual-staking/src/multitest.rs @@ -1,4 +1,5 @@ use cosmwasm_std::{Addr, Decimal, Validator}; +use cw_multi_test::no_init; use sylvia::multitest::Proxy; use mesh_converter::contract::sv::mt::ConverterContractProxy; @@ -16,6 +17,11 @@ type MtApp = cw_multi_test::BasicApp< >; type App = sylvia::multitest::App; +fn new_app() -> App { + // Ideally there is a shorter way to do this + App::new(cw_multi_test::custom_app(no_init)) +} + struct SetupArgs<'a> { owner: &'a str, admin: &'a str, @@ -73,7 +79,7 @@ fn setup<'a>(app: &'a App, args: SetupArgs<'a>) -> SetupResponse<'a> { #[test] fn instantiation() { - let app = App::default(); + let app = new_app(); let owner = "sunny"; // Owner of the staking contract (i. e. the vault contract) let admin = "theman"; @@ -116,7 +122,8 @@ fn instantiation() { #[test] #[ignore] // FIXME: Enable / finish this test once custom query support is added to sylvia fn valset_update_sudo() { - let app = App::::default(); + + let app = new_app(); let owner = "sunny"; // Owner of the staking contract (i. e. the vault contract) let admin = "theman";