Repository navigation
feat(backend): add rebuild, cancel, and expiry for AWAITING_SIGNATURE float transfers - #910
Open
jeffrey-graham wants to merge 1 commit into
Conversation
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
This branch has not been deployed
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.
Closes #842
Summary
Adds lifecycle paths so float transfers cannot remain stuck in
AWAITING_SIGNATUREindefinitely:POST /api/agents/float-transfer/:id/rebuild):from_agent) to rebuild a fresh unsigned Soroban transaction (unsignedTxXdr+networkPassphrase) for anAWAITING_SIGNATUREtransfer without re-running approval steps when the original transaction sequence number or validity bounds have gone stale.AGENT_FLOAT_TRANSFER_TX_REBUILTaudit entry.POST /api/agents/float-transfer/:id/cancel):from_agent), recipient agent (to_agent), or an admin to cancel a transfer inPENDING_APPROVALorAWAITING_SIGNATURE(status = 'CANCELLED').PENDING_APPROVAL,AWAITING_SIGNATURE,COMPLETED).AGENT_FLOAT_TRANSFER_CANCELLEDaudit entry.AgentFloatService.expireStaleTransfers):AWAITING_SIGNATUREtransfers older thanFLOAT_TRANSFER_AWAITING_SIGNATURE_TTL_MS(default86400000ms / 24h, configurable viaenvSchema.ts) asEXPIRED, logs anAGENT_FLOAT_TRANSFER_EXPIREDaudit entry for each, and releases their pair limits.backend/src/swagger/openapi.json.agentFloatService.test.tsandagentFloatTransfer.test.tscovering rebuild, cancellation, expiry, audit logging, and pair-limit release.