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

Added Coin Registration into Swap Functions #146

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

0xAnto
Copy link

@0xAnto 0xAnto commented Dec 29, 2023

Description:

This PR adds coin registration checks to the swap, swap_into, and swap_unchecked functions within the liquidswap scripts_v2 module. The code now checks whether the account is registered for the output coin Y before depositing. If the account is not registered, it automatically registers the coin before depositing the swapped coin_y into the account. Corresponding tests have been added to ensure functionality.

@0xAnto 0xAnto marked this pull request as ready for review December 29, 2023 19:55
@0xAnto 0xAnto marked this pull request as draft December 31, 2023 07:21
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.

1 participant