Skip to content
Snippets Groups Projects
Unverified Commit 080b8abe authored by Shaopeng Wang's avatar Shaopeng Wang Committed by GitHub
Browse files

Currencies module: no event if from == to. (#232)

parent a8cfd422
No related branches found
No related tags found
No related merge requests found
...@@ -246,7 +246,7 @@ impl<T: Trait> MultiCurrency<T::AccountId> for Module<T> { ...@@ -246,7 +246,7 @@ impl<T: Trait> MultiCurrency<T::AccountId> for Module<T> {
to: &T::AccountId, to: &T::AccountId,
amount: Self::Balance, amount: Self::Balance,
) -> DispatchResult { ) -> DispatchResult {
if amount.is_zero() { if amount.is_zero() || from == to {
return Ok(()); return Ok(());
} }
if currency_id == T::GetNativeCurrencyId::get() { if currency_id == T::GetNativeCurrencyId::get() {
......
...@@ -51,7 +51,7 @@ pub struct OnNewBidResult<BlockNumber> { ...@@ -51,7 +51,7 @@ pub struct OnNewBidResult<BlockNumber> {
/// Hooks for auction to handle bids. /// Hooks for auction to handle bids.
pub trait AuctionHandler<AccountId, Balance, BlockNumber, AuctionId> { pub trait AuctionHandler<AccountId, Balance, BlockNumber, AuctionId> {
/// Called when new bid is received. /// Called when new bid is received.
/// The return value deteermine if the bid should be accepted and update auction end time. /// The return value determines if the bid should be accepted and update auction end time.
/// Implementation should reserve money from current winner and refund previous winner. /// Implementation should reserve money from current winner and refund previous winner.
fn on_new_bid( fn on_new_bid(
now: BlockNumber, now: BlockNumber,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment