diff --git a/src/contracts/Grateful.sol b/src/contracts/Grateful.sol index f85dd0f..b488c35 100644 --- a/src/contracts/Grateful.sol +++ b/src/contracts/Grateful.sol @@ -64,9 +64,6 @@ contract Grateful is IGrateful, Ownable2Step, ReentrancyGuard { /// @inheritdoc IGrateful mapping(address => CustomFee) public override customFees; - /// @inheritdoc IGrateful - mapping(uint256 => bool) public paymentIds; - /// @inheritdoc IGrateful uint256 public performanceFee; @@ -458,12 +455,6 @@ contract Grateful is IGrateful, Ownable2Step, ReentrancyGuard { revert Grateful_InvalidAddress(); } - // Check payment id - if (paymentIds[_paymentId]) { - revert Grateful_PaymentIdAlreadyUsed(); - } - paymentIds[_paymentId] = true; - // Apply the fee uint256 amountWithFee = applyFee(_merchant, _amount); uint256 feeAmount = _amount - amountWithFee; diff --git a/src/interfaces/IGrateful.sol b/src/interfaces/IGrateful.sol index ca7cc4e..d26e88b 100644 --- a/src/interfaces/IGrateful.sol +++ b/src/interfaces/IGrateful.sol @@ -144,6 +144,9 @@ interface IGrateful { /// @notice Thrown when the provided address is invalid. error Grateful_InvalidAddress(); + /// @notice Thrown when the precomputed address does not match the one-time address created. + error Grateful_PrecomputedAddressMismatch(); + /*/////////////////////////////////////////////////////////////// VARIABLES //////////////////////////////////////////////////////////////*/ @@ -208,13 +211,6 @@ interface IGrateful { address _merchant ) external view returns (bool isSet, uint256 fee); - /// @notice Returns if a paymentId has been used. - /// @param paymentId The payment id. - /// @return isUsed True if the payment id has been used. - function paymentIds( - uint256 paymentId - ) external view returns (bool isUsed); - /*/////////////////////////////////////////////////////////////// LOGIC //////////////////////////////////////////////////////////////*/