Feature/issue 5 persist stellar publickey#26
Open
Codex723 wants to merge 6 commits into
Open
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
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.
Pull Request Summary
Branch:
feature/persist-stellar-publickeyChanges Made
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.tsfor test configurationsrc/test/setup.tsfor test environment setuppackage.jsonwithtestandtest:apiscripts.github/workflows/backendci.ymlto run API tests in CI.github/workflows/contracts.ymlfor Rust/Soroban contract tests.github/workflows/frontend.ymlfor frontend CI (lint, test, build)Bug Fixes:
contracts/escrow/src/lib.rs(added.clone()toescrow_idinrelease()andrefund()functions)contracts/escrow/src/test.rs(removed unused imports).gitignoreto include Rust and vitest directoriesAcceptance Criteria
How to Test
Run
npm run testto execute the test suite.Closes #5