Repository navigation
fix(sdk): stop signature step polling on failure or refund - #1144
Open
erkancamli wants to merge 2 commits into
Open
erkancamli wants to merge 2 commits into
erkancamli wants to merge 2 commits into
Conversation
Contributor
|
@erkancamli is attempting to deploy a commit to the Uneven Labs Team on Vercel. A member of the Team first needs to authorize it. |
|
pedromcunha
approved these changes
Oct 2, 2026
A failure whose details did not contain 'Transaction failed' was retried as a network error until maxAttempts, and a refund status had no branch, so both polled until the timeout and lost the real reason.
The refund branch rejected without setting the item's checkStatus, so the emitted state reported a refund while the item kept its previous status. The transaction and websocket paths set it before rejecting.
erkancamli
force-pushed
the
fix/sdk-signature-check-final-status
branch
from
October 2, 2026 19:59
c92249d to
b9b9cf9
Compare
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.
In
signatureStep.tsstatus polling, afailurethrowsError(res.data.details || 'Transaction failed'), but the catch only rethrows messages containing "Transaction failed" or "Failed to check". Any otherdetailsstring is treated as a network error and retried untilmaxAttempts, and then surfaces asFailed to get an ok response after N attempt(s), losing the real reason.refund, which/intents/status/v3can return, has no branch at all, so it also polls until the timeout.transaction.tsand the websocket handlers already treat both as final (Transaction failed: Refunded). With websocket off by default, every signature based quote with a check endpoint goes through this polling path.The change adds a small
CheckStatusErrorthatfailureand a newrefundbranch throw and the catch rethrows. Request errors, including 4xx such as 429, are still retried as before. A refund now marks the step as refunded like the other paths do.Tests: three cases in
signatureStep.test.ts. The failure with details and the refund cases fail on main (got 'Failed to get an ok response after 5 …') and pass now; the third confirms request errors are still retried.pnpm typecheckpasses. The rest of the sdk suite passes exceptclient.test.ts > Should configure chains dynamically, which calls the live chains API and fails the same way on main in my environment (no outbound access to it).