@1sat/wallet-toolbox 0.0.63 → 0.0.64
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.
- package/dist/wallet/factory.js +4 -0
- package/package.json +1 -1
package/dist/wallet/factory.js
CHANGED
|
@@ -95,6 +95,10 @@ export async function createWebWallet(config) {
|
|
|
95
95
|
// Add remote storage to the existing storage manager using public API
|
|
96
96
|
await storage.addWalletStorageProvider(remoteClient);
|
|
97
97
|
console.log("[createWebWallet] Remote storage connected successfully");
|
|
98
|
+
// Pull changes from remote to sync with other devices
|
|
99
|
+
console.log("[createWebWallet] Syncing from remote...");
|
|
100
|
+
const syncResult = await storage.syncFromReader(identityPubKey, remoteClient);
|
|
101
|
+
console.log(`[createWebWallet] Synced from remote: ${syncResult.inserts} inserts, ${syncResult.updates} updates`);
|
|
98
102
|
}
|
|
99
103
|
catch (err) {
|
|
100
104
|
console.log("[createWebWallet] Remote storage connection failed:", err instanceof Error ? err.message : err);
|