Skip to content

feat(widget): normalize ton transactions to raw for external providers#549

Merged
petar-omni merged 1 commit into
mainfrom
feat/ton-tx-format
Jun 25, 2026
Merged

feat(widget): normalize ton transactions to raw for external providers#549
petar-omni merged 1 commit into
mainfrom
feat/ton-tx-format

Conversation

@petar-omni

@petar-omni petar-omni commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Convert default TON seqno/message payloads into raw transaction arrays before forwarding to external wallet providers. Remove the unused preferredTransactionFormat setting and its domain type re-export.

Summary by CodeRabbit

  • Bug Fixes

    • Improved TON transaction handling so signed transactions are normalized more reliably before being sent.
    • Preserved raw TON transactions when they are already provided, reducing unexpected changes in provider requests.
  • Documentation

    • Updated the widget settings documentation to remove an outdated transaction format option.
  • Chores

    • Cleaned up a deprecated settings option from the public settings definitions.

Convert default TON seqno/message payloads into raw transaction arrays
before forwarding to external wallet providers. Remove the unused
preferredTransactionFormat setting and its domain type re-export.
@changeset-bot

changeset-bot Bot commented Jun 24, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 01cb532

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai

coderabbitai Bot commented Jun 24, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 6c872dc4-c53b-4bb1-9dc5-6d79850ad09c

📥 Commits

Reviewing files that changed from the base of the PR and between 2de9c9f and 01cb532.

📒 Files selected for processing (6)
  • README.md
  • packages/widget/src/domain/types/settings.ts
  • packages/widget/src/domain/types/transaction.ts
  • packages/widget/src/providers/settings/types.ts
  • packages/widget/src/providers/sk-wallet/index.tsx
  • packages/widget/tests/use-cases/sk-wallet.test.tsx
💤 Files with no reviewable changes (3)
  • packages/widget/src/domain/types/settings.ts
  • packages/widget/src/providers/settings/types.ts
  • README.md

📝 Walkthrough

Walkthrough

The PR removes the widget’s preferred transaction format setting, adds TON transaction normalization from decoded messages to raw entries, and updates the SK wallet TON signing path and tests to use the raw transaction flow.

Changes

TON raw transaction flow and settings cleanup

Layer / File(s) Summary
Settings prop cleanup
README.md, packages/widget/src/domain/types/settings.ts, packages/widget/src/providers/settings/types.ts
preferredTransactionFormat is removed from the documented widget options and from the settings type exports and props.
TON raw normalization
packages/widget/src/domain/types/transaction.ts
Adds TON relaxed-message imports, a raw transaction type, and normalizeTonTransactionToRaw for converting decoded TON messages into { address, amount, payload } entries.
SK wallet TON submission
packages/widget/src/providers/sk-wallet/index.tsx, packages/widget/tests/use-cases/sk-wallet.test.tsx
signTransaction normalizes decoded TON payloads before sending them, and the use-case tests build TON fixtures and verify decoded and raw TON transactions are forwarded correctly.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Suggested reviewers

  • jdomingos
  • dnehl

Poem

🐇 Hop hop! The TON bytes twirl in a row,
raw transactions now know where to go.
Settings shed a format, light as air,
SK wallet binkies with careful care.
✨ Bunnies and base64: hooray!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description is too brief and does not follow the required Added/Changed template structure. Add separate ## Added and ## Changed sections and briefly describe TON raw normalization plus removal of the unused setting and type re-export.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: normalizing TON transactions for external providers.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/ton-tx-format

Comment @coderabbitai help to get the list of available commands.

@aws-amplify-eu-central-1

Copy link
Copy Markdown

This pull request is automatically being deployed by Amplify Hosting (learn more).

Access this pull request here: https://pr-549.d2ribjy8evqo6h.amplifyapp.com

@aws-amplify-eu-central-1

Copy link
Copy Markdown

This pull request is automatically being deployed by Amplify Hosting (learn more).

Access this pull request here: https://pr-549.df4xyoi0xyeak.amplifyapp.com

@dnehl dnehl left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

looks good

@petar-omni petar-omni merged commit f8e9e51 into main Jun 25, 2026
8 checks passed
@petar-omni petar-omni deleted the feat/ton-tx-format branch June 25, 2026 07:37
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