Skip to content
Snippets Groups Projects

feat(runtime): create UDs manually with new call universalDividend.claim_uds

Merged Éloïs requested to merge elois-manual-ud into master
All threads resolved!
3 files
+ 36
31
Compare changes
  • Side-by-side
  • Inline
Files
3
@@ -620,32 +620,3 @@ where
@@ -620,32 +620,3 @@ where
Ok(result)
Ok(result)
}
}
}
}
pub struct IdtyDataIter<T: Config>(
Box<dyn Iterator<Item = IdtyValue<T::BlockNumber, T::AccountId, T::IdtyData>>>,
);
impl<T: Config> From<Option<Vec<u8>>> for IdtyDataIter<T> {
fn from(maybe_key: Option<Vec<u8>>) -> Self {
let mut iter = Identities::<T>::iter_values();
if let Some(key) = maybe_key {
iter.set_last_raw_key(key);
}
Self(Box::new(iter))
}
}
impl<T: Config> Iterator for IdtyDataIter<T> {
type Item = (T::AccountId, T::IdtyData);
fn next(&mut self) -> Option<Self::Item> {
if let Some(IdtyValue {
owner_key, data, ..
}) = self.0.next()
{
Some((owner_key, data))
} else {
None
}
}
}
Loading