We need to simplify our wallet management system by creating a centralized configuration approach similar to the reference implementation. This will make the codebase more maintainable and easier to update when adding new wallets.
## Implementation Steps š
1. [ ] Create new `walletConfig.ts` utility file
2. [ ] Move all wallet configurations to the central config
3. [ ] Update provider.tsx to use new configuration utility
4. [ ] Simplify WalletIcons component to use central config
5. [ ] Update any components that reference wallet information
6. [ ] Add utility functions for getting wallet metadata
7. [ ] Add proper TypeScript types for wallet configurations
8. [ ] Update tests to reflect new structure
9. [ ] Test that all wallet connections are working
## Required š
To keep our workflow smooth, please make sure you follow these guidelines:
- **Assignment**: Don't create a pull request if you weren't assigned to this issue.
- **Timeframe**: Complete the task within **3 business days**.
- **Closing the Issue**: In your PR description, close the issue by writing `Close #[issue_id]`.
- **Review Process**:
- Once you've submitted your PR, change the label to **"ready for review"**.
- If changes are requested, address them and then update the label back to **"ready for review"** once done.
- **Testing**: Test your PR locally before pushing, and verify that tests and build are working after pushing.
Thank you for your contribution š
ā ļø WARNING: Failure to follow the requirements above may result in being added to the OnlyDust blacklist, affecting your ability to receive future rewards.
Description š¹
We need to simplify our wallet management system by creating a centralized configuration approach similar to the reference implementation. This will make the codebase more maintainable and easier to update when adding new wallets.
This issue is inspired by the Starknet ID model for managing wallets, you can refactor with the same architecture and reusing the same functions.
Current Issues š
Files to Update š
utils/walletConfig.ts
:export const getConnectors = () => { // Return configured connectors };
export const getWalletInfo = (id: string) => { return wallets.find(wallet => wallet.id === id); };
components/UI/iconsComponents/icons/walletIcons.tsx
:const WalletIcons: FunctionComponent = ({ id }) => {
const walletInfo = getWalletInfo(id);
return walletInfo?.icon ? (
) : null; };