Skip to content

Commit

Permalink
deadline is milliseconds
Browse files Browse the repository at this point in the history
  • Loading branch information
0xNe0x1 committed Sep 17, 2024
1 parent 90b1ffd commit 697aabe
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions contracts/DePayRouterV3.sol
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ contract DePayRouterV3 is Ownable2Step {
event Payment(
address indexed from,
address indexed to,
uint256 indexed deadline,
uint256 indexed deadline, // in milliseconds!
uint256 amountIn,
uint256 paymentAmount,
uint256 feeAmount,
Expand Down Expand Up @@ -164,7 +164,7 @@ contract DePayRouterV3 is Ownable2Step {
/// @return balanceInBefore The balance in before the payment.
/// @return balanceOutBefore The balance out before the payment.
function _validatePreConditions(IDePayRouterV3.Payment calldata payment) internal returns(uint256 balanceInBefore, uint256 balanceOutBefore) {
// Make sure payment deadline has not been passed, yet
// Make sure payment deadline (in milliseconds!) has not been passed, yet
if(payment.deadline < block.timestamp * 1000) {
revert PaymentDeadlineReached();
}
Expand Down Expand Up @@ -286,7 +286,7 @@ contract DePayRouterV3 is Ownable2Step {
emit Payment(
msg.sender,
payment.paymentReceiverAddress,
payment.deadline,
payment.deadline, // in milliseconds!
payment.amountIn,
payment.paymentAmount,
payment.feeAmount,
Expand Down
2 changes: 1 addition & 1 deletion contracts/interfaces/IDePayRouterV3.sol
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ interface IDePayRouterV3 {
uint256 paymentAmount;
uint256 feeAmount;
uint256 protocolAmount;
uint256 deadline;
uint256 deadline; // in milliseconds!
address tokenInAddress;
address exchangeAddress;
address tokenOutAddress;
Expand Down

0 comments on commit 697aabe

Please sign in to comment.