feat(wallets): add integration test for wallet following list endpoint - #775
Open
oluwa1to9-web wants to merge 2 commits into
Open
Conversation
|
@oluwa1to9-web Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
Add GET /api/v1/wallets/:address/following endpoint that returns all creators a wallet follows, ordered alphabetically by display name. Closes accesslayerorg#768 - Add WalletCreatorFollow Prisma model with migration - Add controller, service, and Zod validation schema - Register route with jwtAuth middleware (401 for unauthenticated) - Integration test verifies alphabetical ordering, completeness, empty array for wallets with no follows, and 401 for missing auth
oluwa1to9-web
force-pushed
the
feature/integration-test-wallet-following-creators
branch
5 times, most recently
from
August 25, 2026 17:10
6baa975 to
ba8ad53
Compare
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.
Summary
Adds an integration test for the
GET /api/v1/wallets/:address/followingendpoint that returns all creators a wallet follows, ordered alphabetically by display name.Closes #768
Changes
prisma/schema/follow.prisma— NewWalletCreatorFollowmodel linking wallets to creator profiles they follow, with unique constraint on(walletAddress, creatorId)and indexes for efficient lookups.prisma/schema/migrations/20260825000000_add_wallet_creator_follows/migration.sql— SQL migration creating thewallet_creator_followstable.src/modules/wallets/wallet-following.schemas.ts— Zod validation schema for the:addressparameter (reuses existingStellarAddressSchema).src/modules/wallets/wallet-following.service.ts— Service layer that queries follows by wallet address, fetches linked creator profiles, and sorts them alphabetically bydisplayName.src/modules/wallets/wallet-following.controllers.ts— Express controller that validates params, calls the service, and returns the response.src/modules/wallets/wallets.routes.ts— Registered the newGET /:address/followingroute withjwtAuthmiddleware.Integration Test
src/modules/wallets/wallet-following.integration.test.tscovers all acceptance criteria:["Alice", "Mike", "Zara"]orderdata.length === 3with correct IDsdata === []status === 401Test Setup
The test seeds:
All seeded data is cleaned up in
afterAll.Verification
tsc --noEmitpasses cleanly ✅Note
The
wallet_creator_followsmigration needs to be applied to the database. If running locally: