@unicitylabs/sphere-sdk 0.9.1-dev.8 → 0.9.1-dev.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1517,7 +1517,10 @@ var WalletApiTokenStorageProvider = class {
1517
1517
  view = /* @__PURE__ */ new Map();
1518
1518
  /**
1519
1519
  * Empty-import protection (§5.1): no removal is ever pushed before this
1520
- * flips on the first successful inventory load.
1520
+ * flips on the first successful inventory load. Doubles as the per-session
1521
+ * first-sync flag (#521): while false, `syncInventory` full-pulls even with
1522
+ * a warm persisted cursor — the view Map is process-lifetime, so a reloaded
1523
+ * instance (tab refresh) must rebuild it before deltas can resume.
1521
1524
  */
1522
1525
  hadSuccessfulLoad = false;
1523
1526
  constructor(config) {
@@ -1638,7 +1641,7 @@ var WalletApiTokenStorageProvider = class {
1638
1641
  /** Converge the local view with the server (delta when possible). */
1639
1642
  async syncInventory() {
1640
1643
  const cursor = await this.readCursor();
1641
- if (cursor === null) {
1644
+ if (cursor === null || !this.hadSuccessfulLoad) {
1642
1645
  await this.fullPull();
1643
1646
  } else if (await this.deltaLoop(cursor)) {
1644
1647
  await this.handleSyncEpochChange();