diff --git a/test/src/handler_helpers.rs b/test/src/handler_helpers.rs index 7c8a3c46..38b4bfb2 100644 --- a/test/src/handler_helpers.rs +++ b/test/src/handler_helpers.rs @@ -34,7 +34,7 @@ impl TestHandler { general_init_state(&mut new_context, &init_account)?; let mut effect = new_context.derive_effect(); let handler = H::init_state(&mut effect, init_account)?; - context.apply_effect(effect)?; + new_context.apply_effect(effect)?; swap(context, &mut new_context); Ok(Self { handler }) }