From e509378fed3e236bef213f7aded4abd138e9b9f4 Mon Sep 17 00:00:00 2001 From: TomAFrench Date: Wed, 26 Jun 2024 19:44:02 +0000 Subject: [PATCH] fix: fix authwit package --- .github/workflows/ci.yml | 2 +- noir-projects/aztec-nr/authwit/src/cheatcodes.nr | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 196a9efb59a8..faccce27cb00 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -362,7 +362,7 @@ jobs: noir-format: needs: [setup, changes] runs-on: ${{ github.event.pull_request.user.login || github.actor }}-x86 - if: ${{ needs.changes.outputs.noir == 'true' }} + if: ${{ needs.changes.outputs.noir == 'true' || needs.changes.outputs.noir-projects == 'true' }} steps: - uses: actions/checkout@v4 with: { ref: "${{ env.GIT_COMMIT }}" } diff --git a/noir-projects/aztec-nr/authwit/src/cheatcodes.nr b/noir-projects/aztec-nr/authwit/src/cheatcodes.nr index f673a2032772..baec83f8016c 100644 --- a/noir-projects/aztec-nr/authwit/src/cheatcodes.nr +++ b/noir-projects/aztec-nr/authwit/src/cheatcodes.nr @@ -4,7 +4,7 @@ use dep::aztec::{ hash::hash_args }; -use crate::auth::{compute_inner_authwit_hash, compute_outer_authwit_hash, set_authorized}; +use crate::auth::{compute_inner_authwit_hash, compute_authwit_message_hash, set_authorized}; pub fn add_private_authwit_from_call_interface( on_behalf_of: AztecAddress, @@ -18,7 +18,7 @@ pub fn add_private_authwit_from_call_interface( let args_hash = hash_args(call_interface.get_args()); let selector = call_interface.get_selector(); let inner_hash = compute_inner_authwit_hash([caller.to_field(), selector.to_field(), args_hash]); - let message_hash = compute_outer_authwit_hash(target, chain_id, version, inner_hash); + let message_hash = compute_authwit_message_hash(target, chain_id, version, inner_hash); cheatcodes::add_authwit(on_behalf_of, message_hash); } @@ -36,7 +36,7 @@ pub fn add_public_authwit_from_call_interface( let args_hash = hash_args(call_interface.get_args()); let selector = call_interface.get_selector(); let inner_hash = compute_inner_authwit_hash([caller.to_field(), selector.to_field(), args_hash]); - let message_hash = compute_outer_authwit_hash(target, chain_id, version, inner_hash); + let message_hash = compute_authwit_message_hash(target, chain_id, version, inner_hash); let mut inputs = cheatcodes::get_public_context_inputs(); let mut context = PublicContext::new(inputs); set_authorized(&mut context, message_hash, true);