Skip to content

Dedupe getVouches Stellar query into shared helper + repair broken-merge syntax in chain.ts - #302

Open
7777add7777-ai wants to merge 1 commit into
vouchlabsio:mainfrom
7777add7777-ai:fix/dedupe-getvouches
Open

7777add7777-ai wants to merge 1 commit into
vouchlabsio:mainfrom
7777add7777-ai:fix/dedupe-getvouches

Conversation

@7777add7777-ai

Copy link
Copy Markdown

What

Fixes #66 — dedupes the Stellar get_vouches query path.

Both callers now call the shared helper simulateGetVouches() in packages/web/lib/shared/getVouches.ts instead of each carrying its own copy of the Contract.call → TransactionBuilder → simulateTransaction → scValToNative block:

  • packages/web/lib/stellar.js (getVouches)
  • packages/web/server/utils/chain.ts (getVouchesOnChain)

Also repaired (broken-merge debris in server/utils/chain.ts)

  • stray fragment: a dangling contentToField stub with imports in the middle of the file and an unclosed const FR = BigInt( that made the module unparseable
  • duplicated const account declaration inside getVouchesOnChain

Verification

  • vitest run test/chain.test.ts → 4/4 passing locally
  • esbuild parse check passes on all three touched files
  • Note: on clean main (pre-change) 9 of 10 test files already fail to transform due to other unrelated broken-merge files (e.g. server/api/verify-human.post.ts); those are left untouched and out of scope for this issue.

Payment (any of)

  • USDC (Base / EVM): 0x16D07De01bDbfE0cBc4624503B228BaaC3F53e79
  • USDC / SOL (Solana): 3KcpumPNcBCYPzwwx75WVJ28SuSHrgdik72GPapyKv8W
  • USDT (TRC-20): TCpF7Cy32nLEkLpUDFkSzoBxKpgnYQA1B9

…n-merge syntax in chain.ts

- lib/stellar.js + server/utils/chain.ts now both call simulateGetVouches()
  from lib/shared/getVouches.ts instead of duplicating the
  TransactionBuilder/simulate/parse block (issue vouchlabsio#66)
- remove broken-merge debris in server/utils/chain.ts: stray duplicate
  contentToField/FR fragment and the duplicated const account in
  getVouchesOnChain
- chain.test.ts: 4/4 passing locally
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.

[Bounty: $70] Remove the duplicated getVouches implementation

1 participant