Skip to content

Commit

Permalink
fix: fix authwit package (#7204)
Browse files Browse the repository at this point in the history
#7180 broke aztec-nr
as it's renamed a function without updating all references to it
  • Loading branch information
TomAFrench authored Jun 26, 2024
1 parent 646d45a commit 98ccd41
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}" }
Expand Down
6 changes: 3 additions & 3 deletions noir-projects/aztec-nr/authwit/src/cheatcodes.nr
Original file line number Diff line number Diff line change
Expand Up @@ -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<C, M, T, P, Env>(
on_behalf_of: AztecAddress,
Expand All @@ -18,7 +18,7 @@ pub fn add_private_authwit_from_call_interface<C, M, T, P, Env>(
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);
}

Expand All @@ -36,7 +36,7 @@ pub fn add_public_authwit_from_call_interface<C, M, T, P, Env>(
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);
Expand Down

0 comments on commit 98ccd41

Please sign in to comment.