diff --git a/crates/rooch-framework-tests/src/tests/transaction_validator_tests.rs b/crates/rooch-framework-tests/src/tests/transaction_validator_tests.rs index 8b23dd3a4c..c9c86750c8 100644 --- a/crates/rooch-framework-tests/src/tests/transaction_validator_tests.rs +++ b/crates/rooch-framework-tests/src/tests/transaction_validator_tests.rs @@ -192,8 +192,8 @@ fn test_session_key_ed25519() { // _ => panic!("expect move abort in module"), // } // let (_category, reason) = error::explain(code); - // // EFunctionCallBeyoundSessionScope = 5 - // assert_eq!(reason, 5, "expect EFunctionCallBeyoundSessionScope"); + // // EFunctionCallBeyondSessionScope = 5 + // assert_eq!(reason, 5, "expect EFunctionCallBeyondSessionScope"); // } // _ => panic!("expect move abort"), // } diff --git a/crates/rooch-framework/doc/session_key.md b/crates/rooch-framework/doc/session_key.md index 0629084f23..7d39b3b3a2 100644 --- a/crates/rooch-framework/doc/session_key.md +++ b/crates/rooch-framework/doc/session_key.md @@ -157,12 +157,12 @@ The session's scope ## Constants - + The function call is beyond the session's scope -
const EFunctionCallBeyoundSessionScope: u64 = 5;
+
const EFunctionCallBeyondSessionScope: u64 = 5;
 
@@ -400,7 +400,7 @@ If the session key is expired or invalid, abort the tx, otherwise return option: let session_key = option::extract(&mut session_key_option); assert!(!is_expired(ctx, &session_key), error::permission_denied(ESessionIsExpired)); - assert!(in_session_scope(ctx, &session_key), error::permission_denied(EFunctionCallBeyoundSessionScope)); + assert!(in_session_scope(ctx, &session_key), error::permission_denied(EFunctionCallBeyondSessionScope)); validator::validate_signature(&authenticator_payload, &storage_context::tx_hash(ctx)); option::some(auth_key) diff --git a/crates/rooch-framework/error_description.errmap b/crates/rooch-framework/error_description.errmap index 7540c76e96..34df8dae8b 100644 Binary files a/crates/rooch-framework/error_description.errmap and b/crates/rooch-framework/error_description.errmap differ diff --git a/crates/rooch-framework/sources/session_key.move b/crates/rooch-framework/sources/session_key.move index 54b04365f3..6136ed46b3 100644 --- a/crates/rooch-framework/sources/session_key.move +++ b/crates/rooch-framework/sources/session_key.move @@ -21,7 +21,7 @@ module rooch_framework::session_key { /// The session is expired const ESessionIsExpired: u64 = 4; /// The function call is beyond the session's scope - const EFunctionCallBeyoundSessionScope: u64 = 5; + const EFunctionCallBeyondSessionScope: u64 = 5; /// The session's scope struct SessionScope has store,copy,drop { @@ -131,7 +131,7 @@ module rooch_framework::session_key { let session_key = option::extract(&mut session_key_option); assert!(!is_expired(ctx, &session_key), error::permission_denied(ESessionIsExpired)); - assert!(in_session_scope(ctx, &session_key), error::permission_denied(EFunctionCallBeyoundSessionScope)); + assert!(in_session_scope(ctx, &session_key), error::permission_denied(EFunctionCallBeyondSessionScope)); validator::validate_signature(&authenticator_payload, &storage_context::tx_hash(ctx)); option::some(auth_key)