From 080b8abea01add939baac599f249010081dfe7c8 Mon Sep 17 00:00:00 2001
From: Shaopeng Wang <spxwang@gmail.com>
Date: Mon, 13 Jul 2020 09:40:06 +1200
Subject: [PATCH] Currencies module: no event if from == to. (#232)

---
 currencies/src/lib.rs | 2 +-
 traits/src/auction.rs | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/currencies/src/lib.rs b/currencies/src/lib.rs
index 7b57486..873f2ca 100644
--- a/currencies/src/lib.rs
+++ b/currencies/src/lib.rs
@@ -246,7 +246,7 @@ impl<T: Trait> MultiCurrency<T::AccountId> for Module<T> {
 		to: &T::AccountId,
 		amount: Self::Balance,
 	) -> DispatchResult {
-		if amount.is_zero() {
+		if amount.is_zero() || from == to {
 			return Ok(());
 		}
 		if currency_id == T::GetNativeCurrencyId::get() {
diff --git a/traits/src/auction.rs b/traits/src/auction.rs
index 9fbaba4..acbfda5 100644
--- a/traits/src/auction.rs
+++ b/traits/src/auction.rs
@@ -51,7 +51,7 @@ pub struct OnNewBidResult<BlockNumber> {
 /// Hooks for auction to handle bids.
 pub trait AuctionHandler<AccountId, Balance, BlockNumber, AuctionId> {
 	/// 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.
 	fn on_new_bid(
 		now: BlockNumber,
-- 
GitLab