From a00eb5457383cc08b8537dbda39091d2a4808ff3 Mon Sep 17 00:00:00 2001 From: Djuri Baars Date: Fri, 20 Dec 2024 01:20:15 +0100 Subject: [PATCH] Get available pools from device --- src/routes/Settings.svelte | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/src/routes/Settings.svelte b/src/routes/Settings.svelte index 2dbdcdc..147ffe4 100644 --- a/src/routes/Settings.svelte +++ b/src/routes/Settings.svelte @@ -44,6 +44,18 @@ ['5dBm', 20] // 5dBm ]); + const miningPoolMap = new Map([ + ['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 handleReset = (e: Event) => { @@ -712,8 +724,9 @@ bsSize={$uiSettings.inputSize} class={$uiSettings.selectClass} > - - + {#each $settings.availablePools as pool} + + {/each}