Skip to content

SDP-1614: Add wallet creation type to TSS transactions - #680

Merged
philipliu merged 4 commits into
feature/c-accountsfrom
philip/sdp-1614-tss-table-update
May 26, 2025
Merged

SDP-1614: Add wallet creation type to TSS transactions#680
philipliu merged 4 commits into
feature/c-accountsfrom
philip/sdp-1614-tss-table-update

Conversation

@philipliu

@philipliu philipliu commented May 14, 2025

Copy link
Copy Markdown
Contributor

What

The /embedded-wallets/create endpoint will submit a new type of transaction for wallet creation to TSS. This makes the necessary changes to the Transaction model to support building the TSS workers and scheduled jobs/event handlers on top of it.

Why

TSS will be submitting wallet creation transactions, but it's built for payment transactions and needs to be generalized to support other transaction types. This will require making changes to the transaction type, the transaction worker, and the payment sync jobs and event handlers.

Known limitations

[TODO or N/A]

Checklist

  • Title follows SDP-1234: Add new feature or Chore: Refactor package xyz format. The Jira ticket code was included if available.
  • PR has a focused scope and doesn't mix features with refactoring
  • Tests are included (if applicable)
  • CHANGELOG.md is updated (if applicable)
  • CONFIG/SECRETS changes are updated in helmcharts and deployments (if applicable)
  • Preview deployment works as expected
  • Ready for production

@philipliu
philipliu temporarily deployed to Receiver Registration - E2E Integration Tests (Stellar) May 14, 2025 03:20 — with GitHub Actions Inactive
@philipliu
philipliu temporarily deployed to Anchor Integration Tests May 14, 2025 03:20 — with GitHub Actions Inactive
@philipliu
philipliu force-pushed the philip/sdp-1614-tss-table-update branch from 753b2b4 to 969c16c Compare May 15, 2025 17:56
@philipliu
philipliu temporarily deployed to Anchor Integration Tests May 15, 2025 17:56 — with GitHub Actions Inactive
@philipliu
philipliu temporarily deployed to Receiver Registration - E2E Integration Tests (Stellar) May 15, 2025 17:56 — with GitHub Actions Inactive
@philipliu
philipliu force-pushed the philip/sdp-1614-tss-table-update branch from 969c16c to 4881eda Compare May 15, 2025 18:29
@philipliu
philipliu temporarily deployed to Anchor Integration Tests May 15, 2025 18:29 — with GitHub Actions Inactive
@philipliu
philipliu temporarily deployed to Receiver Registration - E2E Integration Tests (Stellar) May 15, 2025 18:29 — with GitHub Actions Inactive
@philipliu
philipliu force-pushed the philip/sdp-1614-tss-table-update branch from 4881eda to 58a0cf6 Compare May 15, 2025 18:33
@philipliu
philipliu temporarily deployed to Receiver Registration - E2E Integration Tests (Stellar) May 15, 2025 18:33 — with GitHub Actions Inactive
@philipliu
philipliu temporarily deployed to Anchor Integration Tests May 15, 2025 18:33 — with GitHub Actions Inactive
@philipliu
philipliu force-pushed the philip/sdp-1614-tss-table-update branch from 58a0cf6 to 2591fa9 Compare May 15, 2025 18:39
@philipliu
philipliu temporarily deployed to Anchor Integration Tests May 15, 2025 18:39 — with GitHub Actions Inactive
@philipliu
philipliu temporarily deployed to Receiver Registration - E2E Integration Tests (Stellar) May 15, 2025 18:39 — with GitHub Actions Inactive
@philipliu
philipliu marked this pull request as ready for review May 15, 2025 18:44
Comment on lines +74 to +86
type Payment struct {
AssetCode string `db:"asset_code"`
AssetIssuer string `db:"asset_issuer"`
Amount float64 `db:"amount"`
Destination string `db:"destination"`
Memo string `db:"memo"`
MemoType schema.MemoType `db:"memo_type"`
}

type WalletCreation struct {
PublicKey string `db:"public_key"`
WasmHash string `db:"wasm_hash"`
}

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@marcelosalloum brought up whether or not we want to prefix the columns with the transaction type in the database.

I'm leaning towards not doing it since it doesn't really help too much with code readability IMO since we are accessing these fields through the Transaction struct, and it doesn't do much to prevent misuse of these columns. Instead, we are baking a lot of the safety into the validate method, which is called before the methods are inserted into the database.

@philipliu
philipliu had a problem deploying to Anchor Integration Tests May 22, 2025 21:54 — with GitHub Actions Failure
@philipliu
philipliu had a problem deploying to Receiver Registration - E2E Integration Tests (Stellar) May 22, 2025 21:54 — with GitHub Actions Failure
@stellar-jenkins

Copy link
Copy Markdown

Something went wrong with PR preview build please check

@marcelosalloum marcelosalloum left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Plz, feel free to merge it after addressing the comments below.

Comment thread internal/data/sql_column_config.go
@philipliu
philipliu temporarily deployed to Receiver Registration - E2E Integration Tests (Stellar) May 26, 2025 15:39 — with GitHub Actions Inactive
@philipliu
philipliu temporarily deployed to Anchor Integration Tests May 26, 2025 15:39 — with GitHub Actions Inactive
@philipliu
philipliu temporarily deployed to Receiver Registration - E2E Integration Tests (Stellar) May 26, 2025 15:50 — with GitHub Actions Inactive
@philipliu
philipliu temporarily deployed to Anchor Integration Tests May 26, 2025 15:50 — with GitHub Actions Inactive
@philipliu
philipliu force-pushed the philip/sdp-1614-tss-table-update branch from 6fb232c to 3b46aab Compare May 26, 2025 16:12
@philipliu
philipliu temporarily deployed to Anchor Integration Tests May 26, 2025 16:12 — with GitHub Actions Inactive
@philipliu
philipliu temporarily deployed to Receiver Registration - E2E Integration Tests (Stellar) May 26, 2025 16:12 — with GitHub Actions Inactive
@philipliu
philipliu force-pushed the philip/sdp-1614-tss-table-update branch from 3b46aab to ee6c59c Compare May 26, 2025 16:15
@philipliu
philipliu temporarily deployed to Anchor Integration Tests May 26, 2025 16:15 — with GitHub Actions Inactive
@philipliu
philipliu temporarily deployed to Receiver Registration - E2E Integration Tests (Stellar) May 26, 2025 16:15 — with GitHub Actions Inactive
@stellar-jenkins

Copy link
Copy Markdown

Something went wrong with PR preview build please check

@philipliu
philipliu force-pushed the philip/sdp-1614-tss-table-update branch from ee6c59c to 0647693 Compare May 26, 2025 16:19
@philipliu
philipliu temporarily deployed to Receiver Registration - E2E Integration Tests (Stellar) May 26, 2025 16:19 — with GitHub Actions Inactive
@philipliu
philipliu temporarily deployed to Anchor Integration Tests May 26, 2025 16:19 — with GitHub Actions Inactive
@philipliu
philipliu merged commit 6a7a082 into feature/c-accounts May 26, 2025
@philipliu
philipliu deleted the philip/sdp-1614-tss-table-update branch May 26, 2025 16:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants