diff --git a/crates/holoom_dna_tests/src/tests/username_registry/wallet_attestation.rs b/crates/holoom_dna_tests/src/tests/username_registry/wallet_attestation.rs index ec3c64c..fe21c31 100644 --- a/crates/holoom_dna_tests/src/tests/username_registry/wallet_attestation.rs +++ b/crates/holoom_dna_tests/src/tests/username_registry/wallet_attestation.rs @@ -109,7 +109,7 @@ async fn checks_validity_of_solana_wallet_attestation() { let solana_signature = signing_key.try_sign(message.as_bytes()).unwrap(); let chain_wallet_signature = ChainWalletSignature::Solana { - solana_address, + solana_address: Box::new(solana_address), solana_signature, }; @@ -130,7 +130,7 @@ async fn checks_validity_of_solana_wallet_attestation() { let malicious_attestation = WalletAttestation { chain_wallet_signature: ChainWalletSignature::Solana { - solana_address, + solana_address: Box::new(solana_address), solana_signature, }, agent: setup.alice_pubkey(), diff --git a/crates/holoom_rocket_controllers/src/username_registry.rs b/crates/holoom_rocket_controllers/src/username_registry.rs index dd5e3fe..dd07c17 100644 --- a/crates/holoom_rocket_controllers/src/username_registry.rs +++ b/crates/holoom_rocket_controllers/src/username_registry.rs @@ -98,7 +98,7 @@ pub async fn wallets( .collect(); let solana_addresses = wallet_attestations - .iter() + .into_iter() .filter_map(|wa| match wa.chain_wallet_signature { ChainWalletSignature::Solana { solana_address, .. } => { Some(bs58::encode(solana_address.as_bytes()).into_string()) diff --git a/crates/holoom_types/src/lib.rs b/crates/holoom_types/src/lib.rs index d7a9374..6a25562 100644 --- a/crates/holoom_types/src/lib.rs +++ b/crates/holoom_types/src/lib.rs @@ -71,7 +71,7 @@ pub enum ChainWalletSignature { evm_signature: EvmSignature, }, Solana { - solana_address: SolanaAddress, + solana_address: Box, solana_signature: SolanaSignature, }, } diff --git a/crates/username_registry_validation/src/wallet_attestation.rs b/crates/username_registry_validation/src/wallet_attestation.rs index 6675426..17df729 100644 --- a/crates/username_registry_validation/src/wallet_attestation.rs +++ b/crates/username_registry_validation/src/wallet_attestation.rs @@ -57,11 +57,11 @@ fn verify_evm_signature( fn verify_solana_signature( solana_signature: SolanaSignature, - solana_address: SolanaAddress, + solana_address: &SolanaAddress, agent: AgentPubKey, prev_action: ActionHash, ) -> ExternResult { - let message = solana_signing_message(&solana_address, agent, prev_action); + let message = solana_signing_message(solana_address, agent, prev_action); match solana_address.verify_strict(message.as_bytes(), &solana_signature) { Ok(()) => Ok(ValidateCallbackResult::Valid), Err(_) => Ok(ValidateCallbackResult::Invalid( @@ -101,7 +101,7 @@ pub fn validate_create_wallet_attestation( solana_signature, } => verify_solana_signature( solana_signature, - solana_address, + &solana_address, wallet_attestation.agent, wallet_attestation.prev_action, ),