Skip to content

feat: implement staking#59

Open
nikdim03 wants to merge 15 commits intomainfrom
feature/ton-636-staking
Open

feat: implement staking#59
nikdim03 wants to merge 15 commits intomainfrom
feature/ton-636-staking

Conversation

@nikdim03
Copy link
Copy Markdown
Contributor

@nikdim03 nikdim03 commented Apr 7, 2026

No description provided.

val result = rpcClient.call(BridgeMethodConstants.METHOD_SEND_TRANSACTION, json.toJSONObject(request))
return result.getString(ResponseConstants.KEY_SIGNED_BOC)
return when {
result.has(ResponseConstants.KEY_SIGNED_BOC) -> result.getString(ResponseConstants.KEY_SIGNED_BOC)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

From other PR?

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.

These aren't arbitrary changes, they fix real pre-existing bugs in main.

transactions.ts calls wallet(walletId, 'sendTransaction', args.transactionContent) where transactionContent is a TransactionRequest object. On main, Kotlin serialized transactionContent: String as a JSON string literal, so the bridge received {"transactionContent": "{...}"}, a double-encoded string inside JSON instead of an inline object, and the JS side received a string it couldn't treat as a transaction request. parseTransactionContent() fixes this by parsing the string into a JsonElement so it serializes as a proper inline JSON object that the bridge can work with.

The signedBoc/boc fallback is needed because staking transaction flows return { boc: ... } rather than { signedBoc: ... }. Without the fallback, those flows would crash with a missing key even though the transaction succeeded.

Both bugs were always present in main.

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