Skip to content

Commit

Permalink
fix init_exchange_relationship (paritytech#117)
Browse files Browse the repository at this point in the history
fix init_exchange_relationship
  • Loading branch information
toxotguo authored Nov 22, 2018
1 parent 327447b commit b8a6ae3
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions cxrml/associations/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -155,11 +155,8 @@ impl<T: Trait> Module<T> {

if Self::exchange_relationship(&who).is_some() {
return Err("has register this account");
} else {
if balances::FreeBalance::<T>::exists(&who) {
return Err("this account is exist");
}
}
}

ExchangeRelationship::<T>::insert(&who, from.clone());
Self::deposit_event(RawEvent::InitExchangeAccount(from, who));
Ok(())
Expand Down

0 comments on commit b8a6ae3

Please sign in to comment.