Skip to content

Commit

Permalink
Add comment on BankMsg::Burn
Browse files Browse the repository at this point in the history
  • Loading branch information
ethanfrey committed Jul 20, 2021
1 parent 0f3fe30 commit fe8e6a0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/multi-test/src/bank.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ impl Bank for SimpleBank {
let mut bank_storage = prefixed(storage, NAMESPACE_BANK);
match msg {
BankMsg::Send { to_address, amount } => {
// see https://github.com/cosmos/cosmos-sdk/blob/v0.42.7/x/bank/keeper/send.go#L142-L147
let events = vec![Event::new("transfer")
.attr("recipient", &to_address)
.attr("sender", &sender)
Expand All @@ -123,8 +124,8 @@ impl Bank for SimpleBank {
Ok(AppResponse { events, data: None })
}
BankMsg::Burn { amount } => {
// burn doesn't seem to emit any events
self.burn(&mut bank_storage, sender, amount)?;
// TODO: add some proper events here
Ok(AppResponse::default())
}
m => Err(format!("Unsupported bank message: {:?}", m)),
Expand Down

0 comments on commit fe8e6a0

Please sign in to comment.