Skip to content

feat: Wire Convert form to live API and replace MOCK data#191

Merged
portableDD merged 2 commits into
Nexacore-Org:mainfrom
AbuJulaybeeb:feature/issue-170-convert-form
Jun 11, 2026
Merged

feat: Wire Convert form to live API and replace MOCK data#191
portableDD merged 2 commits into
Nexacore-Org:mainfrom
AbuJulaybeeb:feature/issue-170-convert-form

Conversation

@AbuJulaybeeb

Copy link
Copy Markdown
  • Added createSwap() to lib/api/transactions.ts to call POST /transactions/swap.
  • Replaced MOCK_RATES with live exchange rate data fetched via GET /api/exchange-rates, adding a fallback error state for 500 errors or failures.
  • Replaced MOCK_BALANCES with real data using the getBalances() function from lib/api/wallet.ts.
  • Removed disabled={true} from the submit button and connected the form to createSwap(), handling loading, success, and error states gracefully.

Why it was done

The Convert form was completely non-functional, utilizing hardcoded mock data and an inactive submit button. This change activates the core conversion functionality by integrating with the live backend APIs, enabling users to actually swap currencies based on active rates.

How it was verified

@drips-wave

drips-wave Bot commented Jun 2, 2026

Copy link
Copy Markdown

@AbuJulaybeeb Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@portableDD

Copy link
Copy Markdown
Contributor

@AbuJulaybeeb please resolve ci error, ci must be successful

@portableDD portableDD merged commit 4fa2401 into Nexacore-Org:main Jun 11, 2026
1 check passed
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.

[Wave 200pts] Feature: Wire Convert form to live API — replace MOCK_RATES/MOCK_BALANCES and enable the disabled submit button

2 participants