@1sat/wallet-toolbox 0.0.15 → 0.0.16

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.
@@ -110,19 +110,21 @@ export async function createWebWallet(config) {
110
110
  storageAny._backups = [];
111
111
  }
112
112
  // If there are conflicting actives (including reclassified backups), resolve by merging into local
113
- // Non-blocking to avoid IDB transaction timeout
113
+ // This is now blocking since setActive no longer holds IDB transactions during network calls
114
114
  if (storageAny._conflictingActives && storageAny._conflictingActives.length > 0) {
115
115
  const localKey = storageAny._active?.settings?.storageIdentityKey;
116
116
  if (localKey && storageAny.setActive) {
117
117
  console.log("[createWebWallet] Syncing with remote storage...");
118
- storageAny.setActive(localKey, (msg) => {
119
- console.log("[createWebWallet] Sync:", msg);
120
- return msg;
121
- }).then(() => {
118
+ try {
119
+ await storageAny.setActive(localKey, (msg) => {
120
+ console.log("[createWebWallet] Sync:", msg);
121
+ return msg;
122
+ });
122
123
  console.log("[createWebWallet] Remote sync complete");
123
- }).catch((err) => {
124
+ }
125
+ catch (err) {
124
126
  console.log("[createWebWallet] Remote sync failed:", err instanceof Error ? err.message : err);
125
- });
127
+ }
126
128
  }
127
129
  }
128
130
  // Update wallet's storage reference
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@1sat/wallet-toolbox",
3
- "version": "0.0.15",
3
+ "version": "0.0.16",
4
4
  "description": "BSV wallet library extending @bsv/wallet-toolbox with 1Sat Ordinals protocol support",
5
5
  "author": "1Sat Team",
6
6
  "license": "MIT",