This repository was archived by the owner on Mar 11, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +8
-10
lines changed
confidential-transfer/elgamal-registry/src Expand file tree Collapse file tree 2 files changed +8
-10
lines changed Original file line number Diff line number Diff line change @@ -128,13 +128,14 @@ pub fn create_registry(
128128
129129/// Create a `RegistryInstruction::UpdateRegistry` instruction
130130pub fn update_registry (
131- registry_account : & Pubkey ,
132- owner : & Pubkey ,
131+ owner_address : & Pubkey ,
133132 proof_location : ProofLocation < PubkeyValidityProofData > ,
134133) -> Result < Vec < Instruction > , ProgramError > {
135- let mut accounts = vec ! [ AccountMeta :: new( * registry_account, false ) ] ;
134+ let elgamal_registry_address = get_elgamal_registry_address ( owner_address, & id ( ) ) ;
135+
136+ let mut accounts = vec ! [ AccountMeta :: new( elgamal_registry_address, false ) ] ;
136137 let proof_instruction_offset = proof_instruction_offset ( & mut accounts, proof_location) ;
137- accounts. push ( AccountMeta :: new_readonly ( * owner , true ) ) ;
138+ accounts. push ( AccountMeta :: new_readonly ( * owner_address , true ) ) ;
138139
139140 let registry_instruction = Instruction {
140141 program_id : id ( ) ,
Original file line number Diff line number Diff line change @@ -2884,12 +2884,9 @@ async fn confidential_transfer_configure_token_account_with_registry() {
28842884 & spl_elgamal_registry:: id ( ) ,
28852885 ) ;
28862886
2887- let instructions = spl_elgamal_registry:: instruction:: update_registry (
2888- & elgamal_registry_address,
2889- & alice. pubkey ( ) ,
2890- proof_location,
2891- )
2892- . unwrap ( ) ;
2887+ let instructions =
2888+ spl_elgamal_registry:: instruction:: update_registry ( & alice. pubkey ( ) , proof_location)
2889+ . unwrap ( ) ;
28932890 let tx = Transaction :: new_signed_with_payer (
28942891 & instructions,
28952892 Some ( & ctx. payer . pubkey ( ) ) ,
You can’t perform that action at this time.
0 commit comments