Skip to content

Replace mock useYieldStream hook with @yieldstream/sdk client #8

Description

@Code-Paragon

Problem

The useYieldStream.ts hook is entirely mocked with setTimeout delays and hardcoded strings, making the frontend completely disconnected from the actual Soroban testnet environment.

Expected behavior

The hook instantiates the YieldStreamClient from @yieldstream/sdk, using it to perform real getTVL, getExchangeRate, deposit, and withdraw calls using the connected Freighter wallet.

Files to update

  • src/hooks/useYieldStream.ts
  • package.json

Project relevance

This is the core integration task that bridges the Next.js UI with the Rust smart contracts via the protocol's official middleware.

Acceptance criteria

  • Feature works as described
  • Tests are added or updated where needed
  • Documentation is updated where needed
  • The @yieldstream/sdk is installed and instantiated inside the hook
  • No TypeScript, lint, test, or build errors

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions