From f3d26b698355f76e96fbc5af1752fac24bbde111 Mon Sep 17 00:00:00 2001 From: Saketh Are Date: Thu, 15 Feb 2024 17:24:28 -0500 Subject: [PATCH] nits --- examples/mpc-contract/src/lib.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/examples/mpc-contract/src/lib.rs b/examples/mpc-contract/src/lib.rs index f6b31666c..da6e48ac2 100644 --- a/examples/mpc-contract/src/lib.rs +++ b/examples/mpc-contract/src/lib.rs @@ -52,7 +52,7 @@ impl MpcContract { DATA_ID_REGISTER, ); - // Record the pending request + // Store the request in the contract's local state let data_id: CryptoHash = env::read_register(DATA_ID_REGISTER).expect("").try_into().expect(""); self.requests.insert( @@ -60,6 +60,8 @@ impl MpcContract { &SignatureRequest { data_id, account_id: env::signer_account_id(), payload }, ); + // The return value for this function call will be the value + // returned by the `sign_on_finish` callback. env::promise_return(promise); } @@ -82,7 +84,7 @@ impl MpcContract { request_index: u64, #[callback_result] signature: Result, ) -> Option { - // clean up local state + // Clean up the local state self.requests.remove(&request_index); match signature {