Compare commits
2 changed files with 21 additions and 29 deletions
|
|
@ -159,12 +159,12 @@ above is the other half of the proof — request and artifact, separately checka
|
||||||
`contentDescription` carries (`walletChildStatusDescription`), so the spoken row
|
`contentDescription` carries (`walletChildStatusDescription`), so the spoken row
|
||||||
is never shorter than the visible one. Cross-compiled and unit-tested on the
|
is never shorter than the visible one. Cross-compiled and unit-tested on the
|
||||||
JVM; still not device-proven.
|
JVM; still not device-proven.
|
||||||
* **What writes that snapshot on Android.** The wallet screen's loop
|
* **What writes that snapshot on Android.** The wallet screen's 2 s loop
|
||||||
(`WireViewModel.openWalletChild` → `walletChildRefreshLoop`) does one cached
|
(`WireViewModel.refreshWalletChild`) calls `Wire.walletStatus()` — the cached
|
||||||
`Wire.walletStatus()` paint, then every 2 s a live
|
UniFFI read, no dial. The live probe `Wire.walletChildRefresh()`
|
||||||
`Wire.walletChildRefresh()` (`Wire::wallet_child_refresh`). The live call is
|
(`Wire::wallet_child_refresh` in `crates/onionwire-sdk`) exists and is what
|
||||||
what makes height/target move between ticks; it never spawns. See
|
makes height/target move between calls; the TUI uses it. The APK poller on
|
||||||
[README.md](README.md#what-the-apk-refresh-loop-actually-calls).
|
this tree does not. See [README.md](README.md#what-the-apk-refresh-loop-actually-calls).
|
||||||
* **Storage honesty.** The card shows the free space on the filesystem the fjall
|
* **Storage honesty.** The card shows the free space on the filesystem the fjall
|
||||||
store grows into (`StatFs` on the app's data dir) and refuses Start below a
|
store grows into (`StatFs` on the app's data dir) and refuses Start below a
|
||||||
floor, or when that filesystem cannot be read at all. The floor is a *floor*,
|
floor, or when that filesystem cannot be read at all. The floor is a *floor*,
|
||||||
|
|
@ -256,5 +256,6 @@ then unlock the node, open Wallet, tap **On-device node (Cuprate)**, read the
|
||||||
warning, press **Start wallet**, and watch the status line for
|
warning, press **Start wallet**, and watch the status line for
|
||||||
`connecting → syncing · in-process node · node starting → node syncing`. A wallet
|
`connecting → syncing · in-process node · node starting → node syncing`. A wallet
|
||||||
balance needs the chain synced, which on a phone is a long wait — the status line
|
balance needs the chain synced, which on a phone is a long wait — the status line
|
||||||
is the thing to watch, not the balance. After the first cached paint, the APK
|
is the thing to watch, not the balance. On this tree the APK loop will not itself
|
||||||
loop probes live every 2 s, so `sync h/t` should move once the daemon answers.
|
refresh height from the daemon; a live probe is a separate SDK call the TUI
|
||||||
|
makes and the Android poller does not.
|
||||||
|
|
|
||||||
|
|
@ -251,26 +251,17 @@ in-process daemon, the chain probe fails, and the state stays `syncing`.
|
||||||
|
|
||||||
### What the APK refresh loop actually calls
|
### What the APK refresh loop actually calls
|
||||||
|
|
||||||
`WireViewModel.openWalletChild()` runs `walletChildRefreshLoop` with a 2 s
|
`WireViewModel.openWalletChild()` polls every 2 s
|
||||||
tick (`WALLET_CHILD_TICK_MS = 2_000`):
|
(`WALLET_CHILD_TICK_MS = 2_000`). Each tick is `Wire.walletStatus()` — the
|
||||||
|
cached, non-dialing UniFFI read (`Wire::wallet_status`). It never spawns and
|
||||||
|
it never probes the daemon, so `sync h/t` only moves when something else
|
||||||
|
wrote a fresh snapshot (start, a previous live probe).
|
||||||
|
|
||||||
1. **First paint** — `paintWalletChildCached()` → `Wire.walletStatus()`
|
The SDK also exposes `Wire.walletChildRefresh()` (`Wire::wallet_child_refresh`):
|
||||||
(`Wire::wallet_status`). Cached, no dial, so the screen has a record
|
a live probe of the loopback wallet RPC, and of the local daemon's `get_info`
|
||||||
while the first probe is still in flight.
|
when that RPC does not answer. The TUI uses it. **This APK's poller does not.**
|
||||||
2. **Every tick after that** — `refreshWalletChild()` →
|
Do not read the moving `sync h/t` docs in [docs/WALLET.md](../docs/WALLET.md)
|
||||||
`Wire.walletChildRefresh()` (`Wire::wallet_child_refresh`). That dials
|
as a description of the Android loop on this tree.
|
||||||
the child's loopback wallet RPC, and the configured local daemon's
|
|
||||||
`get_info` when the wallet RPC does not answer, which is what makes
|
|
||||||
`sync h/t` move without another Start. It never spawns a child. With no
|
|
||||||
live child the core short-circuits to the cached `off` / `exited`
|
|
||||||
snapshot, so this cannot invent `ready`.
|
|
||||||
|
|
||||||
The loop suspends on each read before it sleeps: a probe slower than 2 s
|
|
||||||
delays the next tick instead of overlapping it. Do not run two concurrent
|
|
||||||
`wallet_child_refresh` calls against one child.
|
|
||||||
|
|
||||||
See [docs/WALLET.md](../docs/WALLET.md) (Android / SDK) for the same two
|
|
||||||
methods as the UniFFI surface.
|
|
||||||
|
|
||||||
## CI and releases
|
## CI and releases
|
||||||
|
|
||||||
|
|
@ -382,7 +373,7 @@ android/
|
||||||
RotateScreen.kt
|
RotateScreen.kt
|
||||||
Insets.kt
|
Insets.kt
|
||||||
Theme.kt
|
Theme.kt
|
||||||
src/test/ # JVM: envelope, store, invite, outbox, keepalive, wallet line, refresh loop
|
src/test/ # JVM: envelope, store, invite, outbox, keepalive, wallet line
|
||||||
src/androidTest/ # device-only: AndroidKeyStore
|
src/androidTest/ # device-only: AndroidKeyStore
|
||||||
src/main/jniLibs/arm64-v8a/libmonerowalletrpc.so
|
src/main/jniLibs/arm64-v8a/libmonerowalletrpc.so
|
||||||
```
|
```
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue