SDP-1614: Create account creation service and request handler - #686
Merged
philipliu merged 4 commits intoMay 22, 2025
Merged
Conversation
philipliu
temporarily deployed
to
Anchor Integration Tests
May 19, 2025 21:00 — with
GitHub Actions
Inactive
philipliu
temporarily deployed
to
Receiver Registration - E2E Integration Tests (Stellar)
May 19, 2025 21:00 — with
GitHub Actions
Inactive
philipliu
force-pushed
the
philip/sdp-1614-create-account-service
branch
from
May 19, 2025 21:11
e944246 to
349d333
Compare
philipliu
temporarily deployed
to
Anchor Integration Tests
May 19, 2025 21:11 — with
GitHub Actions
Inactive
philipliu
temporarily deployed
to
Receiver Registration - E2E Integration Tests (Stellar)
May 19, 2025 21:11 — with
GitHub Actions
Inactive
philipliu
force-pushed
the
philip/sdp-1614-create-account-service
branch
from
May 19, 2025 21:35
349d333 to
9f984c1
Compare
philipliu
temporarily deployed
to
Anchor Integration Tests
May 19, 2025 21:35 — with
GitHub Actions
Inactive
philipliu
temporarily deployed
to
Receiver Registration - E2E Integration Tests (Stellar)
May 19, 2025 21:35 — with
GitHub Actions
Inactive
philipliu
force-pushed
the
philip/sdp-1614-create-account-service
branch
from
May 20, 2025 00:47
9f984c1 to
a7b30dd
Compare
philipliu
temporarily deployed
to
Receiver Registration - E2E Integration Tests (Stellar)
May 20, 2025 00:47 — with
GitHub Actions
Inactive
philipliu
temporarily deployed
to
Anchor Integration Tests
May 20, 2025 00:47 — with
GitHub Actions
Inactive
philipliu
force-pushed
the
philip/sdp-1614-create-account-service
branch
from
May 20, 2025 14:10
a7b30dd to
8caf57d
Compare
philipliu
had a problem deploying
to
Receiver Registration - E2E Integration Tests (Stellar)
May 20, 2025 14:10 — with
GitHub Actions
Failure
philipliu
temporarily deployed
to
Anchor Integration Tests
May 20, 2025 14:10 — with
GitHub Actions
Inactive
philipliu
temporarily deployed
to
Receiver Registration - E2E Integration Tests (Stellar)
May 20, 2025 14:11 — with
GitHub Actions
Inactive
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR implements a new embedded wallet account creation service, including the data model, service layer, API endpoints, and comprehensive tests.
- Added new database table and migration for embedded wallets.
- Created EmbeddedWalletService with corresponding unit tests and mocks.
- Integrated new REST endpoints for creating and checking wallet status.
Reviewed Changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| stellar-multitenant/internal/provisioning/manager_test.go | Added "embedded_wallets" to the expected tables list. |
| stellar-multitenant/internal/httphandler/tenants_handler_test.go | Added "embedded_wallets" entry in tenant handler tests. |
| internal/services/mocks/mock_embedded_wallet_service.go | New mock implementation for EmbeddedWalletService. |
| internal/services/embedded_wallet_service_test.go | Unit tests for wallet creation and retrieval. |
| internal/services/embedded_wallet_service.go | Implementation of wallet creation and status retrieval logic. |
| internal/serve/httphandler/wallet_creation_handler_test.go | Tests for the new wallet creation and status API endpoints. |
| internal/serve/httphandler/wallet_creation_handler.go | API endpoints for creating and retrieving embedded wallets. |
| internal/data/models.go | Updated to include the EmbeddedWalletModel. |
| internal/data/fixtures.go | Introduced fixtures for creating and deleting embedded wallet records. |
| internal/data/embedded_wallet_test.go | Tests for the embedded wallet data model and update validations. |
| internal/data/embedded_wallet.go | Implementation of the embedded wallet model including update and column names. |
| db/migrations/sdp-migrations/2025-05-18.1-create-embedded-wallet.sql | Migration script to create the embedded_wallets table and enum type. |
Comments suppressed due to low confidence (1)
internal/data/embedded_wallet.go:54
- Consider renaming 'EmbeddWalletColumnNames' to 'EmbeddedWalletColumnNames' to improve clarity and maintain consistency with other naming conventions in the code.
func EmbeddWalletColumnNames(tableReference, resultAlias string) string {
philipliu
marked this pull request as ready for review
May 20, 2025 14:15
philipliu
temporarily deployed
to
Anchor Integration Tests
May 20, 2025 14:21 — with
GitHub Actions
Inactive
philipliu
temporarily deployed
to
Receiver Registration - E2E Integration Tests (Stellar)
May 20, 2025 14:21 — with
GitHub Actions
Inactive
marcelosalloum
left a comment
Contributor
There was a problem hiding this comment.
Great job!
I'm leaving a few comments below. Plz DM me if you have any questions.
philipliu
temporarily deployed
to
Receiver Registration - E2E Integration Tests (Stellar)
May 21, 2025 19:31 — with
GitHub Actions
Inactive
philipliu
temporarily deployed
to
Anchor Integration Tests
May 21, 2025 19:31 — with
GitHub Actions
Inactive
marcelosalloum
approved these changes
May 22, 2025
marcelosalloum
left a comment
Contributor
There was a problem hiding this comment.
LGTM! Plz, feel free to merge it after addressing the comments below.
philipliu
temporarily deployed
to
Receiver Registration - E2E Integration Tests (Stellar)
May 22, 2025 21:01 — with
GitHub Actions
Inactive
philipliu
temporarily deployed
to
Anchor Integration Tests
May 22, 2025 21:01 — with
GitHub Actions
Inactive
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.
What
This PR implements the embedded wallet account creation service scaffolding. It introduces:
EmbeddedWalletmanages and tracks the lifecycle of an embedded wallet.Transactionwill be inserted into the TSS database when this API is called.receivers_wallet.receivers_walletmanages the relationship between the receiver and their wallets registration status, whileembedded_walletmanages the lifecycle of an embedded wallet. Anembedded_walletis created for a receiver, but it is not associated with the receiver until the wallet is created and the receiver is registered in SEP-24.EmbeddedWalletService, creates and checks the status of embedded wallets.WalletCreationHandlerwith REST endpoints;POST /embedded_wallets/to create a new embedded wallet.GET /embedded_wallets/status?token={token}to check the status of an embedded wallet.Why
Account creation API
Known limitations
These will be implemented in other PRs.
Checklist
SDP-1234: Add new featureorChore: Refactor package xyzformat. The Jira ticket code was included if available.CHANGELOG.mdis updated (if applicable)