From ab33d9c2ba609cd067c3fc412865d49d1cb428ce Mon Sep 17 00:00:00 2001 From: denbite Date: Tue, 24 Sep 2024 18:29:59 +0200 Subject: [PATCH] fix!: rename field that counts request identifiers --- src/lib.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 5519b4f..d3f2a02 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -22,8 +22,8 @@ use primitives::{ #[derive(PanicOnDefault)] #[near(contract_state)] pub struct Contract { - /// Last available id for the requests. - pub last_request_id: RequestId, + /// Next available id for the requests. + pub next_request_id: RequestId, /// Map of signing requests pub requests: LookupMap, /// MPC Account ID @@ -36,7 +36,7 @@ impl Contract { #[init] pub fn new(mpc_contract_id: AccountId) -> Self { Self { - last_request_id: 0, + next_request_id: 0, requests: LookupMap::new(StorageKey::AllRequests), mpc_contract_id: mpc_contract_id.clone(), } @@ -102,8 +102,8 @@ impl Contract { panic!("{}", validation_error); }; - let current_request_id = self.last_request_id; - self.last_request_id += 1; + let current_request_id = self.next_request_id; + self.next_request_id += 1; let internal_request = Request { id: current_request_id,