@1sat/wallet-toolbox 0.0.12 → 0.0.14

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.
@@ -11,8 +11,8 @@ import { OneSatServices } from "../services/OneSatServices";
11
11
  const DEFAULT_DATABASE_NAME = "wallet";
12
12
  // Default timeout for remote storage connection
13
13
  const DEFAULT_REMOTE_STORAGE_TIMEOUT = 5000;
14
- // Default fee model
15
- const DEFAULT_FEE_MODEL = { model: "sat/kb", value: 1 };
14
+ // Default fee model (100 sat/kb matches yours-wallet and 1sat-indexer minimum)
15
+ const DEFAULT_FEE_MODEL = { model: "sat/kb", value: 100 };
16
16
  /**
17
17
  * Parse a private key from various input formats.
18
18
  * Supports PrivateKey instance, WIF string, or hex string.
@@ -101,15 +101,19 @@ export async function createWebWallet(config) {
101
101
  conflictingActives: storageAny._conflictingActives?.map(c => c.settings?.storageIdentityKey),
102
102
  });
103
103
  // If there are conflicting actives, resolve by setting local as active (merges remote data)
104
+ // Non-blocking to avoid IDB transaction timeout
104
105
  if (storageAny._conflictingActives && storageAny._conflictingActives.length > 0) {
105
106
  const localKey = storageAny._active?.settings?.storageIdentityKey;
106
107
  if (localKey && storageAny.setActive) {
107
108
  console.log("[createWebWallet] Resolving conflicts by merging into local storage...");
108
- await storageAny.setActive(localKey, (msg) => {
109
+ storageAny.setActive(localKey, (msg) => {
109
110
  console.log("[createWebWallet] Sync:", msg);
110
111
  return msg;
112
+ }).then(() => {
113
+ console.log("[createWebWallet] Conflict resolution complete");
114
+ }).catch((err) => {
115
+ console.log("[createWebWallet] Conflict resolution failed:", err instanceof Error ? err.message : err);
111
116
  });
112
- console.log("[createWebWallet] Conflict resolution complete");
113
117
  }
114
118
  }
115
119
  else if (storageAny._backups && storageAny._backups.length > 0 && storageAny.updateBackups) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@1sat/wallet-toolbox",
3
- "version": "0.0.12",
3
+ "version": "0.0.14",
4
4
  "description": "BSV wallet library extending @bsv/wallet-toolbox with 1Sat Ordinals protocol support",
5
5
  "author": "1Sat Team",
6
6
  "license": "MIT",
@@ -42,7 +42,7 @@
42
42
  "buffer": "^6.0.3"
43
43
  },
44
44
  "peerDependencies": {
45
- "@bsv/wallet-toolbox-mobile": "npm:@bopen-io/wallet-toolbox-mobile@^1.7.20-idb-fix.2"
45
+ "@bsv/wallet-toolbox-mobile": "npm:@bopen-io/wallet-toolbox-mobile@^1.7.20-idb-fix.4"
46
46
  },
47
47
  "peerDependenciesMeta": {
48
48
  "@bsv/wallet-toolbox-mobile": {
@@ -51,8 +51,8 @@
51
51
  },
52
52
  "devDependencies": {
53
53
  "@biomejs/biome": "^1.9.4",
54
- "@bsv/wallet-toolbox": "npm:@bopen-io/wallet-toolbox@^1.7.20-idb-fix.2",
55
- "@bsv/wallet-toolbox-mobile": "npm:@bopen-io/wallet-toolbox-mobile@^1.7.20-idb-fix.2",
54
+ "@bsv/wallet-toolbox": "npm:@bopen-io/wallet-toolbox@^1.7.20-idb-fix.4",
55
+ "@bsv/wallet-toolbox-mobile": "npm:@bopen-io/wallet-toolbox-mobile@^1.7.20-idb-fix.4",
56
56
  "@types/bun": "^1.3.4",
57
57
  "@types/chrome": "^0.1.32",
58
58
  "typescript": "^5.9.3"