Skip to content

Improve swap now UX: silent ephemeral wallet, network-aware dashboard links, labeled password prompts#369

Merged
anderdc merged 2 commits into
testfrom
fix/swap-now-mnemonic-dashboard
May 22, 2026
Merged

Improve swap now UX: silent ephemeral wallet, network-aware dashboard links, labeled password prompts#369
anderdc merged 2 commits into
testfrom
fix/swap-now-mnemonic-dashboard

Conversation

@LandynDev
Copy link
Copy Markdown
Collaborator

@LandynDev LandynDev commented May 22, 2026

Problem

Several rough edges in the alw swap now flow surfaced on a mainnet (finney) miner:

  1. Scary mnemonic dump. During "Step 1/3: Reserving miner", the CLI printed fresh coldkey and hotkey mnemonics. These belong to the throwaway dendrite-lite ephemeral wallet (transport auth only, never holds funds), but a user has no way to know that — it reads like the tool just generated keys holding their money.

  2. Wrong dashboard host. Reservation/swap links pointed at https://test.all-ways.io even when the CLI is configured for finney/netuid 7. The URL was hardcoded with only an ALLWAYS_DASHBOARD_URL env override and ignored the active network entirely.

  3. Unlabeled password prompts. The TAO flow prompts for the wallet password twice ("Enter your password" / "Decrypting" — bittensor's own text), with no indication of which password it wants or what each unlock authorizes.

  4. Misplaced wallet notice. "TAO will be sent automatically from your wallet" printed at the very top of the flow, far from where the password is actually entered.

Fix

  1. Pass suppress=True to wallet.create_if_non_existent(...) in dendrite_lite.py so the ephemeral wallet is created silently.

  2. Add a network-aware dashboard_url(network=None) resolver in helpers.py:

    • finneyhttps://all-ways.io
    • everything else (test, local, custom endpoints) → https://test.all-ways.io
    • ALLWAYS_DASHBOARD_URL still overrides everything.

    Routed all link builders (view.py, swap.py, claim.py) through it, removing the hardcoded DEFAULT_DASHBOARD_URL constant.

  3. Print a clear context line before each coldkey unlock:

    • first unlock → "Password = your Bittensor coldkey password. This first unlock signs the reservation proof (proving you own the source address)."
    • send step → "Enter your coldkey password again — this unlock signs and broadcasts the TAO transfer."
  4. Moved the "TAO sends automatically from your wallet ''" notice down to the unlock step, right next to the password prompt, and included the configured wallet name.

Testing

  • ruff check / ruff format clean across all touched files
  • Dashboard resolver logic verified for finney/test/local/override cases

@LandynDev LandynDev changed the title Fix scary mnemonic output and wrong dashboard host in swap now Improve swap now UX: silent ephemeral wallet, network-aware dashboard links, labeled password prompts May 22, 2026
@anderdc anderdc merged commit a39ad75 into test May 22, 2026
3 checks passed
@anderdc anderdc deleted the fix/swap-now-mnemonic-dashboard branch May 22, 2026 23:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants