Repository navigation
fix(dapp): pay into a linq order queued with no deposit on every linq chain - #195
Merged
Merged
Conversation
… chain Since 15 November 2026 Linq answers a new, unpaid order with "processing: in order queue" instead of "initiated" or "processing: wallet worker on it..". The status reader took that unknown text as a deposit already received, so every naira deposit through Linq was refused before signing: Stellar with "no longer waiting for a deposit", Sui and Solana with "could not confirm". The queued text now counts as waiting only beside a live Linq answer whose depositDigest is present and empty. A missing digest, a webhook or a stored copy of the text keeps the old reading, so a funded order is never paid twice.
✅ Deploy Preview for useintentadapp ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for useintent ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
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.
Problem
Since 15 November 2026, every naira off-ramp through Linq has been refused before the user signs. No money has moved.
Linq now answers a new, unpaid order with
processing: in order queue. Until 14 November it answeredinitiatedorprocessing: wallet worker on it... Our status reader treats any unfamiliar "processing" text as "deposit already received" so that nobody can pay the same order twice. So the deposit is refused:/api/naira/orders/[id]/build.payRefusal.Three prod orders confirm it:
4b3b6181…,4a4a9608…and06c61594…. Each isprocessing: in order queuewithdepositDigest: "", and each deposit address on Stellar holds 0 USDC. Our status code had not changed since Oct 14, so the change is on Linq's side.Fix
processing: in order queuecounts as waiting only next to a live Linq answer whosedepositDigestis present and empty. In every other case the old strict reading stays, so a funded order is never paid twice:depositDigest: ""The change covers every path that reads a Linq status:
getStatusandcreateOrdernow readdepositDigest. A missing field is kept apart from an empty one.reconcileBeforePay(build), the/api/naira/orders/[id]poll, and order creation.syncOrderrecordslinqWaitingfrom the live read, andpayRefusaluses it ahead of the stored text.Tests
reconcileBeforePay): pays into a queued order with no deposit; refuses one with a deposit or no digest.Results:
*.live.test.ts). The same files fail on unmodifiedmainin this environment.oneclick-origin.test.tsfailed once in the full run and passes 89/89 on its own.Not yet confirmed: a real Linq deposit after this fix. Preview has no
LINQ_*keys, so this has to be checked on prod.