Skip to content

Fix/bugs 293 298 299 300 - #369

Open
krypto-boi wants to merge 2 commits into
kellymusk:mainfrom
krypto-boi:fix/bugs-293-298-299-300
Open

Fix/bugs 293 298 299 300#369
krypto-boi wants to merge 2 commits into
kellymusk:mainfrom
krypto-boi:fix/bugs-293-298-299-300

Conversation

@krypto-boi

Copy link
Copy Markdown

Title: fix: resolve bugs #293, #298, #299, #300

─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

Description:

Summary

This PR addresses four bugs identified in the backlog. All changes are isolated, tested locally, and ready for review.

Closes #293
Closes #298
Closes #299
Closes #300

─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

Changes

#293 — Formatter scope too narrow

Expanded the format:check script to cover all relevant file types: .ts, .tsx, .css, .json, and .md. Previously only a subset of
files were being checked, allowing formatting inconsistencies to slip through CI.

#298 — Incomplete environment variable validation

Rewrote scripts/check-env.sh to validate all 20+ required environment variables across every integration — Upstash Redis, M-Pesa,
MTN MoMo, Paystack, Flutterwave, Sentry, and Vercel. The previous script missed several critical vars, making misconfigured
deployments hard to catch early.

#299 — Service Worker updates interrupting active payment flows

Set skipWaiting to false in the PWA config and introduced a new PwaUpdateBanner component. Updates now wait for the user to
acknowledge before activating the new service worker, preventing in-flight payment sessions from being wiped mid-transaction.

#300 — Hardcoded balance in Send Modal

Replaced the hardcoded cNGN balance in SendModal with a live value pulled from useBalanceContext(), keyed on the currently
selected currency. Users now see their real balance for any asset they choose to send.

─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

Files Changed

┌─────────────────────────────────────┬──────────────────────────────────────────────┐
│ File │ Change │
├─────────────────────────────────────┼──────────────────────────────────────────────┤
│ scripts/check-env.sh │ Full rewrite for complete env var coverage │
├─────────────────────────────────────┼──────────────────────────────────────────────┤
│ next.config.mjs │ Set skipWaiting: false in PWA config │
├─────────────────────────────────────┼──────────────────────────────────────────────┤
│ components/pwa-update-banner.tsx │ New component for user-controlled SW updates │
├─────────────────────────────────────┼──────────────────────────────────────────────┤
│ components/dashboard/send-modal.tsx │ Live balance via useBalanceContext() │
├─────────────────────────────────────┼──────────────────────────────────────────────┤
│ app/layout.tsx │ Mount PwaUpdateBanner │
├─────────────────────────────────────┼──────────────────────────────────────────────┤
│ db/notifications.json │ Seed data for notifications │
├─────────────────────────────────────┼──────────────────────────────────────────────┤
│ package.json / package-lock.json │ Dependency updates │
└─────────────────────────────────────┴──────────────────────────────────────────────┘

─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

Testing

  • All four fixes verified locally
  • Send modal reflects correct balance for each currency
  • PWA update banner appears on new service worker detection without breaking active sessions
  • check-env.sh correctly fails on missing vars and passes on complete config
  • format:check runs across all file types without errors

…usk#300

- kellymusk#293: expand format:check to cover all ts/tsx/css/json/md files
- kellymusk#298: rewrite check-env.sh to validate all 20+ required env vars
  including Upstash Redis, M-Pesa, MTN MoMo, Paystack, Flutterwave,
  Sentry and Vercel variables
- kellymusk#299: set skipWaiting to false in PWA config and add PwaUpdateBanner
  component so in-flight payment flows are not interrupted by SW updates
- kellymusk#300: replace hardcoded cNGN balance in SendModal with live value
  from useBalanceContext() keyed on the selected currency
@vercel

vercel Bot commented Jul 28, 2026

Copy link
Copy Markdown

@krypto-boi is attempting to deploy a commit to the kelly musk's projects Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave

drips-wave Bot commented Jul 28, 2026

Copy link
Copy Markdown

@krypto-boi 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