-
Notifications
You must be signed in to change notification settings - Fork 2.3k
fix: improve two-stage private key input UX (32+32 → 58+6 split) #942
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: improve two-stage private key input UX (32+32 → 58+6 split) #942
Conversation
## Problem Users reported that the 32+32 character split design is not user-friendly: 1. ❌ Second stage still requires entering 32 characters - hard to count 2. ❌ Need to count many characters in both stages 3. ❌ Easy to make mistakes when counting ## Solution Change the split from 32+32 to **58+6** **Stage 1**: 58 characters - Enter the majority of the key (90%) - Easy to copy/paste the prefix **Stage 2**: 6 characters - ✅ Only need to count last 6 chars (very easy) - ✅ Quick verification of key suffix - ✅ Reduces user errors ## Changes ```typescript // Old: Equal split const expectedPart1Length = Math.ceil(expectedLength / 2) // 32 const expectedPart2Length = expectedLength - expectedPart1Length // 32 // New: Most of key + last 6 chars const expectedPart1Length = expectedLength - 6 // 58 const expectedPart2Length = 6 // Last 6 characters ``` ## Test plan ✅ Frontend builds successfully (npm run build) ✅ User-friendly: Only need to count 6 characters ✅ Maintains security: Two-stage input logic unchanged
🤖 Advisory Check ResultsThese are advisory checks to help improve code quality. They won't block your PR from being merged. 📋 PR InformationTitle Format: ✅ Good - Follows Conventional Commits 🔧 Backend ChecksGo Formatting: ✅ Good Fix locally: go fmt ./... # Format code
go vet ./... # Check for issues
go test ./... # Run tests⚛️ Frontend ChecksBuild & Type Check: ✅ Success Fix locally: cd web
npm run build # Test build (includes type checking)📖 ResourcesQuestions? Feel free to ask in the comments! 🙏 These checks are advisory and won't block your PR from being merged. This comment is automatically generated from pr-checks-run.yml. |
合併 5 個上游 commits: - b7fe547: fix(web): unify password validation logic (NoFxAiOS#943) - 7af0daf: fix: improve two-stage private key input UX (NoFxAiOS#942) - 5ad731d: fix(web): fix button disabled validation (NoFxAiOS#937) - cca7bc5: feat: Hyperliquid Agent Wallet docs (NoFxAiOS#936) - 70adfd7: feat(docs): add Hyperliquid tutorial (NoFxAiOS#935) 解決衝突: - TwoStageKeyModal.tsx: 選擇上游英文註釋版本 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
…xAiOS#942) ## Problem Users reported that the 32+32 character split design is not user-friendly: 1. ❌ Second stage still requires entering 32 characters - hard to count 2. ❌ Need to count many characters in both stages 3. ❌ Easy to make mistakes when counting ## Solution Change the split from 32+32 to **58+6** **Stage 1**: 58 characters - Enter the majority of the key (90%) - Easy to copy/paste the prefix **Stage 2**: 6 characters - ✅ Only need to count last 6 chars (very easy) - ✅ Quick verification of key suffix - ✅ Reduces user errors ## Changes ```typescript // Old: Equal split const expectedPart1Length = Math.ceil(expectedLength / 2) // 32 const expectedPart2Length = expectedLength - expectedPart1Length // 32 // New: Most of key + last 6 chars const expectedPart1Length = expectedLength - 6 // 58 const expectedPart2Length = 6 // Last 6 characters ``` ## Test plan ✅ Frontend builds successfully (npm run build) ✅ User-friendly: Only need to count 6 characters ✅ Maintains security: Two-stage input logic unchanged Co-authored-by: the-dev-z <the-dev-z@users.noreply.github.com>
…xAiOS#942) ## Problem Users reported that the 32+32 character split design is not user-friendly: 1. ❌ Second stage still requires entering 32 characters - hard to count 2. ❌ Need to count many characters in both stages 3. ❌ Easy to make mistakes when counting ## Solution Change the split from 32+32 to **58+6** **Stage 1**: 58 characters - Enter the majority of the key (90%) - Easy to copy/paste the prefix **Stage 2**: 6 characters - ✅ Only need to count last 6 chars (very easy) - ✅ Quick verification of key suffix - ✅ Reduces user errors ## Changes ```typescript // Old: Equal split const expectedPart1Length = Math.ceil(expectedLength / 2) // 32 const expectedPart2Length = expectedLength - expectedPart1Length // 32 // New: Most of key + last 6 chars const expectedPart1Length = expectedLength - 6 // 58 const expectedPart2Length = 6 // Last 6 characters ``` ## Test plan ✅ Frontend builds successfully (npm run build) ✅ User-friendly: Only need to count 6 characters ✅ Maintains security: Two-stage input logic unchanged Co-authored-by: the-dev-z <the-dev-z@users.noreply.github.com>
## Problem Users reported that the 32+32 character split design is not user-friendly: 1. ❌ Second stage still requires entering 32 characters - hard to count 2. ❌ Need to count many characters in both stages 3. ❌ Easy to make mistakes when counting ## Solution Change the split from 32+32 to **58+6** **Stage 1**: 58 characters - Enter the majority of the key (90%) - Easy to copy/paste the prefix **Stage 2**: 6 characters - ✅ Only need to count last 6 chars (very easy) - ✅ Quick verification of key suffix - ✅ Reduces user errors ## Changes ```typescript // Old: Equal split const expectedPart1Length = Math.ceil(expectedLength / 2) // 32 const expectedPart2Length = expectedLength - expectedPart1Length // 32 // New: Most of key + last 6 chars const expectedPart1Length = expectedLength - 6 // 58 const expectedPart2Length = 6 // Last 6 characters ``` ## Test plan ✅ Frontend builds successfully (npm run build) ✅ User-friendly: Only need to count 6 characters ✅ Maintains security: Two-stage input logic unchanged Co-authored-by: the-dev-z <the-dev-z@users.noreply.github.com>
## Problem Users reported that the 32+32 character split design is not user-friendly: 1. ❌ Second stage still requires entering 32 characters - hard to count 2. ❌ Need to count many characters in both stages 3. ❌ Easy to make mistakes when counting ## Solution Change the split from 32+32 to **58+6** **Stage 1**: 58 characters - Enter the majority of the key (90%) - Easy to copy/paste the prefix **Stage 2**: 6 characters - ✅ Only need to count last 6 chars (very easy) - ✅ Quick verification of key suffix - ✅ Reduces user errors ## Changes ```typescript // Old: Equal split const expectedPart1Length = Math.ceil(expectedLength / 2) // 32 const expectedPart2Length = expectedLength - expectedPart1Length // 32 // New: Most of key + last 6 chars const expectedPart1Length = expectedLength - 6 // 58 const expectedPart2Length = 6 // Last 6 characters ``` ## Test plan ✅ Frontend builds successfully (npm run build) ✅ User-friendly: Only need to count 6 characters ✅ Maintains security: Two-stage input logic unchanged Co-authored-by: the-dev-z <the-dev-z@users.noreply.github.com>
## Problem Users reported that the 32+32 character split design is not user-friendly: 1. ❌ Second stage still requires entering 32 characters - hard to count 2. ❌ Need to count many characters in both stages 3. ❌ Easy to make mistakes when counting ## Solution Change the split from 32+32 to **58+6** **Stage 1**: 58 characters - Enter the majority of the key (90%) - Easy to copy/paste the prefix **Stage 2**: 6 characters - ✅ Only need to count last 6 chars (very easy) - ✅ Quick verification of key suffix - ✅ Reduces user errors ## Changes ```typescript // Old: Equal split const expectedPart1Length = Math.ceil(expectedLength / 2) // 32 const expectedPart2Length = expectedLength - expectedPart1Length // 32 // New: Most of key + last 6 chars const expectedPart1Length = expectedLength - 6 // 58 const expectedPart2Length = 6 // Last 6 characters ``` ## Test plan ✅ Frontend builds successfully (npm run build) ✅ User-friendly: Only need to count 6 characters ✅ Maintains security: Two-stage input logic unchanged Co-authored-by: the-dev-z <the-dev-z@users.noreply.github.com>
Summary
Improves the user experience of the two-stage private key input by changing the character split from 32+32 to 58+6.
Problem
Users reported issues with the current 32+32 split:
Real user feedback:
Solution
Change to 58 + 6 split:
Stage 1 (58 characters):
Stage 2 (6 characters):
Changes
Benefits
Test plan
npm run build)Screenshots
N/A (UX improvement, no visual changes)