feat: sprinkle to sub projects#12
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR introduces support for subprojects by sprinkling repository subaccount driver functionality across various modules, updating query table names, and refactoring project retrieval functions. Key changes include:
- Adding the repoSubAccountDriver property to the Network type and getNetwork configuration.
- Refactoring queries to use updated table names and consolidating split receiver queries.
- Renaming and enhancing project query functions to include subproject data by calling a new contract method.
Reviewed Changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/types.ts | Added repoSubAccountDriver property to the Network type. |
| src/queries/getTokens.ts | Updated table name formatting in token queries. |
| src/queries/getCurrentSplitsReceivers.ts | Consolidated queries and mapping now always using fundeeProjectId. |
| src/queries/getAllProjectsSortedByCreationDate.ts | Renamed function and added subproject-fetch logic via a contract call. |
| src/queries/getAllDripListsSortedByCreationDate.ts | Updated table naming to follow the new naming convention. |
| src/index.ts | Updated imports and usage to reflect the renamed project query. |
| src/getNetwork.ts | Added repoSubAccountDriver addresses for supported networks. |
| src/contracts/*.ts | Added new contract files supporting subaccount driver and removed duplication in drips-client. |
Comments suppressed due to low confidence (2)
src/queries/getAllProjectsSortedByCreationDate.ts:10
- [nitpick] The function name 'getAllProjectsAndSubProjectSortedByCreationDate' may be slightly inconsistent; consider using a plural form for subprojects (e.g. 'getAllProjectsAndSubProjectsSortedByCreationDate') for clarity.
export async function getAllProjectsAndSubProjectSortedByCreationDate(
src/queries/getCurrentSplitsReceivers.ts:28
- The mapping now always uses 'fundeeProjectId' for building the splits receiver, which previously handled both 'dripList' and 'project' types separately. Confirm that the 'splits_receivers' table reliably contains 'fundeeProjectId' for all cases or adjust the mapping accordingly.
...splits.map(({fundeeProjectId, weight}) => ({
|
🚅 Previously deployed to Railway in the Drips App project. Environment has been deleted. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves: drips-network/app#1548