@venlyfinance/react 0.1.0 → 0.1.1

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/CHANGELOG.md CHANGED
@@ -10,3 +10,7 @@ Initial release.
10
10
  - `proxyClientOptions()` for the browser-safe production shape; its placeholder credential is the exported `VENLY_PROXY_SECRET_SENTINEL`, which the browser guard recognises as not-a-secret.
11
11
  - The browser guard covers every path a secret can take into the provider: the top-level prop and both per-client options objects.
12
12
  - 30 node:test cases against the SDK's mock transport; zero network.
13
+
14
+ ## 0.1.1
15
+
16
+ - Fix: `useStagedTransfer` stuck in "submitting" under React StrictMode – the hook cleanup's `dispose()` left the controller permanently dead for the remount, so `confirm()`'s continuation dropped its state updates. A new subscription now revives the controller. Found by driving the flow in a real browser; regression test added.
@@ -50,6 +50,12 @@ export class StagedTransferController {
50
50
  this.options = options;
51
51
  }
52
52
  subscribe = (listener) => {
53
+ // A new subscription revives a disposed controller. React StrictMode
54
+ // mounts, unmounts and remounts the same component instance: the
55
+ // cleanup dispose() must not leave the controller permanently dead for
56
+ // the remount, or confirm()'s continuation silently drops its state
57
+ // updates and the flow sticks in "submitting".
58
+ this.#disposed = false;
53
59
  this.#listeners.add(listener);
54
60
  return () => this.#listeners.delete(listener);
55
61
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@venlyfinance/react",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Headless React layer for the Venly Finance and Fundflow APIs: provider, TanStack Query hooks, and flow state machines for regulated money movement. Runs with zero credentials in mock mode.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",