Parent PRD
#75
What to build
Complete the active-account data wiring so every piece of data shown in the trading terminal reflects the selected account, not always the master wallet. The foundation (store, useActiveAddress, useSubAccounts, user menu switching, useAllDexsAccountState) was built as part of the initial sub-account exploration. This slice finishes the job by updating the remaining hooks that still read directly from wagmi's useConnection.
Hooks to migrate:
use-fee-rates — controls displayed fee tier and fee estimates in the order form
use-asset-leverage — controls the leverage subscription and position check for the active market
useUserPositions (hl-react) — positions data consumed by use-asset-leverage; needs an app-level wrapper or an address parameter so it subscribes to the active account's position stream
When a sub-account is selected, switching from it back to master should immediately restore master account data across all of these.
Acceptance criteria
Blocked by
None — can start immediately
User stories addressed
- User story 13 (all terminal data reflects the currently active account)
Parent PRD
#75
What to build
Complete the active-account data wiring so every piece of data shown in the trading terminal reflects the selected account, not always the master wallet. The foundation (store,
useActiveAddress,useSubAccounts, user menu switching,useAllDexsAccountState) was built as part of the initial sub-account exploration. This slice finishes the job by updating the remaining hooks that still read directly from wagmi'suseConnection.Hooks to migrate:
use-fee-rates— controls displayed fee tier and fee estimates in the order formuse-asset-leverage— controls the leverage subscription and position check for the active marketuseUserPositions(hl-react) — positions data consumed byuse-asset-leverage; needs an app-level wrapper or an address parameter so it subscribes to the active account's position streamWhen a sub-account is selected, switching from it back to master should immediately restore master account data across all of these.
Acceptance criteria
isConnectedremains sourced from wagmi (wallet-level), only the address switches per selected accountBlocked by
None — can start immediately
User stories addressed