Skip to content

feat: Enhanced the OneClickService to correctly calculate exchange rates#81

Open
JimmyGuu wants to merge 3 commits intomainfrom
feat-NetFee-260228
Open

feat: Enhanced the OneClickService to correctly calculate exchange rates#81
JimmyGuu wants to merge 3 commits intomainfrom
feat-NetFee-260228

Conversation

@JimmyGuu
Copy link
Collaborator

  • Updated the Total component to safely access stablecoin data using optional chaining.
  • Enhanced the OneClickService to correctly calculate exchange rates, defaulting to "1" when tokens are the same, and adjusted the response structure accordingly.
  • Modified the ResultOneClick component to display exchange rates conditionally based on token comparisons, improving user feedback on transactions.

- Updated the Total component to safely access stablecoin data using optional chaining.
- Enhanced the OneClickService to correctly calculate exchange rates, defaulting to "1" when tokens are the same, and adjusted the response structure accordingly.
- Modified the ResultOneClick component to display exchange rates conditionally based on token comparisons, improving user feedback on transactions.
@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Feb 28, 2026

Deploying stableflow-ai with  Cloudflare Pages  Cloudflare Pages

Latest commit: b563b5b
Status: ✅  Deploy successful!
Preview URL: https://5b39c1b9.stableflow-ai.pages.dev
Branch Preview URL: https://feat-netfee-260228.stableflow-ai.pages.dev

View logs

gerardhalo and others added 2 commits March 2, 2026 12:03
- Updated the exchange rate display in the ResultOneClick component to format the value with six decimal places, ensuring consistency and improved readability for users.
- Enhanced the isExchangeToken logic to safely access token symbols using optional chaining, ensuring robust handling of potential undefined values.
- Updated the comparison to ensure both token symbols are defined before checking for inequality, improving the accuracy of exchange token detection.
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