fix(binance): Remove token order types and associated tests#4746
Open
sergei-boiko-trustwallet wants to merge 3 commits intomasterfrom
Open
fix(binance): Remove token order types and associated tests#4746sergei-boiko-trustwallet wants to merge 3 commits intomasterfrom
sergei-boiko-trustwallet wants to merge 3 commits intomasterfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR removes Binance Beacon Chain token-management order support (freeze/unfreeze/issue/mint/burn) by deleting the Rust transaction message implementations and removing the associated Rust signing tests, and by dropping these order variants from the Binance SigningInput oneof.
Changes:
- Removed token-management order variants from
Binance.protoSigningInput.order_oneof. - Deleted the Rust
token_ordermessage module and removed corresponding enum variants/mapping. - Removed Rust tests that exercised signing of these token-management orders.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
src/proto/Binance.proto |
Removes token order variants from SigningInput.order_oneof to prevent these orders from being constructed via the main signing input. |
rust/tw_tests/tests/chains/binance/binance_sign.rs |
Deletes signing tests for the removed token-management orders. |
rust/chains/tw_binance/src/transaction/message/token_order.rs |
Removes the Rust message implementations for token freeze/unfreeze/issue/mint/burn. |
rust/chains/tw_binance/src/transaction/message/mod.rs |
Removes the token_order module and enum conversions/variants for the deleted token orders. |
Comments suppressed due to low confidence (1)
src/proto/Binance.proto:377
- The removed
order_oneofvariants (field numbers 11, 12, 17, 18, 19 and their names) are now free to be reused unintentionally in future changes. In protobuf, it’s safer to explicitlyreservedthe removed field numbers/names inSigningInputto prevent accidental wire-compatibility issues if those tags are reused later.
// Payload message
oneof order_oneof {
TradeOrder trade_order = 8;
CancelTradeOrder cancel_trade_order = 9;
SendOrder send_order = 10;
HTLTOrder htlt_order = 13;
DepositHTLTOrder depositHTLT_order = 14;
ClaimHTLOrder claimHTLT_order = 15;
RefundHTLTOrder refundHTLT_order = 16;
TransferOut transfer_out_order = 20;
SideChainDelegate side_delegate_order = 21;
SideChainRedelegate side_redelegate_order = 22;
SideChainUndelegate side_undelegate_order = 23;
TimeLockOrder time_lock_order = 24;
TimeRelockOrder time_relock_order = 25;
TimeUnlockOrder time_unlock_order = 26;
SideChainStakeMigration side_stake_migration_order = 27;
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Binary size comparison➡️ aarch64-apple-ios: - 14.36 MB
+ 14.30 MB -70 KB➡️ aarch64-apple-ios-sim: - 14.37 MB
+ 14.30 MB -70 KB➡️ aarch64-linux-android: - 18.81 MB
+ 18.71 MB -103 KB➡️ armv7-linux-androideabi: - 16.23 MB
+ 16.15 MB -85 KB➡️ wasm32-unknown-emscripten: - 13.72 MB
+ 13.64 MB -82 KB |
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.
This pull request removes support for Binance token management orders (freeze, unfreeze, issue, mint, and burn) from the codebase. The changes clean up both the implementation and the related tests and protocol definitions, ensuring that these token order types are no longer handled anywhere in the project.
Breaking Changes
Removed
TokenFreezeOrder,TokenUnfreezeOrder,TokenMintOrder,TokenBurnOrderBNB Beacon chain transaction types.