chore(state_machine); rename get_public_account to get_account_by_id_ref [skip ci]

This commit is contained in:
erhant 2026-07-29 11:55:10 +03:00
parent 931b0e9956
commit 0659774e43
2 changed files with 3 additions and 4 deletions

View File

@ -270,10 +270,9 @@ impl V03State {
.unwrap_or_else(Account::default)
}
/// Borrowing counterpart of [`Self::get_account_by_id`], for callers that
/// only inspect the account and would otherwise clone it to drop it.
/// Borrowing counterpart of [`Self::get_account_by_id`].
#[must_use]
pub fn get_public_account(&self, account_id: AccountId) -> Option<&Account> {
pub fn get_account_by_id_ref(&self, account_id: AccountId) -> Option<&Account> {
self.public_state.get(&account_id)
}

View File

@ -853,7 +853,7 @@ fn deposit_already_minted(state: &lee::V03State, deposit_op_id: HashType) -> boo
let receipt_id =
bridge_core::deposit_receipt_account_id(programs::bridge().id(), deposit_op_id.0);
state
.get_public_account(receipt_id)
.get_account_by_id_ref(receipt_id)
.is_some_and(|receipt| *receipt != lee::Account::default())
}