Skip to content

merge main to stable#456

Merged
onahprosper merged 13 commits into
stablefrom
main
Apr 20, 2026
Merged

merge main to stable#456
onahprosper merged 13 commits into
stablefrom
main

Conversation

@sundayonah
Copy link
Copy Markdown
Collaborator

Description

Describe the purpose of this PR along with any background information and the impacts of the proposed change. For the benefit of the community, please do not assume prior context.

Provide details that support your chosen implementation, including: breaking changes, alternatives considered, changes to the API, contracts etc.

References

Include any links supporting this change such as a:

If there are no references, simply delete this section.

Testing

Describe how this can be tested by reviewers. Be specific about anything not tested and reasons why. If this project has unit and/or integration testing, tests should be added for new functionality and existing tests should complete without errors.

Please include any manual steps for testing end-to-end or functionality not covered by unit/integration tests.

Also include details of the environment this PR was developed in (language/platform/browser version).

  • This change adds test coverage for new/changed/fixed functionality

Checklist

  • I have added documentation and tests for new/changed functionality in this PR
  • All active GitHub checks for tests, formatting, and security are passing
  • The correct base branch is being used, if not main

By submitting a PR, I agree to Paycrest's Contributor Code of Conduct and Contribution Guide.

Dprof-in-tech and others added 3 commits April 9, 2026 14:37
* remove celo from migration path

* exclude scroll

---------

Co-authored-by: Prosper <40717516+onahprosper@users.noreply.github.com>
* feat(rates): fetch quotes via aggregator v2 with buy/sell side

Made-with: Cursor

* feat(aggregator): enhance URL validation and parsing in aggregatorOriginForV2 function

Updated the aggregatorOriginForV2 function to include  error handling for the NEXT_PUBLIC_AGGREGATOR_URL. It now checks for valid absolute URLs and ensures the protocol is either HTTP or HTTPS before returning the base path.
* feat: enhance swap functionality in TransactionForm

- Simplified the stateProps object in MainPageContent for better readability.
- Introduced isSwapped state in TransactionForm to manage swap mode between token and currency.
- Updated calculations for amount sent and received based on swap mode.
- Enhanced dropdowns and button for swapping fields, improving user experience.

* feat: implement `onramp` support and enhance transaction flow

- Added support for wallet recipients in the transaction process, allowing users to send tokens directly to wallet addresses.
- Introduced new state management for onramp mode, differentiating between wallet and bank/mobile money transactions.
- Updated API interactions to handle wallet recipient data, including saving and migrating wallet recipients.
- Enhanced UI components to accommodate wallet-specific fields and improve user experience during recipient selection.
- Implemented ENS name resolution for wallet addresses to provide better visibility for users.
- Updated database schema to include a new table for saved wallet recipients, ensuring proper data handling and security.

* feat: enhance recipient management and transaction flow

- Added a `name` field to wallet recipient details for better identification.
- Implemented `getCurrencySymbol` utility to standardize currency symbol retrieval across components.
- Updated transaction handling to validate and include recipient names in API interactions.
- Enhanced UI components to display recipient names and improve user experience during transactions.
- Modified database schema to ensure recipient names are stored and managed correctly.

* feat: enhance recipient validation and UI components

- Introduced type predicates for recipient details to improve type safety in filtering bank/mobile money and wallet recipients.
- Added validation for wallet address format in the API, ensuring correct input before processing.
- Updated UI components to utilize new type predicates for better handling of recipient data.
- Enhanced error handling for missing required fields in recipient data during local storage migration.
- Improved styling in the AddBeneficiaryModal for better user experience.

* feat: enhance TransactionForm with onramp/offramp buttons

- Added Onramp and Offramp buttons to the TransactionForm for improved user interaction.
- Updated layout to better accommodate new buttons while maintaining UI consistency.
- Ensured walletAddress is cleared when switching to onramp mode for better state management.

* feat: add refund account management and payment order endpoints

- Introduced refund account API endpoints for fetching and saving refund account details.
- Added support for creating and retrieving v2 payment orders.
- Updated types to include new refund account and payment order structures.
- Enhanced middleware to include new API routes for refund accounts and payment orders.
- Updated configuration to include aggregator sender API key.
- Modified components and pages to integrate new refund account functionality and payment order handling.

* chore: remove referral feature files from onramp branch

Referral feature belongs to its own branch and has not been merged.
Removing all referral-specific files to keep this branch focused on the onramp implementation.

Made-with: Cursor

* feat: enhance transaction handling and add mobile sheet view type

- Introduced a new MobileSheetView type for better management of mobile sheet states.
- Updated TransactionPreview to reset the refund account on currency changes.
- Improved error handling in TransactionStatus for expired sessions during transaction tracking.

* feat: enhance onramp functionality and transaction status handling

- Added support for connected wallet address in RecipientDetailsForm.
- Updated transaction status types to include "expired".
- Implemented mapping of aggregator order status to database status for onramp transactions.
- Enhanced error handling and status resolution for onramp payment orders.
- Improved transaction details display for onramp transactions in TransactionDetails and TransactionPreview components.
- Refactored payment instruction mapping for better clarity and functionality.

* feat: introduce OnrampPaymentInstructions type and refactor mapping logic

