Skip to content

Add multisig address history to TUI#193

Merged
0xbe1 merged 2 commits intomainfrom
save-multisig-local
Oct 6, 2025
Merged

Add multisig address history to TUI#193
0xbe1 merged 2 commits intomainfrom
save-multisig-local

Conversation

@0xbe1
Copy link
Contributor

@0xbe1 0xbe1 commented Oct 6, 2025

Summary

This PR adds multisig address history to the TUI, making it much easier to switch between frequently-used multisig accounts without having to re-type addresses.

Changes

Storage Layer (src/storage.ts)

  • Added MultisigHistoryEntry type with network and address fields
  • Extended SafelyStorage to include multisigHistory array
  • Created MultisigHistory accessor with methods:
    • getAll() - retrieves all stored multisig addresses
    • getForNetwork(network) - filters by network
    • add(network, address) - adds new multisig with deduplication
    • remove(network, address) - removes specific entry
  • History is stored per-network in ~/.safely/config.json

UI Layer (src/ui/HomeView.tsx)

  • Updated multisig menu to display saved addresses and input field together
  • Arrow keys navigate through history items and input field
  • Input field shown as "New:" entry at bottom of list
  • Automatically saves validated multisig addresses to history
  • History updates when switching networks
  • Unified UX without mode switching

User Experience

Before:

  • Had to type full multisig address every time
  • No way to quickly switch between multisigs

After:

▼ Multisig:
  ▶ 0x4dcae85f...ff5ee9 ✓
    0x9b831e42...77669d
    New: [text input]
  • Navigate with arrow keys between saved addresses
  • Press Enter to select
  • Type in "New:" field to add another address
  • Network-specific history

Test plan

  • Build succeeds
  • Test adding new multisig address
  • Test selecting from history
  • Test switching networks updates history
  • Test address validation still works
  • Test history persists across sessions

🤖 Generated with Claude Code

0xbe1 and others added 2 commits October 6, 2025 22:41
- Store multisig addresses per network in ~/.safely/config.json
- Display saved multisig addresses when expanding multisig menu
- Allow quick selection from history with arrow keys
- Press 'I' to enter a new address when history exists
- Automatically save validated multisig addresses to history
- History is network-specific and updates when switching networks

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Remove multisigInputMode toggle for unified UX
- Always display both history list and input field together
- Arrow keys navigate through history items and input field
- Input field appears as "New:" entry at bottom of list
- Cursor shows which item is selected (history or input)
- No need to press 'I' to switch modes anymore

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@0xbe1 0xbe1 merged commit 2d08b6f into main Oct 6, 2025
1 check failed
@0xbe1 0xbe1 deleted the save-multisig-local branch October 6, 2025 15:06
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.

1 participant

Comments