Skip to content

Commit

Permalink
comment indicating send will revert if amountLD contains any dust
Browse files Browse the repository at this point in the history
  • Loading branch information
ravinagill15 committed Aug 30, 2024
1 parent ba8e08a commit c4c3b66
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/oft-evm/contracts/NativeOFTAdapter.sol
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ abstract contract NativeOFTAdapter is OFTCore {
address _refundAddress
) public payable virtual override returns (MessagingReceipt memory msgReceipt, OFTReceipt memory oftReceipt) {
// @dev Ensure the native funds in msg.value are enough to cover the fees and amount to send (with dust removed).
// TODO should we remove dust from _sendParam.amountLD here?
// @dev This will revert if the _sendParam.amountLD contains any dust
uint256 requiredMsgValue = _fee.nativeFee + _removeDust(_sendParam.amountLD);
if (msg.value != requiredMsgValue) {
revert InsufficientMessageValue(msg.value, requiredMsgValue);
Expand Down

0 comments on commit c4c3b66

Please sign in to comment.