Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces support for unified accounts in the SendDialog component by integrating the useInfoUserAbstraction hook. It adjusts the account type logic, asset sending parameters, and UI visibility based on whether the user has a unified account. The review feedback suggests removing debug console.log statements and cleaning up an unused variable assignment in the asset transfer logic.
Comment on lines
+134
to
+135
| console.log("[SendDialog] sending", { tokenId, destination, amount, isUnifiedAccount }); | ||
| if (isUnifiedAccount) { |
Comment on lines
+139
to
+146
| const result = await sendAsset({ | ||
| destination, | ||
| sourceDex: "spot", | ||
| destinationDex: selectedToken === DEFAULT_QUOTE_TOKEN ? "" : "spot", | ||
| token: tokenId, | ||
| amount, | ||
| }); | ||
| console.log("[SendDialog] sendAsset result", result); |
There was a problem hiding this comment.
Debug console.log statements should be removed. Additionally, the result of sendAsset is unused in this scope, so the assignment can be removed for cleaner code.
Suggested change
| const result = await sendAsset({ | |
| destination, | |
| sourceDex: "spot", | |
| destinationDex: selectedToken === DEFAULT_QUOTE_TOKEN ? "" : "spot", | |
| token: tokenId, | |
| amount, | |
| }); | |
| console.log("[SendDialog] sendAsset result", result); | |
| await sendAsset({ | |
| destination, | |
| sourceDex: "spot", | |
| destinationDex: selectedToken === DEFAULT_QUOTE_TOKEN ? "" : "spot", | |
| token: tokenId, | |
| amount, | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.