Skip to content

fix(dapp): pay into a linq order queued with no deposit on every linq chain - #195

Merged
0xDeon merged 1 commit into
mainfrom
fix/linq-order-queue
Nov 15, 2026
Merged

0xDeon merged 1 commit into
mainfrom
fix/linq-order-queue

Conversation

@0xDeon

@0xDeon 0xDeon commented Nov 15, 2026

Copy link
Copy Markdown
Contributor

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 answered initiated or processing: 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:

  • Stellar (naira form): "This payout is no longer waiting for a deposit (processing: in order queue)." This is the 409 from /api/naira/orders/[id]/build.
  • Sui and Solana (off-ramp card through Linq): "Could not confirm that this cash-out is still waiting for a deposit." This comes from payRefusal.
  • Avalanche and NEAR: not affected. They are Weave only.

Three prod orders confirm it: 4b3b6181…, 4a4a9608… and 06c61594…. Each is processing: in order queue with depositDigest: "", 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 queue counts as waiting only next to a live Linq answer whose depositDigest is present and empty. In every other case the old strict reading stays, so a funded order is never paid twice:

Case Read as
Live answer, depositDigest: "" waiting
Live answer, digest set processing
No digest field processing
Webhook processing
Stored copy of the text processing

The change covers every path that reads a Linq status:

  • getStatus and createOrder now read depositDigest. A missing field is kept apart from an empty one.
  • Stellar: reconcileBeforePay (build), the /api/naira/orders/[id] poll, and order creation.
  • Sui and Solana: syncOrder records linqWaiting from the live read, and payRefusal uses it ahead of the stored text.

Tests

  • Status reader: the new text with an empty digest, with a set digest, and with no digest.
  • Client: an empty digest, a set digest, and a missing one.
  • Naira build gate (reconcileBeforePay): pays into a queued order with no deposit; refuses one with a deposit or no digest.
  • Naira create route: a new queued order is stored as waiting.
  • Sui/Solana Linq orders: payable with an empty digest; refused with a set digest, no digest, or only a stored copy of the text.

Results:

  • tsc and lint are clean.
  • Every test touched here passes.
  • The full run's only failures are network-dependent tests (*.live.test.ts). The same files fail on unmodified main in this environment. oneclick-origin.test.ts failed 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.

… 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.
@netlify

netlify Bot commented Nov 15, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for useintentadapp ready!

Name Link
🔨 Latest commit da3529e
🔍 Latest deploy log https://app.netlify.com/projects/useintentadapp/deploys/6af99d7bd838c871a6eb9f60
😎 Deploy Preview https://deploy-preview-195--useintentadapp.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify

netlify Bot commented Nov 15, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for useintent ready!

Name Link
🔨 Latest commit da3529e
🔍 Latest deploy log https://app.netlify.com/projects/useintent/deploys/6af99d7bcad436e00f77e991
😎 Deploy Preview https://deploy-preview-195--useintent.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@0xDeon
0xDeon merged commit 7c2528c into main Nov 15, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant