From 8e248b773ffe4ba4a1a5380094bcfa2c95c691d1 Mon Sep 17 00:00:00 2001 From: Scott Piriou <30843220+pscott@users.noreply.github.com> Date: Wed, 9 Oct 2024 16:07:16 +0200 Subject: [PATCH 1/2] change proposal validation error message --- starknet/src/space/space.cairo | 2 +- starknet/src/tests/space/space.cairo | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/starknet/src/space/space.cairo b/starknet/src/space/space.cairo index bd8565e5..47c7efc2 100644 --- a/starknet/src/space/space.cairo +++ b/starknet/src/space/space.cairo @@ -259,7 +259,7 @@ mod Space { proposal_validation_strategy.params.span(), user_proposal_validation_params.span() ); - assert(is_valid, 'Proposal is not valid'); + assert(is_valid, 'User cannot create a proposal'); // The snapshot block timestamp is the start of the voting period let start_timestamp = info::get_block_timestamp().try_into().unwrap() diff --git a/starknet/src/tests/space/space.cairo b/starknet/src/tests/space/space.cairo index 58259d7a..6fedf776 100644 --- a/starknet/src/tests/space/space.cairo +++ b/starknet/src/tests/space/space.cairo @@ -446,7 +446,7 @@ mod tests { #[test] #[available_gas(10000000000)] - #[should_panic(expected: ('Proposal is not valid', 'ENTRYPOINT_FAILED'))] + #[should_panic(expected: ('User cannot create a proposal', 'ENTRYPOINT_FAILED'))] fn propose_failed_validation() { let config = setup(); let (_, space) = deploy(@config); From 0bfc14da586723f1d9e45643dd475091324ea37d Mon Sep 17 00:00:00 2001 From: Scott Piriou <30843220+pscott@users.noreply.github.com> Date: Fri, 18 Oct 2024 11:14:58 +0200 Subject: [PATCH 2/2] change wording to 'proposal validaton failed' --- starknet/src/space/space.cairo | 2 +- starknet/src/tests/space/space.cairo | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/starknet/src/space/space.cairo b/starknet/src/space/space.cairo index 47c7efc2..2af235c4 100644 --- a/starknet/src/space/space.cairo +++ b/starknet/src/space/space.cairo @@ -259,7 +259,7 @@ mod Space { proposal_validation_strategy.params.span(), user_proposal_validation_params.span() ); - assert(is_valid, 'User cannot create a proposal'); + assert(is_valid, 'Proposal validation failed'); // The snapshot block timestamp is the start of the voting period let start_timestamp = info::get_block_timestamp().try_into().unwrap() diff --git a/starknet/src/tests/space/space.cairo b/starknet/src/tests/space/space.cairo index 6fedf776..c844b05f 100644 --- a/starknet/src/tests/space/space.cairo +++ b/starknet/src/tests/space/space.cairo @@ -446,7 +446,7 @@ mod tests { #[test] #[available_gas(10000000000)] - #[should_panic(expected: ('User cannot create a proposal', 'ENTRYPOINT_FAILED'))] + #[should_panic(expected: ('Proposal validation failed', 'ENTRYPOINT_FAILED'))] fn propose_failed_validation() { let config = setup(); let (_, space) = deploy(@config);