Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 20 additions & 2 deletions pallets/vtoken-minting/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,12 +100,14 @@ pub mod pallet {
#[pallet::generate_deposit(pub(super) fn deposit_event)]
pub enum Event<T: Config> {
Minted {
address: AccountIdOf<T>,
token_id: CurrencyIdOf<T>,
token_amount: BalanceOf<T>,
vtoken_amount: BalanceOf<T>,
fee: BalanceOf<T>,
},
Redeemed {
address: AccountIdOf<T>,
token_id: CurrencyIdOf<T>,
token_amount: BalanceOf<T>,
vtoken_amount: BalanceOf<T>,
Expand All @@ -118,12 +120,14 @@ pub mod pallet {
token_amount: BalanceOf<T>,
},
Rebonded {
address: AccountIdOf<T>,
token_id: CurrencyIdOf<T>,
token_amount: BalanceOf<T>,
vtoken_amount: BalanceOf<T>,
fee: BalanceOf<T>,
},
RebondedByUnlockId {
address: AccountIdOf<T>,
token_id: CurrencyIdOf<T>,
token_amount: BalanceOf<T>,
vtoken_amount: BalanceOf<T>,
Expand Down Expand Up @@ -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(())
}

Expand Down Expand Up @@ -438,6 +448,7 @@ pub mod pallet {
})?;

Self::deposit_event(Event::Redeemed {
address: exchanger,
token_id,
vtoken_amount,
token_amount,
Expand Down Expand Up @@ -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(())
}

Expand Down Expand Up @@ -680,6 +697,7 @@ pub mod pallet {
})?;

Self::deposit_event(Event::RebondedByUnlockId {
address: exchanger,
token_id,
token_amount: unlock_amount,
vtoken_amount,
Expand Down