Skip to content

Comments

fix:findable keyfile variations#13

Open
PSkinnerTech wants to merge 3 commits intomainfrom
wallet-opt
Open

fix:findable keyfile variations#13
PSkinnerTech wants to merge 3 commits intomainfrom
wallet-opt

Conversation

@PSkinnerTech
Copy link
Owner

Changes Made

  • ✅ Enhanced wallet detection to properly handle keyfile*.json patterns

Core Implementation

export function checkWalletExists(): boolean {
  const dir = process.cwd();
  const files = fs.readdirSync(dir);
  
  return files.some(file => 
    file === 'wallet.json' || /^keyfile.*\.json$/.test(file)
  );
}

Testing Plan

  • Unit Tests
    • Verify wallet.json detection
    • Verify keyfile*.json pattern detection
    • Test missing wallet scenarios
  • Integration Tests
    • Test wallet check command flow
    • Verify proper error messages

Next Steps

  • Consider adding support for additional wallet file patterns
  • Add more detailed error messages about supported wallet formats

Security

  • No changes to security implications
  • Maintains existing file permission checks
  • Only reads file names, not contents during detection

Breaking Changes

None. This change enhances existing functionality without breaking current behavior.


PR Checklist

  • Tests added/updated
  • Documentation updated
  • Changelog updated
  • Version bumped (not needed for enhancement)
  • Security implications considered

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