Skip to content

Commit

Permalink
updating require
Browse files Browse the repository at this point in the history
  • Loading branch information
sirarthurmoney committed Nov 8, 2023
1 parent 4dd9abe commit 3a5bd3d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions contracts/token/oft/v2/fee/NativeOFTWithFee.sol
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ contract NativeOFTWithFee is OFTWithFee, ReentrancyGuard {
************************************************************************/
function sendFrom(address _from, uint16 _dstChainId, bytes32 _toAddress, uint _amount, uint _minAmount, LzCallParams calldata _callParams) public payable virtual override {
_amount = _send(_from, _dstChainId, _toAddress, _amount, _callParams.refundAddress, _callParams.zroPaymentAddress, _callParams.adapterParams);
require(_amount >= _minAmount, "BaseOFTWithFee: amount is less than minAmount");
require(_amount >= _minAmount, "NativeOFTWithFee: amount is less than minAmount");
}

function sendAndCall(address _from, uint16 _dstChainId, bytes32 _toAddress, uint _amount, uint _minAmount, bytes calldata _payload, uint64 _dstGasForCall, LzCallParams calldata _callParams) public payable virtual override {
_amount = _sendAndCall(_from, _dstChainId, _toAddress, _amount, _payload, _dstGasForCall, _callParams.refundAddress, _callParams.zroPaymentAddress, _callParams.adapterParams);
require(_amount >= _minAmount, "BaseOFTWithFee: amount is less than minAmount");
require(_amount >= _minAmount, "NativeOFTWithFee: amount is less than minAmount");
}

function _send(address _from, uint16 _dstChainId, bytes32 _toAddress, uint _amount, address payable _refundAddress, address _zroPaymentAddress, bytes memory _adapterParams) internal virtual override returns (uint amount) {
Expand Down

0 comments on commit 3a5bd3d

Please sign in to comment.