From 15e325b23bc07d8549be9715d224fb88a3d91a4c Mon Sep 17 00:00:00 2001 From: yooml Date: Fri, 22 Apr 2022 15:38:30 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=F0=9F=90=9B=20fix?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pallets/vtoken-minting/src/lib.rs | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/pallets/vtoken-minting/src/lib.rs b/pallets/vtoken-minting/src/lib.rs index d01e4ce514..6b6214173b 100644 --- a/pallets/vtoken-minting/src/lib.rs +++ b/pallets/vtoken-minting/src/lib.rs @@ -100,12 +100,14 @@ pub mod pallet { #[pallet::generate_deposit(pub(super) fn deposit_event)] pub enum Event { Minted { + address: AccountIdOf, token_id: CurrencyIdOf, token_amount: BalanceOf, vtoken_amount: BalanceOf, fee: BalanceOf, }, Redeemed { + address: AccountIdOf, token_id: CurrencyIdOf, token_amount: BalanceOf, vtoken_amount: BalanceOf, @@ -118,12 +120,14 @@ pub mod pallet { token_amount: BalanceOf, }, Rebonded { + address: AccountIdOf, token_id: CurrencyIdOf, token_amount: BalanceOf, vtoken_amount: BalanceOf, fee: BalanceOf, }, RebondedByUnlockId { + address: AccountIdOf, token_id: CurrencyIdOf, token_amount: BalanceOf, vtoken_amount: BalanceOf, @@ -306,7 +310,13 @@ pub mod pallet { token_amount_excluding_fee, )?; - Self::deposit_event(Event::Minted { token_id, token_amount, vtoken_amount, fee }); + Self::deposit_event(Event::Minted { + address: exchanger, + token_id, + token_amount, + vtoken_amount, + fee, + }); Ok(()) } @@ -438,6 +448,7 @@ pub mod pallet { })?; Self::deposit_event(Event::Redeemed { + address: exchanger, token_id, vtoken_amount, token_amount, @@ -593,7 +604,13 @@ pub mod pallet { Ok(()) })?; - Self::deposit_event(Event::Rebonded { token_id, token_amount, vtoken_amount, fee }); + Self::deposit_event(Event::Rebonded { + address: exchanger, + token_id, + token_amount, + vtoken_amount, + fee, + }); Ok(()) } @@ -680,6 +697,7 @@ pub mod pallet { })?; Self::deposit_event(Event::RebondedByUnlockId { + address: exchanger, token_id, token_amount: unlock_amount, vtoken_amount,