remove check for duplicated addresses for our Headermemo
This commit is contained in:
@@ -1453,16 +1453,16 @@ impl LightWallet {
|
|||||||
return Err("Need at least one destination address".to_string());
|
return Err("Need at least one destination address".to_string());
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check for duplicates in the to list
|
// Check for duplicates in the to list - We need that for HushChat
|
||||||
if tos.len() > 1 {
|
// if tos.len() > 1 {
|
||||||
let mut to_addresses = tos.iter().map(|t| t.0.to_string()).collect::<Vec<_>>();
|
// let mut to_addresses = tos.iter().map(|t| t.0.to_string()).collect::<Vec<_>>();
|
||||||
to_addresses.sort();
|
// to_addresses.sort();
|
||||||
for i in 0..to_addresses.len()-1 {
|
// for i in 0..to_addresses.len()-1 {
|
||||||
if to_addresses[i] == to_addresses[i+1] {
|
// if to_addresses[i] == to_addresses[i+1] {
|
||||||
return Err(format!("To address {} is duplicated", to_addresses[i]));
|
// return Err(format!("To address {} is duplicated", to_addresses[i]));
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
let total_value = tos.iter().map(|to| to.1).sum::<u64>() as u64;
|
let total_value = tos.iter().map(|to| to.1).sum::<u64>() as u64;
|
||||||
println!(
|
println!(
|
||||||
|
|||||||
Reference in New Issue
Block a user