@txnlab/use-wallet-solid 3.0.0-rc.2 → 3.0.0

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/LICENSE.md CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2022 TxnLab Inc.
1
+ Copyright (c) 2024 TxnLab Inc.
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
package/README.md CHANGED
@@ -1,7 +1,8 @@
1
1
  # @txnlab/use-wallet-solid
2
2
 
3
- Solid.js adapter for [@txnlab/use-wallet](https://github.com/TxnLab/use-wallet/tree/v3/packages/use-wallet)
3
+ [![GitHub package.json version](https://img.shields.io/github/package-json/v/TxnLab/use-wallet?filename=packages%2Fuse-wallet-solid%2Fpackage.json&label=version)](https://www.npmjs.com/package/@txnlab/use-wallet?activeTab=versions)
4
+ [![GitHub License](https://img.shields.io/github/license/TxnLab/use-wallet)](https://github.com/TxnLab/use-wallet/blob/main/LICENSE.md)
4
5
 
5
- ## License
6
+ Solid.js adapter for [@txnlab/use-wallet](https://github.com/TxnLab/use-wallet)
6
7
 
7
- MIT ©2024 [TxnLab, Inc.](https://txnlab.dev)
8
+ ### Visit [txnlab.gitbook.io/use-wallet](https://txnlab.gitbook.io/use-wallet) for docs, guides, and examples!
package/dist/dev.cjs CHANGED
@@ -76,8 +76,7 @@ function createEffect(fn, value, options) {
76
76
  const c = createComputation(fn, value, false, STALE), s = SuspenseContext && useContext(SuspenseContext);
77
77
  if (s)
78
78
  c.suspense = s;
79
- if (!options || !options.render)
80
- c.user = true;
79
+ c.user = true;
81
80
  Effects ? Effects.push(c) : updateComputation(c);
82
81
  }
83
82
  function createMemo(fn, value, options) {
@@ -141,7 +140,7 @@ function startTransition(fn) {
141
140
  t.done || (t.done = new Promise((res) => t.resolve = res));
142
141
  t.running = true;
143
142
  }
144
- runUpdates(fn, false);
143
+ runUpdates(fn);
145
144
  Listener = Owner = null;
146
145
  return t ? t.done : void 0;
147
146
  });
@@ -176,7 +175,7 @@ function readSignal() {
176
175
  else {
177
176
  const updates = Updates;
178
177
  Updates = null;
179
- runUpdates(() => lookUpstream(this), false);
178
+ runUpdates(() => lookUpstream(this));
180
179
  Updates = updates;
181
180
  }
182
181
  }
@@ -240,7 +239,7 @@ function writeSignal(node, value, isComp) {
240
239
  ;
241
240
  throw new Error();
242
241
  }
243
- }, false);
242
+ });
244
243
  }
245
244
  }
246
245
  return value;
@@ -262,7 +261,7 @@ function updateComputation(node) {
262
261
  Listener = Owner = node;
263
262
  runComputation(node, node.tValue, time);
264
263
  Listener = Owner = null;
265
- }, false);
264
+ });
266
265
  });
267
266
  }
268
267
  }
@@ -378,7 +377,7 @@ function runTop(node) {
378
377
  } else if ((runningTransition ? node.tState : node.state) === PENDING) {
379
378
  const updates = Updates;
380
379
  Updates = null;
381
- runUpdates(() => lookUpstream(node, ancestors[0]), false);
380
+ runUpdates(() => lookUpstream(node, ancestors[0]));
382
381
  Updates = updates;
383
382
  }
384
383
  }
@@ -387,8 +386,7 @@ function runUpdates(fn, init) {
387
386
  if (Updates)
388
387
  return fn();
389
388
  let wait = false;
390
- if (!init)
391
- Updates = [];
389
+ Updates = [];
392
390
  if (Effects)
393
391
  wait = true;
394
392
  else
@@ -443,7 +441,7 @@ function completeUpdates(wait) {
443
441
  v.tState = 0;
444
442
  }
445
443
  setTransPending(false);
446
- }, false);
444
+ });
447
445
  } else if (Transition.running) {
448
446
  Transition.running = false;
449
447
  Transition.effects.push.apply(Transition.effects, Effects);
@@ -455,7 +453,7 @@ function completeUpdates(wait) {
455
453
  const e = Effects;
456
454
  Effects = null;
457
455
  if (e.length)
458
- runUpdates(() => runEffects(e), false);
456
+ runUpdates(() => runEffects(e));
459
457
  if (res)
460
458
  res();
461
459
  }
@@ -474,7 +472,7 @@ function scheduleQueue(queue) {
474
472
  runUpdates(() => {
475
473
  Transition.running = true;
476
474
  runTop(item);
477
- }, false);
475
+ });
478
476
  Transition && (Transition.running = false);
