diff --git a/aries/aries_vcx/src/utils/encryption_envelope.rs b/aries/aries_vcx/src/utils/encryption_envelope.rs index 457bb93ebc..4f3020ba82 100644 --- a/aries/aries_vcx/src/utils/encryption_envelope.rs +++ b/aries/aries_vcx/src/utils/encryption_envelope.rs @@ -149,13 +149,18 @@ impl EncryptionEnvelope { ) -> VcxResult> { let mut forward_to_key = recipient_key; - for routing_key in routing_keys.iter() { + for routing_key in routing_keys { debug!( "Wrapping message in forward message; forward_to_key: {}, routing_key: {}", forward_to_key, routing_key ); - data = EncryptionEnvelope::wrap_into_forward(wallet, data, forward_to_key, routing_key) - .await?; + data = EncryptionEnvelope::wrap_into_forward( + wallet, + data, + forward_to_key.clone(), + routing_key.clone(), + ) + .await?; forward_to_key.clone_from(&routing_key); } Ok(data)