Skip to content

Commit

Permalink
feat(frontend): 🎸 disable chain selections other than testnet
Browse files Browse the repository at this point in the history
  • Loading branch information
apttx committed Jan 9, 2025
1 parent 5024962 commit f152386
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion frontend/src/lib/components/UserMenu.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,10 @@
<div {...$ledgerIdRadioGroup} use:ledgerIdRadioGroup>
{#each availableLedgerIdStrings as ledgerIdString}
<div
{...$ledgerIdRadioItem({ value: ledgerIdString })}
{...$ledgerIdRadioItem({
value: ledgerIdString,
disabled: ledgerIdString === LedgerId.MAINNET.toString(),
})}
use:ledgerIdRadioItem
class="item radioItem"
>
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/routes/dashboard/+layout.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@
{#snippet initialized({ hashConnect })}
<div role="menu" class="connectionMenu">
<select bind:value={hashConnect.selectedLedgerId}>
<option value={LedgerId.TESTNET}>{LedgerId.TESTNET}</option>
<option value={LedgerId.MAINNET}>{LedgerId.MAINNET}</option>
<option value={LedgerId.TESTNET} selected>{LedgerId.TESTNET}</option>
<option value={LedgerId.MAINNET} disabled>{LedgerId.MAINNET}</option>
</select>

<button
Expand Down

0 comments on commit f152386

Please sign in to comment.