mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 22:11:06 +00:00
* rename StorageMap::exists(key) to ::contains_key(key) * bump impl_version
This commit is contained in:
@@ -887,13 +887,13 @@ decl_module! {
|
||||
) {
|
||||
let stash = ensure_signed(origin)?;
|
||||
|
||||
if <Bonded<T>>::exists(&stash) {
|
||||
if <Bonded<T>>::contains_key(&stash) {
|
||||
Err(Error::<T>::AlreadyBonded)?
|
||||
}
|
||||
|
||||
let controller = T::Lookup::lookup(controller)?;
|
||||
|
||||
if <Ledger<T>>::exists(&controller) {
|
||||
if <Ledger<T>>::contains_key(&controller) {
|
||||
Err(Error::<T>::AlreadyPaired)?
|
||||
}
|
||||
|
||||
@@ -1139,7 +1139,7 @@ decl_module! {
|
||||
let stash = ensure_signed(origin)?;
|
||||
let old_controller = Self::bonded(&stash).ok_or(Error::<T>::NotStash)?;
|
||||
let controller = T::Lookup::lookup(controller)?;
|
||||
if <Ledger<T>>::exists(&controller) {
|
||||
if <Ledger<T>>::contains_key(&controller) {
|
||||
Err(Error::<T>::AlreadyPaired)?
|
||||
}
|
||||
if controller != old_controller {
|
||||
|
||||
Reference in New Issue
Block a user