-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Fix: Add missing parameters in TON sendMessage function #5384
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…ppKit Core" This reverts commit 8f98836. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
|
|
@glitch-txs is attempting to deploy a commit to the Reown Team on Vercel. A member of the Team first needs to authorize it. |
|
Thank you for your contribution! We ask that you please read and sign our CTA Document before we can accept your contribution. You can sign the CTA simply by posting a Pull Request Comment with the following text: I have read the CTA Document and I hereby sign the CTA You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR fixes a bug in the TON adapter's sendMessage function where payload and stateInit parameters were being ignored when constructing messages. The fix ensures these optional parameters are properly included in the prepared transaction sent to TON wallets.
Key Changes:
- Added
payload,stateInit, andextraCurrencyas optional fields to the message type definition - Modified message construction to include these fields with proper base64 normalization
- Added comprehensive test coverage for all scenarios including edge cases
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
packages/appkit-utils/src/ton/TonTypesUtil.ts |
Extended SendMessageParams type to include optional payload, stateInit, and extraCurrency fields |
packages/adapters/ton/src/connectors/TonConnectConnector.ts |
Fixed message construction to use pre-built messages array that includes all fields instead of just address and amount |
packages/adapters/ton/tests/TonConnectConnector.test.ts |
Added comprehensive test suite covering payload/stateInit inclusion, normalization, edge cases, and error scenarios |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Description
This PR fixes the
sendMessagefunction inTonConnectConnectorto properly handle payload andstateInitparameters that were previously missing from the message construction.Type of change
Associated Issues
For Linear issues: Closes APKT-xxx
For GH issues: closes #5383
Showcase (Optional)
If there is a UI change include the screenshots with before and after state.
If new feature is being introduced, include the link to demo recording.
Checklist