Skip to content

Commit

Permalink
improve function name for callstack element
Browse files Browse the repository at this point in the history
  • Loading branch information
jonas089 committed Apr 18, 2024
1 parent 25352c3 commit 42afe4c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions kairos-contracts/demo-contract/contract/src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ pub mod events;
use errors::DepositError;

/// Wrap the immediate caller as a Key and return it
fn call_stack_element_to_address(call_stack_element: CallStackElement) -> Key {
fn call_stack_element_to_key(call_stack_element: CallStackElement) -> Key {
match call_stack_element {
CallStackElement::Session { account_hash } => Key::from(account_hash),
CallStackElement::StoredSession { account_hash, .. } => {
Expand All @@ -33,6 +33,6 @@ pub(crate) fn get_immediate_caller() -> Result<Key, DepositError> {
.into_iter()
.rev()
.nth(1)
.map(call_stack_element_to_address)
.map(call_stack_element_to_key)
.ok_or(DepositError::InvalidContext)
}
2 changes: 1 addition & 1 deletion kairos-contracts/rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[toolchain]
channel = "nightly-2024-01-04"
channel = "nightly-2024-01-04"

0 comments on commit 42afe4c

Please sign in to comment.