diff --git a/sylvia-derive/src/contract/communication/reply.rs b/sylvia-derive/src/contract/communication/reply.rs index 0755c499..0a528200 100644 --- a/sylvia-derive/src/contract/communication/reply.rs +++ b/sylvia-derive/src/contract/communication/reply.rs @@ -217,7 +217,7 @@ impl<'a> ReplyData<'a> { }; if self.payload.len() != new_handler.fields().len() - 1 { - emit_error!(current_method_name.span(), "Mismatched lenght of method parameters."; + emit_error!(current_method_name.span(), "Mismatched quantity of method parameters."; note = self.handler_id.span() => format!("Both `{}` handlers should have the same number of parameters.", self.handler_id); note = new_handler.function_name().span() => format!("Previous definition of {} handler.", self.handler_id) ); diff --git a/sylvia/tests/reply.rs b/sylvia/tests/reply.rs index c54d5155..4c50daaf 100644 --- a/sylvia/tests/reply.rs +++ b/sylvia/tests/reply.rs @@ -108,7 +108,8 @@ where .with_label("noop") .build() .remote_instantiated(to_json_binary(&payload)?)?; - // Blocked by https://github.com/CosmWasm/cw-multi-test/pull/216. + // TODO: Blocked by https://github.com/CosmWasm/cw-multi-test/pull/216. Uncomment when new + // MultiTest version is released. // Payload is not currently forwarded in the MultiTest. // .remote_instantiated(payload)?; @@ -215,7 +216,8 @@ where &self, ctx: ReplyCtx, data: Option, - // Blocked by https://github.com/CosmWasm/cw-multi-test/pull/216. + // TODO: Blocked by https://github.com/CosmWasm/cw-multi-test/pull/216. Uncomment when new + // MultiTest version is released. // Payload is not currently forwarded in the MultiTest. // _instantiate_payload: InstantiatePayload, #[sv::payload] _payload: Binary, diff --git a/sylvia/tests/ui/method_signature/reply.rs b/sylvia/tests/ui/method_signature/reply.rs index 936adc8a..3ab7925f 100644 --- a/sylvia/tests/ui/method_signature/reply.rs +++ b/sylvia/tests/ui/method_signature/reply.rs @@ -29,7 +29,7 @@ pub mod mismatched_params { } #[sv::msg(reply, handlers=[on_instantiated], reply_on=failure)] - fn first_reply( + fn second_reply( &self, _ctx: ReplyCtx, _data: Option, @@ -40,7 +40,7 @@ pub mod mismatched_params { } } -pub mod mismatched_param_lenght { +pub mod mismatched_param_arity { use super::*; pub struct Contract {} @@ -67,7 +67,7 @@ pub mod mismatched_param_lenght { } #[sv::msg(reply, handlers=[on_instantiated], reply_on=failure)] - fn first_reply( + fn second_reply( &self, _ctx: ReplyCtx, _data: Option, diff --git a/sylvia/tests/ui/method_signature/reply.stderr b/sylvia/tests/ui/method_signature/reply.stderr index aca31028..b908c1f5 100644 --- a/sylvia/tests/ui/method_signature/reply.stderr +++ b/sylvia/tests/ui/method_signature/reply.stderr @@ -8,7 +8,7 @@ error: Mismatched parameter in reply handlers. 26 | param: String, | ^^^^^ -error: Mismatched lenght of method parameters. +error: Mismatched quantity of method parameters. = note: Both `on_instantiated` handlers should have the same number of parameters. = note: Previous definition of on_instantiated handler.