diff --git a/contracts/src/token/erc20/extensions/flash_mint.rs b/contracts/src/token/erc20/extensions/flash_mint.rs index 6dd6d2dba..34d7b2465 100644 --- a/contracts/src/token/erc20/extensions/flash_mint.rs +++ b/contracts/src/token/erc20/extensions/flash_mint.rs @@ -261,14 +261,14 @@ impl IErc3156FlashLender for Erc20FlashMint { })); } - // let flash_fee_receiver = self.flash_fee_receiver_address.get(); - // erc20._spend_allowance(receiver, contract::address(), amount + fee)?; - // if fee.is_zero() || flash_fee_receiver.is_zero() { - // erc20._burn(receiver, amount + fee)?; - // } else { - // erc20._burn(receiver, amount)?; - // erc20._transfer(receiver, flash_fee_receiver, fee)?; - // } + let flash_fee_receiver = self.flash_fee_receiver_address.get(); + erc20._spend_allowance(receiver, contract::address(), amount + fee)?; + if fee.is_zero() || flash_fee_receiver.is_zero() { + erc20._burn(receiver, amount + fee)?; + } else { + erc20._burn(receiver, amount)?; + erc20._transfer(receiver, flash_fee_receiver, fee)?; + } Ok(true) }