Skip to content

fix: repair lib/soroban.ts + app/create mangled by the #379 merge - #409

Open
mhikel66 wants to merge 2 commits into
conduit-protocol:mainfrom
mhikel66:fix/ci-lockfile-and-379-merge-repair
Open

fix: repair lib/soroban.ts + app/create mangled by the #379 merge#409
mhikel66 wants to merge 2 commits into
conduit-protocol:mainfrom
mhikel66:fix/ci-lockfile-and-379-merge-repair

Conversation

@mhikel66

@mhikel66 mhikel66 commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

The #379 merge left main non-compiling. Two independent syntax/scope errors,
one hidden behind the other:

lib/soroban.ts — mangled invokeContract

invokeContract's body had a stray fragment of an inlined poll loop
(referencing an out-of-scope status, plus a leftover }, { context, signal })
from the withRetry call) wedged between the submit step and the real
return pollForConfirmation(...). tsc bailed with "Declaration or statement
expected".

  • Dropped the mangled fragment.
  • Finished the #362 refactor pollForConfirmation was mid-way through: it now
    returns InvokeContractResult ({ hash, returnValue }) instead of a bare
    string, capturing status.returnValue on SUCCESS so createStream can read
    the assigned stream_id.
  • Exported resetFeeStatsCache() and call it in soroban-pipeline.test's
    beforeEach — the module-level fee cache leaked between test cases.

app/create/page.tsx — stale import + hand-rolled resolver (#394)

Imported isValidStellarPublicKey but the Zod schema's .refine() calls
isValidStellarAddress (never in scope).

  • Import isValidStellarAddress.
  • Replace the hand-rolled zodResolver (first-error-only; loose typing that
    surfaced as a FieldError-not-ReactNode error) with
    @hookform/resolvers/zod, already a dependency.

Verification (local)

npm run typecheck   # clean
npm run lint        # clean
npx vitest run      # 410 passed, 4 todo
npm run build       # 11/11 routes

Test updates: soroban-pipeline.test.ts, stream.test.ts, tokens.test.ts,
create/__tests__/page.test.tsx.

CI note

CI here stays red until two separate blockers land:

This PR is the code-repair piece and is verified locally against those.

…col#379 merge

The conduit-protocol#379 merge left lib/soroban.ts non-compiling: invokeContract's body
had a stray fragment of an inlined poll loop (referencing an out-of-scope
`status`, plus a leftover `}, { context, signal })` from the withRetry
call) wedged between the submit step and the real
`return pollForConfirmation(...)`. tsc bailed with 'Declaration or
statement expected', which is why every downstream CI job was red even
past npm ci.

- invokeContract: drop the mangled fragment; it already returned
  pollForConfirmation(hash, ...).
- pollForConfirmation: finish the conduit-protocol#362 change it was mid-refactor on —
  return InvokeContractResult ({ hash, returnValue }) instead of a bare
  string, capturing status.returnValue on SUCCESS so callers like
  createStream can read the assigned stream_id.
- Export resetFeeStatsCache() and call it in soroban-pipeline.test's
  beforeEach — the module-level fee cache (intentionally shared across
  invokeContract calls) was leaking between test cases.
- Update soroban-pipeline / stream / tokens tests for the new
  InvokeContractResult shape and the flags-first field parsing order.
…it-protocol#394)

app/create/page.tsx imported isValidStellarPublicKey but the schema's
.refine() calls isValidStellarAddress — a name that was never in scope,
so the file failed to compile once the soroban.ts syntax error above it
was cleared.

- Fix the import to isValidStellarAddress (the G…-or-C… check the schema
  actually wants; both forms are 56 chars so the existing length checks
  still hold).
- Replace the hand-rolled zodResolver (first-error-only, loose typing
  that surfaced as a FieldError-not-ReactNode error at the recipient
  error line) with @hookform/resolvers/zod, already a dependency.
- Update the create-page tests: mock checkRecipientExists and wait out
  the 600ms recipient-check debounce before submitting, so onSubmit's
  conduit-protocol#363 'still verifying' guard doesn't short-circuit them.
@mhikel66
mhikel66 force-pushed the fix/ci-lockfile-and-379-merge-repair branch from 080e66a to 2434405 Compare August 30, 2026 12:19
@mhikel66 mhikel66 changed the title fix(ci): unblock npm ci + repair lib/soroban.ts mangled by the #379 merge (#404) fix: repair lib/soroban.ts + app/create mangled by the #379 merge Aug 30, 2026
@drips-wave

drips-wave Bot commented Aug 30, 2026

Copy link
Copy Markdown

Hey @mhikel66! 👋 It looks like this PR isn't linked to any issue.

If this PR is for one of the issues assigned to you as part of a Wave, please link it to ensure your contribution is tracked properly. You can do this by adding a keyword to the PR description (e.g., Closes #123), or by clicking a button below:

Issue Title
#341 Transactions page shows fabricated demo history to real users in production Link to this issue
#350 lib/wallet-storage.ts crashes the connect flow when localStorage is unavailable Link to this issue
#351 Service worker registered on every mount, logs the registration object, likely double-registers Link to this issue
#343 fetchStreamsFromIndexer hard-caps at 100 streams with no pagination Link to this issue

ℹ️ Learn more about linking PRs to issues

@Jaydbrown

Copy link
Copy Markdown
Contributor

This branch predates #362/#363 and the shared lib/with-timeout.ts extraction, and merging it as-is would regress main: it reverts the checkRecipientExists/settleRecipientCheck test scaffolding in app/create/__tests__/page.test.tsx (added by #363) and reintroduces the local withTimeout copy in app/create/page.tsx. The '#379 merge repair' it targets has since been resolved on main by other PRs. Closing candidate / needs a fresh rebase — leaving open per instruction.

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.

2 participants