feat: persist stellarPublicKey to User record after account creation#25
Open
Codex723 wants to merge 5 commits into
Open
feat: persist stellarPublicKey to User record after account creation#25Codex723 wants to merge 5 commits into
Codex723 wants to merge 5 commits into
Conversation
- Add db import and user update call in POST /api/stellar/account - Return 409 Conflict if user already has a stellarPublicKey - Add comprehensive route tests for the endpoint - Add vitest config and test setup - Update CI workflow to run API tests - Fix pre-existing contract compilation errors
Codex723
force-pushed
the
feature/persist-stellar-publickey
branch
from
July 14, 2026 12:16
017807c to
953eeea
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.
TITLE: Persist generated stellarPublicKey to the User record
Description
This PR implements issue #5 to persist the generated stellarPublicKey to the User record after calling
createTestnetAccount().Changes
Main Implementation
src/app/api/stellar/account/route.ts:dbimport from@/lib/dbstellarPublicKey- returns 409 Conflict if user already has onedb.user.update()call to persist thestellarPublicKeyto the user record aftercreateTestnetAccount()succeedsTest Suite
src/app/api/stellar/account/route.test.ts:Infrastructure
vitest.config.ts: Added Vitest configuration for test configurationsrc/test/setup.ts: Added test environment setuppackage.json: Addedtestandtest:apiscripts.github/workflows/backendci.yml: Updated to run API tests in CIBug Fixes
contracts/escrow/src/lib.rs: Fixed pre-existing contract compilation errors (added.clone()toescrow_idinrelease()andrefund()functions)contracts/escrow/src/test.rs: Fixed pre-existing test file errors (removed unused imports)Acceptance Criteria
How to Test
Run
npm run testto execute the test suite.