-
Notifications
You must be signed in to change notification settings - Fork 21
Adopt trustflow-sdk and consolidate hand-rolled wallet/contract integration #81
Copy link
Copy link
Open
Labels
GrantFox OSSIssue tracked in GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardIssue may be eligible for a GrantFox rewardOfficial Campaign | FWC26Campaign: Official Campaign | FWC26Campaign: Official Campaign | FWC26blockchain integrationRequires Stellar/Soroban blockchain knowledgeRequires Stellar/Soroban blockchain knowledgedifficulty: hardHard difficulty issueHard difficulty issueenhancementNew feature or requestNew feature or requestpriority: highHigh priority issueHigh priority issue
Description
Activity
Metadata
Metadata
Assignees
Labels
GrantFox OSSIssue tracked in GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardIssue may be eligible for a GrantFox rewardOfficial Campaign | FWC26Campaign: Official Campaign | FWC26Campaign: Official Campaign | FWC26blockchain integrationRequires Stellar/Soroban blockchain knowledgeRequires Stellar/Soroban blockchain knowledgedifficulty: hardHard difficulty issueHard difficulty issueenhancementNew feature or requestNew feature or requestpriority: highHigh priority issueHigh priority issue
Description
trustflow-sdkis not listed as a dependency anywhere in this repo'spackage.json. Instead, the frontend hand-rolls its own wallet integration directly against@stellar/freighter-api(hooks/useAccount.ts,components/atoms/wallet-button/) and defines its own env-var-based contract constants (shared/contracts.ts) with no code that actually invokes the SDK's contract/escrow clients. This means every piece of Soroban integration work (see the transaction-flow spike, #79) would either duplicate what the SDK already has, or need to be built twice.Component
Frontend
Difficulty
🔴 Hard
Tasks
@trustflow/sdkas a dependency once its wallet/escrow exports are usable (coordinate with the SDK repo's hook-export fix)@stellar/freighter-apiusage inuseAccount.tswith the SDK's wallet connection helpers, preserving current UI behaviorshared/contracts.ts's standalone env constants with the SDK'sClientConfig, keepingNEXT_PUBLIC_-prefixed env vars as the source of truthsetInterval(syncAccount, 2000)) and whatever connection model the SDK provides, and reconcileAcceptance Criteria
@stellar/freighter-apiimports remain outside the SDK dependency boundaryshared/contracts.tssources its config from the SDK's types rather than ad hoc local constantsuseAccountrequire no API changes (or changes are scoped and called out explicitly)Estimated Time
2-3 days