Skip to content

feat(v3): mesh network adapter, storage refactor, BLE peers, notifications, wallet fixes#13

Merged
Magicred-1 merged 1 commit into
v3from
v3-magic-branch
Apr 28, 2026
Merged

feat(v3): mesh network adapter, storage refactor, BLE peers, notifications, wallet fixes#13
Magicred-1 merged 1 commit into
v3from
v3-magic-branch

Conversation

@Magicred-1
Copy link
Copy Markdown
Member

Summary

  • Offline/mesh RPC adapter (src/infrastructure/network): IRpcAdapter abstraction with DirectRpcAdapter (direct Solana RPC) and MeshRpcAdapter (JSON-RPC over LXMF relay to beacon). useNetworkMode hook detects online / mesh / isolated via OS NetInfo + live beacon/peer/BLE state — zero polling, zero RPC spam. NetworkStatusBadge component shows live mode in WalletScreen.
  • Storage refactor: All SecureStore/AsyncStorage raw calls replaced with typed src/storage/index.ts service (SecureKeys, PrefKeys, LegacySecureKeys). Fixes latent MWA token key mismatch. LocalWallet.delete() zeroes keys before deletion (secure wipe).
  • BLE mesh peers: Live GATT peer count + rows in NodesScreen. BLE chip now uses ifaceCounts['BLE'] so count matches the actual peer list. Always shows count when BLE is active.
  • In-app notifications: Trigger on received LXMF messages, navigate to correct chat on tap, suppressed only when already in that chat. 200-event-cap fixed via sliceNewEvents.
  • BalanceCard: Rewrote from broken merge — removed placeholder refs, wired to live useWalletBalance + useHideBalance.
  • Fix RPC 429 spam: useWalletBalance now uses ref-based trigger (effect fires only on publicKey/isConnected change, not refetch identity), 30s cooldown guard, activity limit 15→10.
  • LoadingOverlay: Faster animations, adjustsFontSizeToFit on display name.
  • EAS iOS: aps-environment: production entitlement added for push notification provisioning.

Test plan

  • BLE peers appear in Nodes tab and BLE chip count matches peer list rows
  • onlinemeshisolated badge transitions correctly on wallet screen
  • Offline: MeshRpcAdapter routes TX to beacon relay (requires beacon relay service)
  • In-app notification fires from other tab, tap opens correct chat
  • Wallet delete zeroes keychain entries before removal
  • BalanceCard shows live SOL + SPL tokens on devnet wallet
  • No 429 spam in logs during normal wallet usage
  • EAS iOS preview build passes provisioning

🤖 Generated with Claude Code

…r fixes

- Add src/infrastructure/network: IRpcAdapter interface, DirectRpcAdapter
  (direct Solana RPC), MeshRpcAdapter (JSON-RPC over LXMF relay), and
  useNetworkMode hook — detects online/mesh/isolated via NetInfo + beacon
  freshness + live peer/BLE state. No polling, no RPC spam.
- Add @react-native-community/netinfo for OS-level connectivity detection.
- NetworkStatusBadge: shows live mode pill (ONLINE/MESH RELAY/ISOLATED)
  above BalanceCard in WalletScreen.
- Fix useWalletBalance 429 spam: ref-based trigger so effect only fires on
  publicKey/isConnected change (not refetch identity), 30s cooldown guard,
  activity limit 15→10, extract helpers to reduce cognitive complexity.
- LoadingOverlay: faster animations (dots 280→160ms, cursor 420→260ms,
  stamp spring tension 90→130), display name adjustsFontSizeToFit.
- NodesScreen BLE chip: use ifaceCounts['BLE'] so chip count matches peer
  list rows; always show count when bleActive.
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.

1 participant