Skip to content

feat: add MCC/MNC prefix validation middleware for destination phone numbers#1135

Open
MJ-RWA wants to merge 1 commit into
sublime247:mainfrom
MJ-RWA:feat/mcc-mnc-network-validation
Open

feat: add MCC/MNC prefix validation middleware for destination phone numbers#1135
MJ-RWA wants to merge 1 commit into
sublime247:mainfrom
MJ-RWA:feat/mcc-mnc-network-validation

Conversation

@MJ-RWA
Copy link
Copy Markdown
Contributor

@MJ-RWA MJ-RWA commented May 30, 2026

Changes Made

Added src/constants/networkPrefixes.ts with a prefix-to-network map covering MTN, Airtel, and Orange carrier ranges
Created src/middleware/validateNetworkMiddleware.ts that normalizes phone numbers, resolves the carrier prefix, and rejects unsupported numbers with a 400
Attaches resolvedNetwork to req.body for downstream provider logic to consume
Mounted validateNetwork middleware on all transfer, send, and payout routes in src/routes/

Closes: #865

@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented May 30, 2026

@MJ-RWA 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

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.

[GOOD FIRST ISSUE] Add MCC/MNC Network Validation for Destination Numbers

1 participant