fix: set acceptDelayedBroadcast: false on all createAction calls#3
Merged
fix: set acceptDelayedBroadcast: false on all createAction calls#3
Conversation
Apply the same acceptDelayedBroadcast: false fix to the 2 remaining createAction calls in credentials.ts (revocation UTXO creation and revocation spend). Without this, revocation transactions were queued as unsent instead of broadcasting immediately.
sirdeggen
approved these changes
Mar 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of Changes
Every
createActioncall in@bsv/simplepassedoptions: { randomizeOutputs: false }but did not setacceptDelayedBroadcast. The@bsv/sdkdefaultsacceptDelayedBroadcasttotrue, which means no transaction created by@bsv/simplewas ever immediately broadcast — they were all queued asunsentfor a background monitor that typically doesn't exist in scripts, CLI tools, or short-lived server processes.This PR adds
acceptDelayedBroadcast: falseto all 11createActioncall sites across 4 files:src/core/WalletCore.tssend(),fundServerWallet()src/modules/tokens.tscreateToken(),sendToken(),redeemToken(),sendTokenViaMessageBox()src/modules/did.tscreateDID()(issuance),spendChainOutput()(used bycreateDID,updateDID,deactivateDID)src/modules/overlay.tsadvertiseSHIP(),advertiseSLAP(),broadcastAction()Linked Issues / Tickets
N/A — discovered during integration testing with
@bsv/simple/server.Testing Procedure
Manually tested with two scripts in a separate project (
Build_EZ_on_BSV):Payment test (
2-pay.ts) — Creates aServerWallet, funds it via a browser wallet, then sends a P2PKH payment. After the fix,sendWithResultsreturnsstatus: 'unproven'(broadcast, awaiting confirmation) instead of'unsent'(stuck in queue).ca6f832d05836f5568ea9677ffa5ab4a63280ce131db1576ed15951c256fc35eon WhatsOnChain.DID test (
7-did.ts) — Creates aServerWallet, funds it, then callscreateDID(). After the fix, the issuance transaction broadcasts immediately and the DID resolves successfully.Verified DID
did:bsv:3ba78a2f2fc454c73c2ba651ef7ff4166585ce5edc3fd5e0475aa9b2c21d4705created and resolved.I have tested manually in my local environment
Checklist
npm run lintone final time before requesting a reviewnpm version patchso that my changes will trigger a new version to be released when they are merged