Summary
src/legacy/legacy-cli.ts case 'invoice-status' calls:
await ensureSync(sphere, 'nostr');
But invoice-status displays per-target balance from on-chain payment attribution, which requires IPFS-pulled state (not just Nostr-pulled inbox). 'nostr' mode doesn't trigger the IPFS / Profile pull, so on a fresh device or after a wipe, invoice-status reports stale or empty status.
The other invoice commands use the right mode:
case 'invoice-deliver' → ensureSync(sphere, 'full') ✓
case 'invoice-status' → ensureSync(sphere, 'nostr') ✗ (should be 'full')
case 'invoice-list' → ensureSync(sphere, 'nostr') (probably also wrong, same reasoning)
Fix
Trivial — change 'nostr' to 'full' in the case 'invoice-status' handler (and probably case 'invoice-list' too, but worth confirming separately):
case 'invoice-status': {
...
const sphere = await getSphere();
...
- await ensureSync(sphere, 'nostr');
+ await ensureSync(sphere, 'full');
...
Note on the deeper bug
This fix alone won't make invoice-status work on a peer that received the invoice via Nostr — that needs sphere-sdk #230 (AccountingModule.invoiceTermsCache refresh on sync:completed). Both fixes are required for the full cross-device flow.
Related
Acceptance
Summary
src/legacy/legacy-cli.tscase 'invoice-status'calls:But
invoice-statusdisplays per-target balance from on-chain payment attribution, which requires IPFS-pulled state (not just Nostr-pulled inbox).'nostr'mode doesn't trigger the IPFS / Profile pull, so on a fresh device or after a wipe,invoice-statusreports stale or empty status.The other invoice commands use the right mode:
case 'invoice-deliver'→ensureSync(sphere, 'full')✓case 'invoice-status'→ensureSync(sphere, 'nostr')✗ (should be'full')case 'invoice-list'→ensureSync(sphere, 'nostr')(probably also wrong, same reasoning)Fix
Trivial — change
'nostr'to'full'in thecase 'invoice-status'handler (and probablycase 'invoice-list'too, but worth confirming separately):case 'invoice-status': { ... const sphere = await getSphere(); ... - await ensureSync(sphere, 'nostr'); + await ensureSync(sphere, 'full'); ...Note on the deeper bug
This fix alone won't make
invoice-statuswork on a peer that received the invoice via Nostr — that needs sphere-sdk #230 (AccountingModule.invoiceTermsCacherefresh onsync:completed). Both fixes are required for the full cross-device flow.Related
Acceptance
invoice-statuscallsensureSync(sphere, 'full')invoice-listfor the same mismatchmanual-test-full-recovery.sh§C.4 progresses past the "No invoice found matching prefix" error (with sphere-sdk #230 also landed)