Skip to content

Commit

Permalink
remove usage of Balances::deposit from transfer handler (#258)
Browse files Browse the repository at this point in the history
  • Loading branch information
AmbientTea authored Nov 20, 2024
1 parent 521f3e3 commit a1a8d18
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions node/runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -323,17 +323,6 @@ pub struct TokenTransferHandler;

impl pallet_native_token_management::TokenTransferHandler for TokenTransferHandler {
fn handle_token_transfer(token_amount: NativeTokenAmount) -> DispatchResult {
// Mint the "transfered" tokens into a dummy address.
// This is done for visibility in tests only.
// Despite using the `Balances` pallet to do the transfer here, the account balance
// is stored (and can be observed) in the `System` pallet's storage.
let _ = Balances::deposit(
&AccountId::from(hex!(
"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
)),
token_amount.0,
Precision::Exact,
)?;
log::info!("💸 Registered transfer of {} native tokens", token_amount.0);
Ok(())
}
Expand Down

0 comments on commit a1a8d18

Please sign in to comment.