Skip to content

docs(tutorials/src20): frontend chapter uses incorrect seismic-react hook APIs #303

Description

@kutluhaneth46

Summary

docs/gitbook/tutorials/src20/building-the-frontend.md does not match the current seismic-react surface:

  1. useToken() assigns useShieldedContract(...) to contract directly, but the hook returns { contract, abi, address, error }.
  2. TransferForm calls useShieldedWriteContract() with no config and then writeContract({ address, abi, functionName, args }) (wagmi-style). The real API takes write config at hook init; writeContract() takes no args.

Official hook docs (useshieldedwrite.md, useshieldedcontract.md) and basic-dapp.md already show the correct patterns.

Proposed fix

Align the tutorial snippets with the real exports/call shapes (destructure { contract }; pass write config into useShieldedWriteContract, or use contract.write.* for dynamic form args).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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