Unnecessary parameter amount in withdraw function
The function `withdraw()` has a parameter `amount` but we don't understand the necessity of this parameter. At line L67, the `amount` is required to be the same to the whole deposit `amount`. This means the user does not have a flexibility to choose the withdraw `amount`, after all it means the parameter was not necessary at all.\\n```\\nDepositVault.sol\\n    function withdraw(uint256 amount, uint256 nonce, bytes memory signature, address payable recipient) public {\\n        require(nonce < deposits.length, "Invalid deposit index");\\n        Deposit storage depositToWithdraw = deposits[nonce];\\n        bytes32 withdrawalHash = getWithdrawalHash(Withdrawal(amount, nonce));\\n        address signer = withdrawalHash.recover(signature);\\n        require(signer == depositToWithdraw.depositor, "Invalid signature");\\n        require(!usedWithdrawalHashes[withdrawalHash], "Withdrawal has already been executed");\\n        require(amount == depositToWithdraw.amount, "Withdrawal amount must match deposit amount");//@audit-info only full withdrawal is allowed\\n        usedWithdrawalHashes[withdrawalHash] = true;\\n        depositToWithdraw.amount = 0;\\n        if(depositToWithdraw.tokenAddress == address(0)){\\n            recipient.transfer(amount);\\n        } else {\\n            IERC20 token = IERC20(depositToWithdraw.tokenAddress);\\n            token.safeTransfer(recipient, amount);\\n        }\\n        emit WithdrawalMade(recipient, amount);\\n    }\\n```\\n
If the protocol intends to only allow full withdrawal, this parameter can be removed completely (that will help save gas as well). Unnecessary parameters increase the complexity of the function and more error prone.
```\\nDepositVault.sol\\n    function withdraw(uint256 amount, uint256 nonce, bytes memory signature, address payable recipient) public {\\n        require(nonce < deposits.length, "Invalid deposit index");\\n        Deposit storage depositToWithdraw = deposits[nonce];\\n        bytes32 withdrawalHash = getWithdrawalHash(Withdrawal(amount, nonce));\\n        address signer = withdrawalHash.recover(signature);\\n        require(signer == depositToWithdraw.depositor, "Invalid signature");\\n        require(!usedWithdrawalHashes[withdrawalHash], "Withdrawal has already been executed");\\n        require(amount == depositToWithdraw.amount, "Withdrawal amount must match deposit amount");//@audit-info only full withdrawal is allowed\\n        usedWithdrawalHashes[withdrawalHash] = true;\\n        depositToWithdraw.amount = 0;\\n        if(depositToWithdraw.tokenAddress == address(0)){\\n            recipient.transfer(amount);\\n        } else {\\n            IERC20 token = IERC20(depositToWithdraw.tokenAddress);\\n            token.safeTransfer(recipient, amount);\\n        }\\n        emit WithdrawalMade(recipient, amount);\\n    }\\n```\\n