Skip to content

Fix: Resolve four extension wallet issues - #1437

Open
Hahfyeex wants to merge 4 commits into
ancore-org:mainfrom
Hahfyeex:fix/extension-wallet-cleanup
Open

Hahfyeex wants to merge 4 commits into
ancore-org:mainfrom
Hahfyeex:fix/extension-wallet-cleanup

Conversation

@Hahfyeex

Copy link
Copy Markdown
Contributor

🐛 Issues Fixed

#1393 - Live /home route displays hardcoded fake balance

Problem: The router's inline HomeScreen() component rendered a hardcoded 1,245.80 XLM balance, while the real HomeScreen.tsx with proper balance fetching via useAccountBalance (fixed in #1228/#1286) was never imported or used.

Solution: Imported and used the real HomeScreen component that properly fetches live balances from the network.

Files changed:

  • apps/extension-wallet/src/router/index.tsx

#1396 - PermissionSelector.tsx is unused duplicate code

Problem: A reusable PermissionSelector component built on @ancore/account-abstraction's bitmask helpers existed but was never imported. Instead, AddSessionKeyDialog.tsx hand-rolled its own hardcoded permission array with duplicate logic.

Solution: Refactored AddSessionKeyDialog to use the existing PermissionSelector component, eliminating code duplication and ensuring consistency with the canonical permission system.

Files changed:

  • apps/extension-wallet/src/screens/SessionKeys/AddSessionKeyDialog.tsx

#1394 - SessionKeysFlow.tsx is fully dead code

Problem: A 133-line component file (SessionKeysFlow.tsx) with its own local types had zero importers across the entire codebase. The router uses the separate SessionKeysScreen.tsx instead.

Solution: Deleted the unused file to reduce maintenance burden and codebase complexity.

Files changed:

  • apps/extension-wallet/src/screens/SessionKeys/SessionKeysFlow.tsx (deleted)

#1397 - signAuthEntry returns bare signature, not full signed entry XDR

Problem: The signAuthEntry function's JSDoc promised to return "the full signed entry XDR" but the implementation discarded the decoded entry and returned only raw signature bytes as base64. This violated SEP-43 expectations and had a TODO(#770) acknowledging the gap.

Solution: Implemented proper XDR construction:

  • Create SorobanAddressCredentials with the signature
  • Build a complete SorobanAuthorizationEntry with embedded credentials
  • Return the full signed entry XDR as documented

Files changed:

  • apps/extension-wallet/src/background/handlers/sign-auth-entry.ts

📊 Impact

  • Code deletion: -238 lines (removed dead code)
  • Code quality: Eliminated duplicate implementations and aligned code with documentation
  • Functionality: Fixed hardcoded balance display and incorrect XDR return value
  • Maintainability: Reduced technical debt by removing unused files and consolidating duplicate logic

✅ Testing

  • Verify /home route displays real account balance (not hardcoded 1,245.80 XLM)
  • Test session key creation dialog uses proper permission selector
  • Confirm signAuthEntry returns valid SorobanAuthorizationEntry XDR
  • Ensure no regressions in session key functionality

Closes #1393
Closes #1394
Closes #1396
Closes #1397

Hahfyeex and others added 4 commits August 28, 2026 12:08
fix: harden crypto, extension privacy, and relayer validation
- Fix ancore-org#1393: Replace hardcoded balance in router with real HomeScreen component
- Fix ancore-org#1396: Replace hardcoded permissions in AddSessionKeyDialog with PermissionSelector
- Fix ancore-org#1394: Remove dead SessionKeysFlow.tsx file
- Fix ancore-org#1397: Update signAuthEntry to return full signed entry XDR instead of bare signature

Closes ancore-org#1393
Closes ancore-org#1394
Closes ancore-org#1396
Closes ancore-org#1397
@drips-wave

drips-wave Bot commented Sep 26, 2026

Copy link
Copy Markdown

@Hahfyeex Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@coderabbitai

coderabbitai Bot commented Sep 26, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 098db012-bc70-4100-a4e6-108e2206dcbb


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment