Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: router #3

Open
wants to merge 15 commits into
base: main
Choose a base branch
from
Open

fix: router #3

wants to merge 15 commits into from

Conversation

detectivekim
Copy link
Collaborator

Fix OptionRouter.sol, add test case

@JhChoy JhChoy marked this pull request as ready for review June 9, 2023 05:45
@@ -69,6 +79,13 @@ contract OptionRouter is CloberMarketSwapCallbackReceiver, CloberRouter {
if (inputAmount > 0) {
IERC20(inputToken).safeTransferFrom(payer, msg.sender, inputAmount);
}
if (outputAmount > 0) {
if (CloberWrappedLyraToken(inputToken).positionState() == IOptionToken.PositionState.SETTLED) {
CloberWrappedLyraToken(inputToken).claim(user);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this line is not the Router's role.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants