@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.
@@ -2188,7 +2188,10 @@ declare class WalletApiTokenStorageProvider implements TokenStorageProvider<TxfS
2188
2188
  private readonly view;
2189
2189
  /**
2190
2190
  * Empty-import protection (§5.1): no removal is ever pushed before this
2191
- * flips on the first successful inventory load.
2191
+ * flips on the first successful inventory load. Doubles as the per-session
2192
+ * first-sync flag (#521): while false, `syncInventory` full-pulls even with
2193
+ * a warm persisted cursor — the view Map is process-lifetime, so a reloaded
2194
+ * instance (tab refresh) must rebuild it before deltas can resume.
2192
2195
  */
2193
2196
  private hadSuccessfulLoad;
2194
2197
  constructor(config: WalletApiTokenStorageConfig);
@@ -2188,7 +2188,10 @@ declare class WalletApiTokenStorageProvider implements TokenStorageProvider<TxfS
2188
2188
  private readonly view;
2189
2189
  /**
2190
2190
  * Empty-import protection (§5.1): no removal is ever pushed before this
2191
- * flips on the first successful inventory load.
2191
+ * flips on the first successful inventory load. Doubles as the per-session
2192
+ * first-sync flag (#521): while false, `syncInventory` full-pulls even with
2193
+ * a warm persisted cursor — the view Map is process-lifetime, so a reloaded
2194
+ * instance (tab refresh) must rebuild it before deltas can resume.
2192
2195
  */
2193
2196
  private hadSuccessfulLoad;
2194
2197
  constructor(config: WalletApiTokenStorageConfig);
@@ -28048,7 +28048,10 @@ var WalletApiTokenStorageProvider = class {
28048
28048
  view = /* @__PURE__ */ new Map();
28049
28049
  /**
28050
28050
  * Empty-import protection (§5.1): no removal is ever pushed before this
28051
- * flips on the first successful inventory load.
28051
+ * flips on the first successful inventory load. Doubles as the per-session
28052
+ * first-sync flag (#521): while false, `syncInventory` full-pulls even with
28053
+ * a warm persisted cursor — the view Map is process-lifetime, so a reloaded
28054
+ * instance (tab refresh) must rebuild it before deltas can resume.
28052
28055
  */
28053
28056
  hadSuccessfulLoad = false;
28054
28057
  constructor(config) {
@@ -28169,7 +28172,7 @@ var WalletApiTokenStorageProvider = class {
28169
28172
  /** Converge the local view with the server (delta when possible). */
28170
28173
  async syncInventory() {
28171
28174
  const cursor = await this.readCursor();
28172
- if (cursor === null) {
28175
+ if (cursor === null || !this.hadSuccessfulLoad) {
28173
28176
  await this.fullPull();
28174
28177
  } else if (await this.deltaLoop(cursor)) {
28175
28178
  await this.handleSyncEpochChange();