MDK Logo

PoolManagerPools

Pool-manager pools page — accordion list of every configured pool with header summary (name, status, priority) and an expandable body (per-pool stats, edit, …

Pool-manager pools page — accordion list of every configured pool with header summary (name, status, priority) and an expandable body (per-pool stats, edit, delete). Optional "Add Pool" CTA is gated by the ADD_POOL_ENABLED feature flag.

Must be rendered inside <MdkProvider> — the embedded "Add Pool" modal uses the contextual-modal adapter hook.

import { PoolManagerPools } from "@tetherto/mdk-react-devkit";
PropStatusTypeDefaultDescription
poolConfigRequiredPoolConfigEntry[]Array of pool configurations to render.
backButtonClickRequiredVoidFunctionCalled when the operator clicks the "Pool Manager" back link.

Usage

Pool-manager pools page: accordion list of every configured pool. Each item shows a one-line header (name, status, priority) and expands to reveal the pool body (per-pool stats, edit, delete). Optional "Add Pool" CTA is gated by the ADD_POOL_ENABLED feature flag.

Use this as the /pool-manager/pools route. For just the row primitives, drop down to PoolCollapseItemHeader / PoolCollapseItemBody.

Requirements

  • Render inside <MdkProvider>. The "Add Pool" modal uses useContextualModal from @tetherto/mdk-react-adapter.

Data contracts

  • PoolConfigData — exported from @tetherto/mdk-react-devkit (originates in foundation/components/pool-manager/hooks/use-pool-configs). Mirrors the API pool-config object.

Notes

  • Pool data is normalised via usePoolConfigs — the component handles loading and error states internally (Loader + CoreAlert).
  • The "Add Pool" button is gated by ADD_POOL_ENABLED. Set it in the foundation/components/pool-manager/pool-manager-constants module if you fork the library; the default is false in @tetherto/mdk-react-devkit.
  • Multiple rows can be expanded simultaneously — the accordion uses type="multiple".

Example

/** * Runnable example for PoolManagerPools. * * Wrap the app in `<MdkProvider>` — the "Add Pool" modal uses the * contextual-modal adapter hook. */import { PoolManagerPools } from '@tetherto/mdk-react-devkit'import type { PoolConfigData } from '@tetherto/mdk-react-devkit'const mockPools: PoolConfigData[] = [  {    id: 'pool-eu',    name: 'EU primary',    url: 'stratum+tcp://eu.example.pool:3333',    worker: 'rig-eu-01',    priority: 1,    fee: 1.5,    activeWorkers: 124,    status: 'Healthy',  } as unknown as PoolConfigData,  {    id: 'pool-us',    name: 'US backup',    url: 'stratum+tcp://us.example.pool:3333',    worker: 'rig-us-01',    priority: 2,    fee: 2,    activeWorkers: 0,    status: 'Standby',  } as unknown as PoolConfigData,]export const PoolManagerPoolsExample = () => {  return (    <PoolManagerPools      poolConfig={mockPools}      backButtonClick={() => {        // eslint-disable-next-line no-console        console.log('back to pool manager')      }}    />  )}