From 7631807a5db8235f26d92f49019cc40af3dad210 Mon Sep 17 00:00:00 2001 From: Kevin Cheng Date: Fri, 20 Oct 2023 14:52:04 -0700 Subject: [PATCH] Add license and remove redundant code (#20) --- LICENSE | 7 +++++++ src/CometWrapper.sol | 1 - 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 LICENSE diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..5abfca4 --- /dev/null +++ b/LICENSE @@ -0,0 +1,7 @@ +Copyright 2023 Compound Labs + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/src/CometWrapper.sol b/src/CometWrapper.sol index 95d6369..e572c9e 100644 --- a/src/CometWrapper.sol +++ b/src/CometWrapper.sol @@ -567,7 +567,6 @@ contract CometWrapper is ERC4626Upgradeable, IERC7246, CometHelpers { * @param amount Amount of tokens to increase the encumbrance to `taker` by */ function encumberFrom(address owner, address taker, uint256 amount) external { - if (allowance(owner, msg.sender) < amount) revert InsufficientAllowance(); spendAllowanceInternal(owner, msg.sender, amount); encumberInternal(owner, taker , amount); }