Pools
Pools page for configuring mining pools
Authoring UI for mining pools. PoolManagerPools is the plug-and-play feature composite used by the demo; it opens an internal pool-authoring dialog on demand when the Add Pool button is clicked.
For miner-to-pool assignment via the explorer, see Miner explorer. For the landing surface, see Dashboard.
Prerequisites
- Complete the @tetherto/mdk-foundation-ui installation and add the dependency
- A connected Redux store with
actionsSlicewired up.PoolManagerPoolsdispatches pool-config actions - Pool configuration data (
PoolConfigData[]) sourced from your API layer - Feature flags that gate optional controls:
ADD_POOL_ENABLED,SHOW_CREDENTIAL_TEMPLATE,SHOW_POOL_VALIDATION(re-exported from@tetherto/mdk-foundation-ui)
Components
| Component | Description |
|---|---|
PoolManagerPools | Pool Manager pools page with accordion list and Add Pool action |
PoolManagerPools
Feature composite that renders the pools page: header with **Add Pool** button (gated by ADD_POOL_ENABLED), a loader/error state, and a collapsible accordion listing every pool with its endpoints, credentials template, and validation status. Opens an internal pool-authoring dialog on demand.
Import
import { PoolManagerPools } from '@tetherto/mdk-foundation-ui'Props
| Prop | Type | Default | Description |
|---|---|---|---|
poolConfig | PoolConfigData[] | required | Pool configuration source; hydrated by usePoolConfigs |
backButtonClick | () => void | required | Fires when the operator clicks the "Pool Manager" back link |
Behaviour
- Renders a page header (title + back link) with an Add Pool button gated by the
ADD_POOL_ENABLEDflag - Shows a loader while
usePoolConfigsis loading, or aCoreAlerton error - Lists every pool in a collapsible accordion: each row shows the pool name, description, unit/miner counts, and a validation badge; expanding a row reveals the endpoints list, credentials template, and a Test Configuration action
- Opens an internal pool-authoring dialog when the Add Pool button is clicked
Basic usage
<PoolManagerPools
poolConfig={poolConfigs}
backButtonClick={() => router.push('/pool-manager')}
/>Styling
.mdk-pm-pools: Root element.mdk-pm-pools__header: Title and action row.mdk-pm-pools__header-title: Page title.mdk-pm-pools__back-link: Back link button.mdk-pm-pools__accordion: Accordion root.mdk-pm-pools__accordion-item,.mdk-pm-pools__accordion-trigger,.mdk-pm-pools__accordion-content: Accordion parts