Repository navigation
wallet-toolbox 2.14.3: dust-floor surplus shaping; admin abortAction - #638
Conversation
…action Surplus change shaping split change into outputs of changeInitialSatoshis with no dust-floor check. Legacy baskets on minimumDesiredUTXOValue 32 produced sub-dust outputs that removeDustOutputs folded away, leaving the fee sized for the larger tx: "generateChangeSdk error: required fee error". Each split output now starts at max(dustFloor, changeInitialSatoshis). WalletPermissionsManager.abortAction required an in-memory pending reference, so signed noSend actions and earlier sessions' actions could not be aborted even by the admin. The admin originator now skips that check; other originators keep it. Bump to 2.14.3. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
| { | ||
| "name": "@bsv/wallet-toolbox", | ||
| "version": "2.14.2", | ||
| "version": "2.14.3", |
There was a problem hiding this comment.
[bug] Bumping @bsv/wallet-toolbox, @bsv/wallet-toolbox-client, and @bsv/wallet-toolbox-mobile to 2.14.3 (client and mobile manifests are the same one-line bump) leaves the governed release record on 2.14.2. publishedVersion should stay 2.14.2 until npm publication, but releaseType is still none, so it disagrees with the patch delta, and the summary/migration still describe 2.14.2. The same bump also leaves governance/repository-health/baselines.json publicPackageVersions, docs/packages/wallet/wallet-toolbox.md, wallet-toolbox-client.md, and wallet-toolbox-mobile.md frontmatter, and the generated docs/reference/stack-facts.md / package API ledger stale. CI on ab39b12a failed repository health on exactly these checks (releaseType disagreement, baselines version mismatch, package-doc version mismatch, stale stack facts); the later build, test, and mutation failures are skips caused by that gate. The package CHANGELOG entry is not a substitute for governance/package-release-notes.json.
Suggestion: For all three wallet-toolbox entries, keep publishedVersion at 2.14.2, set releaseType to patch, and replace summary and migration with the dust-floor and admin-abort fixes (migration can say none for consumers). Set the three publicPackageVersions and the three docs/packages frontmatter versions to 2.14.3, then run pnpm docs:facts so stack-facts.md and docs/reference/package-api-migrations.md match. Do not mark 2.14.3 as already published.
There was a problem hiding this comment.
Addressed in d2cda19: all three wallet-toolbox release-note entries now have releaseType: patch with the dust-floor and admin-abort summary, and migration says none is needed. publishedVersion stays at 2.14.2. publicPackageVersions and the docs frontmatter are bumped to 2.14.3, and pnpm docs:facts regenerated stack-facts.md and package-api-migrations.md. pnpm health:check passes locally.
Set releaseType patch with the dust-floor and admin-abort summary for all three wallet-toolbox entries (publishedVersion stays 2.14.2 until npm publication), bump baselines and package-doc versions, and regenerate stack facts and the package API ledger. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
…pstreamed hunks 2.14.3 ships both fixes from f0224e7 upstream (bsv-blockchain/ts-stack#638): dust-floored surplus change shaping and admin abortAction. Their hunks are removed; the patch is rebased onto 2.14.3 with git merge-file (clean) and renamed to patches/@bsv+wallet-toolbox-mobile+2.14.3.patch. Every earlier hunk carries over byte-for-byte (identical changed lines in both bundles), and applying the new patch to the pristine 2.14.3 tarball reproduces the installed bundles exactly. Also in 2.14.1-2.14.3: discoverByAttributes re-filters overlay results the way the overlay searched them. On 2.14.0 an `any` search matched a certificate field literally named `any`, so network results never reached ContactsScreen or the Pay recipient search. The exact-spend amount moved from a result symbol to a shared WeakMap; no app code reads it. The two regression tests stay and pass against the upstream code. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>



Ports two fixes found on device in bsv-wallet (patched there via patch-package on wallet-toolbox-mobile 2.14.0).
1.
generateChangeSdk error: required fee error 23 !== 33shapeSurplusChangeOutputssplit change intochangeInitialSatoshisoutputs without a dust-floor check. Baskets still on the legacyminimumDesiredUTXOValueof 32 get sub-dust outputs (floor is 40 at 100 sat/kB);removeDustOutputsfolds them away, shrinking the tx whiler.feestays sized for the larger one, so validation throws.Fix: pass
dustFloorinto the shaping request and usemax(dustFloor, changeInitialSatoshis)as the per-output floor for the gate, the initial satoshis anddistributeExcessFees. The planFunding/actionBatch path goes throughgenerateChangeSdk, so it's covered by the same helper.2. Cancel payment: "The action reference was not issued by this permissions manager."
abortActionrequired a reference in the in-memorypendingActionOriginatorsmap, which is cleared after signing and lost on restart. So signednoSendactions and earlier sessions' actions could never be aborted, even by the admin. The admin originator now skips that check. Other originators still need a reference this manager issued to them, andsignActionis unchanged.Tests
generateChangeSdk.test.ts10b2: the exact repro (one coin, 100165–100260 sats, 32-sat basket, 100 sat/kB) asserts every change output ≥ dust floor and fee = ceil(size/1000·100).WalletPermissionsManager.boundaries.test.ts: the admin aborts an unissued reference;example.comandundefinedare refused for both unissued and foreign references, and the underlying wallet is never called.pnpm testfor wallet-toolbox passes: 283 suites, 3070 tests.Version bumped to 2.14.3 (root, client, mobile) with a CHANGELOG entry.
🤖 Generated with Claude Code