Skip to content

Conversation

AGMASO
Copy link
Collaborator

@AGMASO AGMASO commented Sep 10, 2025

General Changes

  • Closes ALE-11 : Improved the UX of SwitchTxSuccessView.tsx by adding USD values as a subheader.

  • Closes ALE-13 : Added an “Add to wallet” button to integrate the received token into the user’s wallet.

  • Closes ALE-12 : Now we don’t round small numbers. If the number is smaller than 4 decimals, we will show <0.00001.

Developer Notes

  • Regarding the “Add to wallet” button, there is an issue we need to discuss. At the moment, the token to be added to the wallet is the underlying token. The problem is that in the case of CollateralSwitch, we are actually switching aTokens. This creates an inconsistency issue in other markets, because the aToken symbol will be → a{nameOfChainAbbreviation}{tokenName}. This causes a conflict when sending the RPC to the wallet, since the parameters we have only include the symbol of the normal aToken, not the market-specific one.

Questions:

  1. Is it intended to add the a{nameOfChainAbbreviation}{tokenName}, or should this only be done in the case of underlying tokens?
  2. Should we remove this button when performing a collateral swap, and leave it only for normal token swaps?

Reviewer Checklist

Please ensure you, as the reviewer(s), have gone through this checklist to ensure that the code changes are ready to ship safely and to help mitigate any downstream issues that may occur.

  • End-to-end tests are passing without any errors
  • Code changes do not significantly increase the application bundle size
  • If there are new 3rd-party packages, they do not introduce potential security threats
  • If there are new environment variables being added, they have been added to the .env.example file as well as the pertinant .github/actions/* files
  • There are no CI changes, or they have been approved by the DevOps and Engineering team(s)

@AGMASO AGMASO requested review from foodaka and mgrabina September 10, 2025 10:42
Copy link

vercel bot commented Sep 10, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
interface Ready Ready Preview Comment Sep 16, 2025 2:54pm

Comment on lines 691 to 696
)}
addToken={{
address: selectedOutputToken.address,
symbol: selectedOutputToken.symbol,
decimals: selectedOutputToken.decimals,
}}
Copy link
Contributor

Choose a reason for hiding this comment

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

just for aTokens/collateral swaps

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ok, I will keep it only for aToken/collateral swaps. In the Swap module for underlying token swaps will not be shown.

@mgrabina
Copy link
Contributor

image feew ux nits

let's add screenshots to the PR to accelerate reviews too

? isEthereum
? `a${addToken.symbol}`
: getATokenSymbol(networkConfigs[chainId].name, addToken.symbol)
: addToken?.symbol ?? '';
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@mgrabina I have fixed it so that we are showing only for aToken swaps. I also created this helper to define the correct token symbol for the aToken depending on each market. It is working on the Base market and makes adding tokens seamless, but I’m not able to test on mainnet and other markets as I don’t have funds, and using a fork is not working.

Before approving this, we need to test that the correct aToken symbol is created in different markets to avoid failures when adding the token to the wallet.

@AGMASO
Copy link
Collaborator Author

AGMASO commented Sep 16, 2025

@mgrabina the margins + paddings are now fixed

Normal Swap, no collateral

Screenshot 2025-09-16 at 15 57 35 (2) ## aTokens Swap finished Screenshot 2025-09-16 at 16 05 45 (2) ## aToken Swap In Progress Screenshot 2025-09-16 at 17 15 20 (2)

@AGMASO AGMASO requested a review from mgrabina September 25, 2025 07:10
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