Skip to content

Commit ee71ae0

Browse files
committed
adjust test
1 parent 331f5a7 commit ee71ae0

File tree

2 files changed

+14
-7
lines changed

2 files changed

+14
-7
lines changed

packages/ethereum-contracts/contracts/utils/ERC1820Implementer.sol

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// SPDX-License-Identifier: MIT
2+
pragma solidity ^0.8.23;
3+
14
import { IERC1820Implementer } from "@openzeppelin-v5/contracts/interfaces/IERC1820Implementer.sol";
25

36

packages/ethereum-contracts/test/foundry/apps/SuperTokenV1Library.t.sol

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -556,18 +556,22 @@ contract SuperAppMock is CFASuperAppBase {
556556
function onFlowDeleted(
557557
ISuperToken superToken,
558558
address sender,
559+
int96 previousFlowRate,
560+
uint256 /*lastUpdated*/,
561+
bytes calldata ctx
562+
) internal virtual override returns (bytes memory /*newCtx*/) {
563+
return _mirrorOrMatchIncomingFlow(superToken, sender, ctx);
564+
}
565+
566+
// outflow was deleted by the sender we mirror to, we make it "sticky" by simply restoring it.
567+
function onOutflowDeleted(
568+
ISuperToken superToken,
559569
address receiver,
560570
int96 previousFlowRate,
561571
uint256 /*lastUpdated*/,
562572
bytes calldata ctx
563573
) internal virtual override returns (bytes memory /*newCtx*/) {
564-
if (receiver == address(this)) {
565-
return _mirrorOrMatchIncomingFlow(superToken, sender, ctx);
566-
} else {
567-
// outflow was deleted by the sender we mirror to,
568-
// we make it "sticky" by simply restoring it.
569-
return superToken.flowWithCtx(receiver, previousFlowRate, ctx);
570-
}
574+
return superToken.flowWithCtx(receiver, previousFlowRate, ctx);
571575
}
572576

573577
function _mirrorOrMatchIncomingFlow(ISuperToken superToken, address senderAndReceiver, bytes memory ctx)

0 commit comments

Comments
 (0)