Note: this only reflects my personal work this month. Visit the BTC Map Blog for consolidated monthly reports.
Table of Contents
API
Most of my July went into the API, and most of that went into the wallet subsystem.
Wallets
I implemented wallet xpub tracking in order to improve internal transparency and observability. On-the-fly electrs queries were pretty slow, so I also had to add a cache layer. The dashboard now reads from the snapshot instead of talking to Electrum directly.
Electrum
Electrum server configuration used to be a single conf.electrum_url string. I moved it to a dedicated electrum_server table managed by four new RPCs (get_electrum_servers, add_electrum_server, update_electrum_server, remove_electrum_server), with descending priority ordering and soft deletion.
I also added a small experimental SPKI-pinned Electrum client built on rustls + x509-parser for self-hosted Electrum servers with self-signed certs.
Platform Stats
I added platform stats to the dashboard RPC. It reports which platforms hit us (Android, web, etc.) over the 1/7/30-day windows and groups calls by platform/client app name (if supplied), which is useful for prioritizing our limited resources and for anomaly detection.
Config
Boost element prices moved from three hardcoded paywall_boost_element_{30,90,365}d_price_sat columns into a single boost_element_prices JSON array, so admins can configure arbitrary boost durations.
Maintenance
I unpegged the Rust toolchain, fixed a pile of clippy 1.96 lints, and derived strum::AsRefStr on most Columns enums.
Android
The big story this month is that MapFragment is no longer a god class. It shed roughly 500 lines and is now a thin orchestrator over a handful of focused components.
Caches
I extracted MerchantsCache into its own file (with proper async query handling and bounds-split across the antimeridian), then mirrored the pattern for events and exchanges via EventsCache and ExchangesCache. All three share a new ViewportCache<T> base class that handles the initial fetch in its init block, the camera-idle follow-ups, query cancellation, and id-based deduplication.
Controllers
Four controllers were extracted from MapFragment:
MapSetupControllerfor map style and layer setupMapSelectionControllerfor place/event/exchange selectionSearchControllerfor the search overlayLocationController(with a constructor race fixed inViewportCache)
A new publish.sh helper was added to the repo to streamline publishing new builds.
Area Screen
Upcoming events are now displayed as clickable cards with icons in the area screen, with a dedicated background drawable. The Phuket area screen got its website URL overridden and aligned to start. One-off events are listed alongside upcoming events, with upcoming events sorted by date.
Activity Feed
Local activity feed gained filter support, so users can scope it to a specific area and period (filter icon added, menu and layout updated). Area image loading was optimized to avoid redundant network calls.
Event Admin
I started a new internal project: Event Admin. It is a small static admin site that talks to the BTC Map API and lets admins browse, rename, and edit events directly on the map. The marker popup got a Rename action that swaps the event name for an inline editor (Enter to save, Esc to cancel) and calls update_event via RPC, and an Edit button that opens the full event form.
Dashboard
Dashboard caught up to the wallet work:
- Added platform stats
- Added wallet stats with snapshot timestamp
- Added per-wallet transaction popup
- Adapted the wallets UI to the new
walletRPC shape (add_wallet/get_wallets/update_wallet/remove_wallet)
CLI
The CLI gained wrappers for the new wallet and electrum server RPCs (wallet add/get/update/remove, electrum-server add/get/update/remove), a new event update-event command, and type-specific search commands. Existing event commands were synced with the new update_event/get_events shapes.
Future Plans
A few things on my mind:
- Prepare a new Android release. The MapFragment refactor clears the runway.
- Keep pushing on the wallet side. New transaction notifications and more ergonomic CLI would be nice.
- Continue expanding the dashboard with more of the data we already collect.
- General API cleanup. The DB layer needs some love, and I also need a better taxonomy for all the RPCs we have.