- Added OnrampPaymentInstructions type to define the structure for virtual account/bank transfer instructions.
- Implemented mapProviderAccountToInstructions function to convert V2FiatProviderAccountDTO to OnrampPaymentInstructions.
- Removed redundant onrampPaymentInstructions module and updated imports in relevant components.
- Enhanced transaction handling in MakePayment and TransactionDetails components to utilize the new mapping function.

* refactor: improve addBeneficiary function and transaction status handling

- Enhanced the addBeneficiary function to return a boolean indicating success or failure, improving error handling and user feedback.
- Cleaned up transaction status type definitions for better readability.
- Updated UI elements to reflect changes in transaction status and actions based on the current state.

* feat: add isSwapped state to transaction forms and update related logic

- Introduced isSwapped boolean to FormData type for tracking swap mode.
- Updated MainPageContent and TransactionForm components to manage isSwapped state.
- Adjusted rate fetching logic based on isSwapped to differentiate between buy and sell sides.
- Enhanced wallet address handling to conditionally set isSwapped based on user input.

* fix: conditionally render receipt button based on onramp status

* feat: enhance transaction status handling for onramp flows

- Updated transaction completion logic to differentiate between onramp and off-ramp flows.
- Introduced processingStartedAt state to track the start time of onramp processing.
- Adjusted success visuals and button visibility based on transaction status for onramp transactions.
- Improved time spent calculations to reflect onramp processing duration accurately.

* feat: implement onramp client payment session management

- Added functionality to track and manage the onramp client payment session expiration.
- Introduced `isOnrampClientPaymentSessionExpired` utility to determine session validity based on transaction details.
- Updated `TransactionDetails`, `TransactionList`, and `MakePayment` components to reflect session expiration in UI.
- Enhanced transaction status handling to display "expired" when applicable, improving user feedback during onramp transactions.

* fix: correct base URL configuration for payment orders API

- Updated the base URL for the payment orders API to use the configured aggregator URL instead of a hardcoded value, ensuring proper integration with the aggregator service.

* fix: ensure contentClassName is safely handled in AnimatedModal component

- Updated the AnimatedModal component to use a fallback for contentClassName, preventing potential undefined values from causing issues in the className concatenation.

---------

Co-authored-by: Prosper <40717516+onahprosper@users.noreply.github.com>
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 14, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 1b41f86c-7413-46ac-baaa-ccdde0e89b8b

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch main

Comment @coderabbitai help to get the list of available commands and usage tips.

mixaeljr and others added 10 commits April 15, 2026 23:11
Homepage copy
* fix: update TransactionForm and TransactionPreview styles and structure

- Adjusted text color for dark mode in TransactionForm to improve visibility.
- Refactored refund account button in TransactionPreview for better accessibility and user interaction, including hover effects and aria-labels for improved screen reader support.

* feat: enhance onramp transaction handling and UI notifications

- Added utility functions to determine if an onramp order is awaiting user bank transfer.
- Integrated onramp pending notification dot in WalletDetails component to indicate pending bank transfers.
- Updated transaction fetching logic to ensure timely updates and re-evaluation of onramp status.
- Improved transaction context to handle reindexing of pending transactions and update backend accordingly.

* refactor: consolidate OnrampPendingNotificationDot into utils and enhance transaction context

- Moved OnrampPendingNotificationDot component logic to utils for better organization.
- Updated WalletDetails and TransactionPreview components to utilize the new OnrampPendingNotificationDot from utils.
- Enhanced StepContext to manage onramp provider details visibility, improving user experience during transactions.
- Refined isOnrampAwaitingUserBankTransfer function to simplify status checks for pending transactions.

* feat: enhance onramp provider details management and transaction context.
…env var (#464)

* feat(payment-orders): on-ramp-only proxy, messageHash apiKey, single env var

Restrict POST /api/v1/payment-orders to fiat on-ramp (v2); reject off-ramp.
Embed sender API key UUID in encrypted createOrder recipient metadata for indexer parity.
Use NEXT_PUBLIC_AGGREGATOR_SENDER_API_KEY_ID as the single config key for server and client.

* feat(onramp): explicit receive selection, NGN on-ramp rules, tx amount labels

Gate swap CTA and recipient flow on receiveDestinationExplicitlySelected.
On-ramp: NGN send side, min fiat vs rate, rate fetch after token chosen; hero copy.
Centralize transaction history amount/type display helpers; remove unused import.
Reset currency to empty so off-ramp matches initial no-selection state.
Adjust on-ramp hero: first line "Change cash to", second "stablecoins in seconds".
…mplete

Complete flow = receive destination + token + currency + both amounts > 0:
swap amounts/formatting and keep assets. Otherwise clear amounts and apply
defaults. On-ramp: normalize currency to NGN when switching from other fiat.

Also: onrampFiatMin and Select token CTA only after token; useSwapButton aligns.
TransactionDetails: on-ramp headline uses fiat amount; hide duplicate onchain
row; completed on-ramp opens explorer via View receipt (no PDF). Transfer
funds: Select token dropdown title and selected value.
Expand FAQs for stablecoin↔fiat both ways; add bank/mobile money on-ramp FAQ.
Home: move between stablecoins and cash line + 30s.
@onahprosper onahprosper merged commit c45be79 into stable Apr 20, 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.

6 participants