diff --git a/noir-projects/noir-contracts/contracts/card_game_contract/src/cards.nr b/noir-projects/noir-contracts/contracts/card_game_contract/src/cards.nr index cad965f355c..ac590beb7e6 100644 --- a/noir-projects/noir-contracts/contracts/card_game_contract/src/cards.nr +++ b/noir-projects/noir-contracts/contracts/card_game_contract/src/cards.nr @@ -103,9 +103,10 @@ impl Deck { impl Deck<&mut PrivateContext> { pub fn add_cards(&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 {