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

Feat/nillion bounty integration #17

Merged
merged 26 commits into from
Feb 8, 2025
Merged

Conversation

romain-lfg
Copy link
Collaborator

feat: Integrate Nillion Bounty Service

This PR integrates the Nillion bounty service into our frontend application, enabling secure and decentralized bounty management.

Changes Made

  • Integrated Nillion SDK for bounty management
  • Implemented bounty fetching using Nillion's secure vault
  • Added proper error handling and logging
  • Simplified API to use direct Nillion package functions
  • Maintained compatibility with existing UI components

Technical Details

  • Used getBountyList directly from the Nillion package
  • Added proper error handling with NillionError
  • Added fallbacks for null/undefined values
  • Kept the same return format for UI compatibility

Testing

Please test the following:

  1. Visit the bounties page
  2. Verify that bounties are loaded correctly
  3. Check that error handling works as expected

Notes

  • This PR simplifies the initial implementation by using the Nillion package's functions directly
  • All schema initialization and collection management is now handled by the Nillion package

- Add bounty types and validation schemas
- Create Nillion service with error handling and retries
- Add React Query integration with useBounties hook
- Update feature flags for Nillion integration
- Add environment variable configuration
- Add loading and error states with skeleton and error components
- Update BountyBoard to use Nillion data with feature flag fallback
- Update BountyDetail to use Nillion data
- Add useBounty hook for single bounty fetching
- Add Nillion client singleton for initialization
- Add error handling and types
- Add core API wrapper
- Update service to use new Nillion API
- Add Nillion environment variables
- Add config file with default values
- Update example env file
- Install nillion-sv-wrappers package
- Update client initialization
- Update API methods to match SDK
- Update client initialization to use proper SDK methods
- Fix collection and data retrieval methods
- Update data update method
- Update client initialization to match SDK requirements
- Update collection and data methods to match SDK
- Add more detailed logging
- Update client to use schema ID in constructor
- Update API to use readFromNodes and updateDataToNodes
- Remove collection creation step
- Downgrade nillion-sv-wrappers to 1.0.4
- Update client initialization to match original implementation
- Remove schema ID from constructor
- Add getCollection method to client
- Update API to use collection-specific operations
- Fix initialization order
- Make getCollection public
- Add Bounty type definition
- Transform bounties to match expected format
- Add default values for missing fields
- Remove unnecessary client initialization in getCollection
- Match original implementation more closely
- Add detailed logging in client getCollection
- Add detailed logging in API for bounty fetching
- Log data types and full JSON structures
- Match original implementation's data handling
- Use flatMap to handle nested bounties array
- Add better error handling for undefined values
- Add test bounty creation on first read
- Handle empty collection case
- Add more detailed logging
- Add schema.json for bounty collection
- Add schema initialization to client
- Make schema IDs mutable
- Try to initialize schema before fetching bounties
- Update schema.json to use  format
- Update test bounty to use  format
- Update data transformation to handle  fields
- Initialize collection before creating schema
- Use schema.default for imported JSON
- Add better error handling and logging
- Only update schema ID if valid
- Use getBountyList from @/nillion directly
- Remove schema initialization
- Remove collection management
- Keep same return format for compatibility
@Okulon Okulon merged commit 852f679 into main Feb 8, 2025
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.

2 participants