Get available pools from device

This commit is contained in:
Djuri Baars 2024-12-20 01:20:15 +01:00
parent 711c625648
commit a00eb54573

View file

@ -44,6 +44,18 @@
['5dBm', 20] // 5dBm ['5dBm', 20] // 5dBm
]); ]);
const miningPoolMap = new Map<string, string>([
['noderunners', 'pool.noderunners.network'],
['braiins', 'braiins pool'],
['ocean', 'ocean.xyz']
]);
const getMiningPoolName = (name: string) => {
if (miningPoolMap.has(name)) return miningPoolMap.get(name);
return name;
};
const dispatch = createEventDispatcher(); const dispatch = createEventDispatcher();
const handleReset = (e: Event) => { const handleReset = (e: Event) => {
@ -712,8 +724,9 @@
bsSize={$uiSettings.inputSize} bsSize={$uiSettings.inputSize}
class={$uiSettings.selectClass} class={$uiSettings.selectClass}
> >
<option value="braiins">Braiins Pool</option> {#each $settings.availablePools as pool}
<option value="ocean">Ocean</option> <option value={pool}>{getMiningPoolName(pool)}</option>
{/each}
</Input> </Input>
</Col> </Col>
</Row> </Row>