Skip to content

Added Coin Registration into Swap Functions#146

Draft
0xAnto wants to merge 2 commits intopontem-network:mainfrom
0xAnto:main
Draft

Added Coin Registration into Swap Functions#146
0xAnto wants to merge 2 commits intopontem-network:mainfrom
0xAnto:main

Conversation

@0xAnto
Copy link
Copy Markdown

@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