Skip to content
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

Add multiple nodes #3

Merged
merged 4 commits into from
Oct 28, 2024
Merged

Add multiple nodes #3

merged 4 commits into from
Oct 28, 2024

Conversation

rhochmayr
Copy link
Owner

This pull request introduces a significant new feature to the Lilypad Node Checker, allowing users to add multiple nodes at once via a comma-separated or multiline list of wallet addresses. Additionally, it includes various updates to the UI components and hooks to support this new functionality.

New Feature: Bulk Addition of Nodes

  • README.md: Added documentation for the new bulk addition feature, including instructions on how to use it. [1] [2]
  • src/components/wallet/AddWalletForm.tsx: Updated the form to accept multiple wallet addresses, including validation and error handling for invalid addresses. [1] [2] [3] [4]
  • src/hooks/useWalletData.ts: Modified the addWallet function to handle an array of wallet addresses, including validation and error handling for duplicate or invalid addresses. [1] [2]

UI Component Updates

  • src/components/ui/input.tsx: Removed unused import to clean up the code.

Hook Enhancements

  • src/hooks/useWalletData.ts: Updated dependencies in useEffect hooks to ensure proper reactivity and initialization. [1] [2]

* **Form Handling**: Update form to accept multiple node addresses, validate each address individually, and handle bulk addition.
* **UI Adjustments**: Adjust UI to support multiline input and update placeholder text.
* **Error Handling**: Report invalid addresses without stopping the addition of valid ones.

Update addWallet function in useWalletData to handle multiple addresses

* **Validation**: Validate each address individually and report invalid ones.
* **Error Handling**: Ensure error handling for each address.

Update README.md to reflect new feature

* **Instructions**: Add instructions for adding multiple nodes at once.
…th `Textarea` in `AddWalletForm`

* **Input Component**
  - Remove `multiline` prop from `Input` component in `src/components/ui/input.tsx`

* **AddWalletForm Component**
  - Replace `Input` component with `Textarea` component for wallet addresses in `src/components/wallet/AddWalletForm.tsx`
  - Set `maxLength` prop of `Textarea` component to 2500 characters
  - Update `handleKeyDown` function to use `HTMLTextAreaElement` instead of `HTMLInputElement`
…dresses

* Modify `addWallet` function in `useWalletData.ts` to accept an array of addresses and fetch data sequentially
* Adjust `handleSubmit` function in `AddWalletForm.tsx` to call `onAddWallet` with an array of valid addresses
* Update `AddWalletFormProps` interface to reflect the change in `onAddWallet` parameter
@rhochmayr
Copy link
Owner Author

Closes #1

@rhochmayr rhochmayr merged commit cd8f10c into main Oct 28, 2024
6 checks passed
@rhochmayr rhochmayr deleted the add-multiple-nodes branch October 28, 2024 01:36
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