Repository navigation
feat(bills): wire web bills page to NGN rails and extract shared mobile BillFlow - #1145
Meet-hybrid wants to merge 7 commits into
Conversation
…d mobile BillFlow
|
@Meet-hybrid is attempting to deploy a commit to the miracle656's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
@Meet-hybrid 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! 🚀 |
The two web-editor merges of main kept both sides of each conflict instead of choosing between them, leaving bills/page.tsx, billFlow.ts and its test syntactically broken. Redo the resolution: - Web (Miracle656#1131): keep main's bills page and naira client, which already ship the live airtime flow with bounded polling and passkey-cancel handling, and port this PR's "Pay for" grid (Airtime and Transfer live, the rest marked Soon) into it. Keep this PR's payBill/getBillStatus tests. - Mobile (Miracle656#1132): keep the shared BillFlow refactor and fold in main's changes: the 'unconfirmed' step, 'cancel' as a failed status, and the passkey-cancel handling (now in components/BillFlow.tsx, since airtime.tsx delegates to it). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Merge-conflict fix pushed ( |
|
| GitGuardian id | GitGuardian status | Secret | Commit | Filename | |
|---|---|---|---|---|---|
| 38349992 | Triggered | Generic High Entropy Secret | 93aed41 | sdk/src/tests/allowance.test.ts | View secret |
🛠 Guidelines to remediate hardcoded secrets
- Understand the implications of revoking this secret by investigating where it is used in your code.
- Replace and store your secret safely. Learn here the best practices.
- Revoke and rotate this secret.
- If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.
To avoid such incidents in the future consider
- following these best practices for managing and storing secrets including API keys and other credentials
- install secret detection on pre-commit to catch secret before it leaves your machine and ease remediation.
🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.
Overview
This PR addresses two related issues in the Nigerian bills and NGN rails layer across the web and mobile wallets:
#1131):frontend/wallet/app/bills/page.tsxpreviously stated that the naira conversion and bill rails were not built and disabled every service tile, even though/ngn/billsshipped on Linq and airtime is live. We added the/ngn/billsclient methods (payBill,getBillStatus,BillCategory,BillOrder,BillStatus) tofrontend/wallet/lib/ngn.ts, updatedfrontend/wallet/app/bills/page.tsxso live services (AirtimeandTransfer→/cashout) are active while unshipped categories remain honestly markedSoon(with zero invented balances or fake history), and updated the remaining eBills-blocker references indocs/NGN_RAILS.md.#1132):frontend/mobile/app/airtime.tsxpreviously bundled the entire 5-step bill payment state machine (form→confirm→paying→done/failed) alongside airtime-specific phone and prefix logic. We extracted the shared bill payment machinery intofrontend/mobile/lib/billFlow.tsandfrontend/mobile/components/BillFlow.tsxbehind a documented per-category seam (BillCategoryConfig), and refactoredfrontend/mobile/app/airtime.tsxto be the first consumer ofBillFlow.Related Issues
airtime.tsx#1132Changes
Issue 1 — Web wallet bills page &
docs/NGN_RAILS.md(#1131)frontend/wallet/lib/ngn.ts:BillCategory,BillOrder,BillStatus,payBill(POST /ngn/bills), andgetBillStatus(GET /ngn/bills/:orderId?customerRef=...) sharing the existingcall<T>client (x-network: mainnetheader, transient retry budget, and provider-name scrubbing).frontend/wallet/app/bills/page.tsx:/ngn/billsrail."Not live yet — The rails are chosen. The paperwork is not done"card with the live Airtime top-up flow backed by@/lib/ngn(mainnet gate, one-time NIN KYC check and/verify?returnTo=/billshandoff, prefix-based network detection with manual override, per-coin rate quote, order reservation viapayBill,/senddeposit handoff, andgetBillStatuspolling).AirtimeandTransfer(/cashout) asLivein thePay forgrid while keeping unshipped categories markedSoon, with no invented balances or fake purchase history.docs/NGN_RAILS.md:Decided sequencing,First blocker, andOpen itemssections to reflect that/ngn/billsshipped on Linq (wraith/src/linq/bills.ts) and superseded the eBills float/reseller-role blocker.frontend/wallet/lib/__tests__/ngn.test.ts:payBillandgetBillStatus.Issue 2 — Shared mobile bill flow & per-category seam (#1132)
frontend/mobile/lib/billFlow.ts:BillCategoryConfig,BillCategoryCopy,BillSummaryRow,BillStep,BillRateState).parseBillAmountNgn,computeBillCryptoCost,lockBillAmountStableCoin,canContinueBillForm,classifyBillPollStatus, andexecuteBillPaymentenforcing reserve-first viapayBilland spend-second viaspendAssetusing the order's locked amount).frontend/mobile/components/BillFlow.tsx:form→confirm→paying→done/failed), including mainnet gating,customerRefand classicG…refundAddressresolution, per-coin rate loading, NIN KYC check and/verifybounce,previewSpendFeeon the confirm step before the passkey prompt, order reservation + spend execution, andgetBillStatuspolling with silent transient poll error handling.frontend/mobile/app/airtime.tsx:AirtimeScreenonto<BillFlow>, keepingPREFIXES,NETWORKS,detectNetwork,isValidNigerianPhone,buildAirtimeCategoryConfig, the network selector chips, and the phone number input + contact picker on the airtime side of the seam.frontend/mobile/lib/__tests__/billFlow.test.ts:electricity) plugged into the shared seam without duplicating flow logic.Verification Results