479
477
  });
480
478
  }
@@ -740,7 +738,6 @@ function useWallet() {
740
738
  if (activeNetwork() === networkId) {
741
739
  return;
742
740
  }
743
- await manager().disconnect();
744
741
  console.info(`[Solid] Creating Algodv2 client for ${networkId}...`);
745
742
  const {
746
743
  token,
package/dist/dev.js CHANGED
@@ -70,8 +70,7 @@ function createEffect(fn, value, options) {
70
70
  const c = createComputation(fn, value, false, STALE), s = SuspenseContext && useContext(SuspenseContext);
71
71
  if (s)
72
72
  c.suspense = s;
73
- if (!options || !options.render)
74
- c.user = true;
73
+ c.user = true;
75
74
  Effects ? Effects.push(c) : updateComputation(c);
76
75
  }
77
76
  function createMemo(fn, value, options) {
@@ -135,7 +134,7 @@ function startTransition(fn) {
135
134
  t.done || (t.done = new Promise((res) => t.resolve = res));
136
135
  t.running = true;
137
136
  }
138
- runUpdates(fn, false);
137
+ runUpdates(fn);
139
138
  Listener = Owner = null;
140
139
  return t ? t.done : void 0;
141
140
  });
@@ -170,7 +169,7 @@ function readSignal() {
170
169
  else {
171
170
  const updates = Updates;
172
171
  Updates = null;
173
- runUpdates(() => lookUpstream(this), false);
172
+ runUpdates(() => lookUpstream(this));
174
173
  Updates = updates;
175
174
  }
176
175
  }
@@ -234,7 +233,7 @@ function writeSignal(node, value, isComp) {
234
233
  ;
235
234
  throw new Error();
236
235
  }
237
- }, false);
236
+ });
238
237
  }
239
238
  }
240
239
  return value;
@@ -256,7 +255,7 @@ function updateComputation(node) {
256
255
  Listener = Owner = node;
257
256
  runComputation(node, node.tValue, time);
258
257
  Listener = Owner = null;
259
- }, false);
258
+ });
260
259
  });
261
260
  }
262
261
  }
@@ -372,7 +371,7 @@ function runTop(node) {
372
371
  } else if ((runningTransition ? node.tState : node.state) === PENDING) {
373
372
  const updates = Updates;
374
373
  Updates = null;
375
- runUpdates(() => lookUpstream(node, ancestors[0]), false);
374
+ runUpdates(() => lookUpstream(node, ancestors[0]));
376
375
  Updates = updates;
377
376
  }
378
377
  }
@@ -381,8 +380,7 @@ function runUpdates(fn, init) {
381
380
  if (Updates)
382
381
  return fn();
383
382
  let wait = false;
384
- if (!init)
385
- Updates = [];
383
+ Updates = [];
386
384
  if (Effects)
387
385
  wait = true;
388
386
  else
@@ -437,7 +435,7 @@ function completeUpdates(wait) {
437
435
  v.tState = 0;
438
436
  }
439
437
  setTransPending(false);
440
- }, false);
438
+ });
441
439
  } else if (Transition.running) {
442
440
  Transition.running = false;
443
441
  Transition.effects.push.apply(Transition.effects, Effects);
@@ -449,7 +447,7 @@ function completeUpdates(wait) {
449
447
  const e = Effects;
450
448
  Effects = null;
451
449
  if (e.length)
452
- runUpdates(() => runEffects(e), false);
450
+ runUpdates(() => runEffects(e));
453
451
  if (res)
454
452
  res();
455
453
  }
@@ -468,7 +466,7 @@ function scheduleQueue(queue) {
468
466
  runUpdates(() => {
469
467
  Transition.running = true;
470
468
  runTop(item);
471
- }, false);
469
+ });
472
470
  Transition && (Transition.running = false);
473
471
  });
474
472
  }
