mirror of
https://github.com/luxfi/dex.git
synced 2026-09-24 00:26:31 +00:00
Two corrections to the Phase-B path: 1. CollateralRef bug: the settling RelayOrderTx now binds CollateralRef = ev.IntentID (the C->D object's UTXOID), NOT importTx.ID(). executeImport keys the escrow by tx.ImportedInputs[0].UTXOID (== intentID) and settleFromFills looks it up by RelayOrderTx.CollateralRef; with importTx.ID() the escrow lookup missed (proceeds-only, no refund, degraded authority bind). Now they agree. 2. getExportedOutput is no longer a stub: it polls dex.getSettlement(collateralRef) (the new dexvm RPC) until the proposer relays + the settling block accepts and records the proceeds object's (outputID, amount), then returns them for the Phase-B DS01 settlement. ~60s poll budget; on a zero-fill (no proceeds) it reports the reclaim path. Builds linux/amd64 static (CGO off); keeper tests pass.