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(
128
128
129
129
/// Create a `RegistryInstruction::UpdateRegistry` instruction
130
130
pub fn update_registry (
131
- registry_account : & Pubkey ,
132
- owner : & Pubkey ,
131
+ owner_address : & Pubkey ,
133
132
proof_location : ProofLocation < PubkeyValidityProofData > ,
134
133
) -> 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 ) ] ;
136
137
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 ) ) ;
138
139
139
140
let registry_instruction = Instruction {
140
141
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() {
2884
2884
& spl_elgamal_registry:: id ( ) ,
2885
2885
) ;
2886
2886
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 ( ) ;
2893
2890
let tx = Transaction :: new_signed_with_payer (
2894
2891
& instructions,
2895
2892
Some ( & ctx. payer . pubkey ( ) ) ,
You can’t perform that action at this time.
0 commit comments