@@ -734,7 +732,6 @@ function useWallet() {
734
732
  if (activeNetwork() === networkId) {
735
733
  return;
736
734
  }
737
- await manager().disconnect();
738
735
  console.info(`[Solid] Creating Algodv2 client for ${networkId}...`);
739
736
  const {
740
737
  token,
package/dist/dev.jsx CHANGED
@@ -678,7 +678,6 @@ function useWallet() {
678
678
  if (activeNetwork() === networkId) {
679
679
  return;
680
680
  }
681
- await manager().disconnect();
682
681
  console.info(`[Solid] Creating Algodv2 client for ${networkId}...`);
683
682
  const { token, baseServer, port, headers } = manager().networkConfig[networkId];
684
683
  const newClient = new algosdk.Algodv2(token, baseServer, port, headers);
package/dist/index.cjs CHANGED
@@ -76,8 +76,7 @@ function createEffect(fn, value, options) {
76
76
  const c = createComputation(fn, value, false, STALE), s = SuspenseContext && useContext(SuspenseContext);
77
77
  if (s)
78
78
  c.suspense = s;
79
- if (!options || !options.render)
80
- c.user = true;
79
+ c.user = true;
81
80
  Effects ? Effects.push(c) : updateComputation(c);
82
81
  }
83
82
  function createMemo(fn, value, options) {
@@ -141,7 +140,7 @@ function startTransition(fn) {
141
140
  t.done || (t.done = new Promise((res) => t.resolve = res));
142
141
  t.running = true;
143
142
  }
144
- runUpdates(fn, false);
143
+ runUpdates(fn);
145
144
  Listener = Owner = null;
146
145
  return t ? t.done : void 0;
147
146
  });
@@ -176,7 +175,7 @@ function readSignal() {
176
175
  else {
177
176
  const updates = Updates;
178
177
  Updates = null;
179
- runUpdates(() => lookUpstream(this), false);
178
+ runUpdates(() => lookUpstream(this));
180
179
  Updates = updates;
181
180
  }
182
181
  }
@@ -240,7 +239,7 @@ function writeSignal(node, value, isComp) {
240
239
  ;
241
240
  throw new Error();
242
241
  }
243
- }, false);
242
+ });
244
243
  }
245
244
  }
246
245
  return value;
@@ -262,7 +261,7 @@ function updateComputation(node) {
262
261
  Listener = Owner = node;
263
262
  runComputation(node, node.tValue, time);
264
263
  Listener = Owner = null;
265
- }, false);
264
+ });
266
265
  });
267
266
  }
268
267
  }
@@ -378,7 +377,7 @@ function runTop(node) {
378
377
  } else if ((runningTransition ? node.tState : node.state) === PENDING) {
379
378
  const updates = Updates;
380
379
  Updates = null;
381
- runUpdates(() => lookUpstream(node, ancestors[0]), false);
380
+ runUpdates(() => lookUpstream(node, ancestors[0]));
382
381
  Updates = updates;
383
382
  }
384
383
  }
@@ -387,8 +386,7 @@ function runUpdates(fn, init) {
387
386
  if (Updates)
388
387
  return fn();
389
388
  let wait = false;
390
- if (!init)
391
- Updates = [];
389
+ Updates = [];
392
390
  if (Effects)
393
391
  wait = true;
394
392
  else
@@ -443,7 +441,7 @@ function completeUpdates(wait) {
443
441
  v.tState = 0;
444
442
  }
445
443
  setTransPending(false);
446
- }, false);
444
+ });
447
445
  } else if (Transition.running) {
448
446
  Transition.running = false;
449
447
  Transition.effects.push.apply(Transition.effects, Effects);
@@ -455,7 +453,7 @@ function completeUpdates(wait) {
455
453
  const e = Effects;
456
454
  Effects = null;
457
455
  if (e.length)
458
- runUpdates(() => runEffects(e), false);
456
+ runUpdates(() => runEffects(e));
459
457
  if (res)
460
458
  res();
461
459
  }
@@ -474,7 +472,7 @@ function scheduleQueue(queue) {
474
472
  runUpdates(() => {
475
473
  Transition.running = true;
476
474
  runTop(item);
477
- }, false);
475
+ });
478
476
  Transition && (Transition.running = false);
479
477
  });
480
478
  }
@@ -739,7 +737,6 @@ function useWallet() {
739
737
  if (activeNetwork() === networkId) {
740
738
  return;
741
739
  }
742
- await manager().disconnect();
743
740
  const {
744
741
  token,
745
742
  baseServer,
package/dist/index.js CHANGED
@@ -70,8 +70,7 @@ function createEffect(fn, value, options) {
70
70
  const c = createComputation(fn, value, false, STALE), s = SuspenseContext && useContext(SuspenseContext);
71
71
  if (s)
72
72
  c.suspense = s;
73
- if (!options || !options.render)
74
- c.user = true;
73
+ c.user = true;
75
74
  Effects ? Effects.push(c) : updateComputation(c);
76
75
  }
77
76
  function createMemo(fn, value, options) {
@@ -135,7 +134,7 @@ function startTransition(fn) {
135
134
  t.done || (t.done = new Promise((res) => t.resolve = res));
136
135
  t.running = true;
137
136
  }
138
- runUpdates(fn, false);
137
+ runUpdates(fn);
139
138
  Listener = Owner = null;
140
139
  return t ? t.done : void 0;
141
140
  });
@@ -170,7 +169,7 @@ function readSignal() {
170
169
  else {
171
170
  const updates = Updates;
172
171
  Updates = null;
173
- runUpdates(() => lookUpstream(this), false);
172
+ runUpdates(() => lookUpstream(this));
174
173
  Updates = updates;
175
174
  }
176
175
  }
@@ -234,7 +233,7 @@ function writeSignal(node, value, isComp) {
234
233
  ;
235
234
  throw new Error();
236
235
  }
237
- }, false);
236
+ });
238
237
  }
