Skip to content

Commit

Permalink
optimize card game key retrieval
Browse files Browse the repository at this point in the history
  • Loading branch information
nventuro committed Aug 14, 2024
1 parent 7e2742c commit 398edac
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,10 @@ impl<Context> Deck<Context> {

impl Deck<&mut PrivateContext> {
pub fn add_cards<N>(&mut self, cards: [Card; N], owner: AztecAddress) -> [CardNote] {
let owner_npk_m_hash = get_current_public_keys(self.set.context, owner).npk_m.hash();
let owner_keys = get_current_public_keys(self.set.context, owner);
let owner_ivpk_m = owner_keys.ivpk_m;
let owner_npk_m_hash = owner_keys.npk_m.hash();
let msg_sender_ovpk_m = get_current_public_keys(self.set.context, self.set.context.msg_sender()).ovpk_m;
let owner_ivpk_m = get_current_public_keys(self.set.context, owner).ivpk_m;

let mut inserted_cards = &[];
for card in cards {
Expand Down

0 comments on commit 398edac

Please sign in to comment.