Conversation
…migration process * Replaced deprecated paymaster configuration with Biconomy MEE API key across components. * Updated WalletTransferApprovalModal to handle wallet upgrades and token transfers using the new MEE API. * Enhanced error handling for missing API keys and improved migration logic for better user experience. * Refactored configuration management to streamline the upgrade server URL and API key usage.
* Introduced logic to ignore tiny balances (dust) in the WalletTransferApprovalModal and migration processes. * Added utility function to calculate dust thresholds based on token decimals. * Updated balance checks in useEIP7702Account to treat small residual balances as zero for migration decisions. * Enhanced error handling for access token retrieval during migration.
* Updated .env.example to include NEXT_PUBLIC_UPGRADE_SERVER_URL for local development. * Modified config.ts to set upgradeServerUrl based on the new environment variable, defaulting to an empty string if not provided.
…related components * Changed environment variable from NEXT_PUBLIC_UPGRADE_SERVER_URL to NEXT_PUBLIC_BUNDLER_SERVER_URL in .env.example. * Updated Config type and configuration management to reflect the new bundler server URL. * Refactored WalletTransferApprovalModal to utilize the new bundler server URL for wallet upgrade and token transfer operations. * Enhanced error handling for bundler server URL validation.
… and useSmartWalletTransfer * Updated comments in PrivyConfigWrapper to remove deprecated references. * Removed unused import of useSmartWallets in TransferForm. * Enhanced error message in WalletTransferApprovalModal for clarity. * Refactored useSmartWalletTransfer to eliminate the client parameter and streamline migration handling.
* Eliminated the deprecated comment regarding the MEE API key in the Config type definition to improve clarity and maintainability.
Mee sponsore migration
* Added useEffect to manage transfer modal visibility based on isOpen state. * Simplified handleApproveMigration function to directly show transfer modal. * Adjusted rendering logic to prevent showing the wallet migration modal when the transfer modal is active.
refactor: improve WalletMigrationModal logic and state management
* refactor: enhance WalletMigrationModal and MigrationContext for improved modal visibility * Updated handleApproveMigration to prevent click-through issues and ensure proper modal display timing. * Implemented useEffect in MigrationContext to maintain stable visibility of migration-related modals during loading states. * Adjusted rendering logic to utilize stable visibility state for migration banner and zero balance modal. * feat: integrate smart wallet deployment in WalletTransferApprovalModal * Added useSmartWallets hook to manage smart wallet interactions. * Implemented logic to deploy wallets on the selected chain if not already deployed, enhancing the upgrade process to Nexus. * Updated progress messaging to reflect wallet deployment status during the upgrade. --------- Co-authored-by: Onah Prosper <prosperauthor@gmail.com>
* Simplified wallet deployment progress message by removing "Privy" reference. * Adjusted confirmation progress message to indicate a longer expected wait time (2–5 min) for transaction confirmation.
…nce) (#372) * feat: validate account identifier length for NUBAN and SAFAKEPC in recipient forms * fix: update error messages for account number validation and store sanitized digits for consistent database format * refactor: trim institution code for validation and consistent storage in recipient API * feat: add currency support and validate account identifier length for NGN in recipient forms --------- Co-authored-by: Prosper <40717516+onahprosper@users.noreply.github.com>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Tip Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs). Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Description
This pull request introduces several improvements and fixes across the recipient API, wallet migration flow, and transfer UI. The main focus is on enhancing data validation and sanitization for recipients, improving the wallet migration modal's user experience, and refining how token balances are displayed and handled during wallet migration.
Recipient API validation and sanitization:
currencyto the recipient creation API and enforced NUBAN digit-length validation for NGN recipients, ensuring account identifiers are the correct length (10 or 6 digits) depending on the institution code. Account identifiers are now sanitized and stored in a consistent format in the database. (app/api/v1/recipients/route.ts) [1] [2] [3] [4] [5]Wallet migration and transfer UI improvements:
useEffectand event handlers to manage the transfer modal's visibility. (app/components/WalletMigrationModal.tsx) [1] [2]app/components/WalletTransferApprovalModal.tsx) [1] [2] [3] [4]Code cleanup and dependency updates:
app/components/TransferForm.tsx) [1] [2] [3]app/api/v1/wallets/migration-status/route.ts)Configuration:
NEXT_PUBLIC_BUNDLER_SERVER_URLto the example.envfile. (.env.example)References
Testing
Checklist
mainBy submitting a PR, I agree to Paycrest's Contributor Code of Conduct and Contribution Guide.