239
238
  }
240
239
  return value;
@@ -256,7 +255,7 @@ function updateComputation(node) {
256
255
  Listener = Owner = node;
257
256
  runComputation(node, node.tValue, time);
258
257
  Listener = Owner = null;
259
- }, false);
258
+ });
260
259
  });
261
260
  }
262
261
  }
@@ -372,7 +371,7 @@ function runTop(node) {
372
371
  } else if ((runningTransition ? node.tState : node.state) === PENDING) {
373
372
  const updates = Updates;
374
373
  Updates = null;
375
- runUpdates(() => lookUpstream(node, ancestors[0]), false);
374
+ runUpdates(() => lookUpstream(node, ancestors[0]));
376
375
  Updates = updates;
377
376
  }
378
377
  }
@@ -381,8 +380,7 @@ function runUpdates(fn, init) {
381
380
  if (Updates)
382
381
  return fn();
383
382
  let wait = false;
384
- if (!init)
385
- Updates = [];
383
+ Updates = [];
386
384
  if (Effects)
387
385
  wait = true;
388
386
  else
@@ -437,7 +435,7 @@ function completeUpdates(wait) {
437
435
  v.tState = 0;
438
436
  }
439
437
  setTransPending(false);
440
- }, false);
438
+ });
441
439
  } else if (Transition.running) {
442
440
  Transition.running = false;
443
441
  Transition.effects.push.apply(Transition.effects, Effects);
@@ -449,7 +447,7 @@ function completeUpdates(wait) {
449
447
  const e = Effects;
450
448
  Effects = null;
451
449
  if (e.length)
452
- runUpdates(() => runEffects(e), false);
450
+ runUpdates(() => runEffects(e));
453
451
  if (res)
454
452
  res();
455
453
  }
@@ -468,7 +466,7 @@ function scheduleQueue(queue) {
468
466
  runUpdates(() => {
469
467
  Transition.running = true;
470
468
  runTop(item);
471
- }, false);
469
+ });
472
470
  Transition && (Transition.running = false);
473
471
  });
474
472
  }
@@ -733,7 +731,6 @@ function useWallet() {
733
731
  if (activeNetwork() === networkId) {
734
732
  return;
735
733
  }
736
- await manager().disconnect();
737
734
  const {
738
735
  token,
739
736
  baseServer,
package/dist/index.jsx CHANGED
@@ -677,7 +677,6 @@ function useWallet() {
677
677
  if (activeNetwork() === networkId) {
678
678
  return;
679
679
  }
680
- await manager().disconnect();
681
680
  const { token, baseServer, port, headers } = manager().networkConfig[networkId];
682
681
  const newClient = new algosdk.Algodv2(token, baseServer, port, headers);
683
682
  setAlgodClient(newClient);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@txnlab/use-wallet-solid",
3
- "version": "3.0.0-rc.2",
3
+ "version": "3.0.0",
4
4
  "description": "Solid.js library for integrating Algorand wallets into decentralized applications",
5
5
  "author": "Doug Richar <drichar@gmail.com>",
6
6
  "license": "MIT",
@@ -54,15 +54,15 @@
54
54
  ],
55
55
  "dependencies": {
56
56
  "@tanstack/solid-store": "0.4.1",
57
- "@txnlab/use-wallet": "3.0.0-rc.2"
57
+ "@txnlab/use-wallet": "3.0.0"
58
58
  },
59
59
  "devDependencies": {
60
- "@solidjs/testing-library": "^0.8.5",
61
- "algosdk": "2.7.0",
62
- "solid-js": "^1.8.11",
63
- "tsup": "^8.0.0",
64
- "tsup-preset-solid": "^2.2.0",
65
- "typescript": "^5.2.2"
60
+ "@solidjs/testing-library": "0.8.7",
61
+ "algosdk": "2.8.0",
62
+ "solid-js": "1.8.16",
63
+ "tsup": "8.0.2",
64
+ "tsup-preset-solid": "2.2.0",
65
+ "typescript": "5.4.3"
66
66
  },
67
67
  "peerDependencies": {
68
68
  "@blockshake/defly-connect": "^1.1.6",
@@ -72,7 +72,7 @@
72
72
  "@walletconnect/modal": "^2.6.2",
73
73
  "@walletconnect/sign-client": "^2.10.2",
74
74
  "algosdk": "^2.7.0",
75
- "lute-connect": "^1.2.0",
75
+ "lute-connect": "^1.3.0",
76
76
  "magic-sdk": "^28.0.3"
77
77
  },
78
78
  "peerDependenciesMeta": {