File tree Expand file tree Collapse file tree 2 files changed +10
-6
lines changed
Expand file tree Collapse file tree 2 files changed +10
-6
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ ' indexd ' : minor
3+ ---
4+
5+ Fixed setup dialogue showing invalid contract numbers using host stats endpoint. Closes https://github.com/SiaFoundation/indexd/issues/778
Original file line number Diff line number Diff line change 11import {
2- useAdminContracts ,
32 useAdminSettingsContracts ,
3+ useAdminStatsHosts ,
44} from '@siafoundation/indexd-react'
55
66export function useNotEnoughContracts ( ) {
77 const settingsContracts = useAdminSettingsContracts ( )
8- // TODO: active contracts
9- const contracts = useAdminContracts ( )
8+ const statsHosts = useAdminStatsHosts ( )
109
1110 const active =
1211 settingsContracts . data &&
13- contracts . data &&
14- contracts . data . length < settingsContracts . data . wantedContracts
12+ statsHosts . data &&
13+ statsHosts . data . active < settingsContracts . data . wantedContracts
1514
1615 return {
1716 active,
18- count : contracts . data ?. length || 0 ,
17+ count : statsHosts . data ?. active || 0 ,
1918 required : settingsContracts . data ?. wantedContracts || 0 ,
2019 }
2120}
You can’t perform that action at this time.
0 commit comments