@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.
@@ -28084,7 +28084,10 @@ var WalletApiTokenStorageProvider = class {
28084
28084
  view = /* @__PURE__ */ new Map();
28085
28085
  /**
28086
28086
  * Empty-import protection (§5.1): no removal is ever pushed before this
28087
- * flips on the first successful inventory load.
28087
+ * flips on the first successful inventory load. Doubles as the per-session
28088
+ * first-sync flag (#521): while false, `syncInventory` full-pulls even with
28089
+ * a warm persisted cursor — the view Map is process-lifetime, so a reloaded
28090
+ * instance (tab refresh) must rebuild it before deltas can resume.
28088
28091
  */
28089
28092
  hadSuccessfulLoad = false;
28090
28093
  constructor(config) {
@@ -28205,7 +28208,7 @@ var WalletApiTokenStorageProvider = class {
28205
28208
  /** Converge the local view with the server (delta when possible). */
28206
28209
  async syncInventory() {
28207
28210
  const cursor = await this.readCursor();
28208
- if (cursor === null) {
28211
+ if (cursor === null || !this.hadSuccessfulLoad) {
28209
28212
  await this.fullPull();
28210
28213
  } else if (await this.deltaLoop(cursor)) {
28211
28214
  await this.handleSyncEpochChange();