chore: Refactor TokenDissociateTransaction protobuf body creation#2454
Conversation
… error Signed-off-by: Manish Dait <daitmanish88@gmail.com>
Signed-off-by: Manish Dait <daitmanish88@gmail.com>
Signed-off-by: Manish Dait <daitmanish88@gmail.com>
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## main #2454 +/- ##
==========================================
+ Coverage 95.00% 95.01% +0.01%
==========================================
Files 164 164
Lines 10461 10464 +3
==========================================
+ Hits 9938 9942 +4
+ Misses 523 522 -1 🚀 New features to boost your workflow:
|
WalkthroughToken dissociation protobuf construction now conditionally includes account and token fields, filters null token identifiers, and supports omitted inputs. Unit and integration tests cover field serialization, successful execution, and missing-account precheck failure. ChangesToken dissociation handling
Estimated code review effort: 3 (Moderate) | ~20 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: e603a48d-a85d-4960-99c5-856acd31bfb9
📒 Files selected for processing (3)
src/hiero_sdk_python/tokens/token_dissociate_transaction.pytests/integration/token_dissociate_transaction_e2e_test.pytests/unit/token_dissociate_transaction_test.py
Description:
This PR refactors
_build_proto_body()inTokenDissociateTransactionto avoid raising aValueErrorwhenaccount_idortoken_idsare not set. This aligns the behavior of the other SDKs and fixes the TCK testChanges Made:
account_idortoken_idsis NoneFixes #2453
Notes for reviewer:
Expected behavior (to match with the other SDKs):
account_idis provided andtoken_idsis skip, the transaction should execute successfully.account_idis skip, the transaction should fail with aPrecheckErrorrather than raisingValueError.Checklist