diff --git a/src/Starport.sol b/src/Starport.sol index 23cc748e..681303f6 100644 --- a/src/Starport.sol +++ b/src/Starport.sol @@ -37,10 +37,6 @@ import {Ownable} from "solady/src/auth/Ownable.sol"; import {SafeTransferLib} from "solady/src/utils/SafeTransferLib.sol"; import {PausableNonReentrant} from "starport-core/lib/PausableNonReentrant.sol"; -interface LoanSettledCallback { - function onLoanSettled(Starport.Loan calldata loan) external; -} - contract Starport is ERC721, PausableNonReentrant { using FixedPointMathLib for uint256; @@ -473,10 +469,6 @@ contract Starport is ERC721, PausableNonReentrant { _burn(tokenId); } _setExtraData(tokenId, uint8(FieldFlags.INACTIVE)); - - if (loan.issuer.code.length > 0) { - loan.issuer.call(abi.encodeWithSelector(LoanSettledCallback.onLoanSettled.selector, loan)); - } emit Close(tokenId); } diff --git a/test/unit-testing/TestCustodian.sol b/test/unit-testing/TestCustodian.sol index 66823148..90edc1d7 100644 --- a/test/unit-testing/TestCustodian.sol +++ b/test/unit-testing/TestCustodian.sol @@ -239,32 +239,6 @@ contract TestCustodian is StarportTest, DeepEq, MockCall { address(this), new SpentItem[](0), activeDebt, abi.encode(Actions.Repayment, activeLoan) ); } - //TODO: add assertions - - function testGenerateOrderRepayERC1155WithRevert() public { - // 1155 - Starport.Loan memory originationDetails = _generateOriginationDetails( - _getERC1155SpentItem(erc1155s[0]), _getERC20SpentItem(erc20s[0], borrowAmount), address(issuer) - ); - - Starport.Loan memory loan = - newLoan(originationDetails, bytes32(uint256(2)), bytes32(uint256(2)), address(issuer)); - skip(1); - - loan.toStorage(activeLoan); - vm.prank(seaportAddr); - //function mockCallRevert(address callee, bytes calldata data, bytes calldata revertData) external; - vm.mockCallRevert( - address(issuer), - abi.encodeWithSelector( - LoanSettledCallback.onLoanSettled.selector, abi.encode(Actions.Repayment, activeLoan) - ), - new bytes(0) - ); - custodian.generateOrder( - activeLoan.borrower, new SpentItem[](0), activeDebt, abi.encode(Actions.Repayment, activeLoan) - ); - } function testGenerateOrdersWithLoanStartAtBlockTimestampInvalidLoan() public { // 1155 @@ -276,7 +250,6 @@ contract TestCustodian is StarportTest, DeepEq, MockCall { newLoan(originationDetails, bytes32(uint256(2)), bytes32(uint256(2)), address(issuer)); loan.toStorage(activeLoan); vm.prank(seaportAddr); - //function mockCallRevert(address callee, bytes calldata data, bytes calldata revertData) external; vm.expectRevert(abi.encodeWithSelector(Custodian.InvalidLoan.selector)); custodian.generateOrder( activeLoan.borrower, new SpentItem[](0), activeDebt, abi.encode(Actions.Repayment, activeLoan)