From 1a9fdab3ad605cc12b622fa8a23873efd4e57098 Mon Sep 17 00:00:00 2001 From: overcat <4catcode@gmail.com> Date: Sat, 17 Dec 2022 22:28:22 +0800 Subject: [PATCH] refactor: SEP-0011, removed comments on SetOptions.clearFlags and SetOptions.setFlags. This is a compromise. https://github.com/python/cpython/issues/94763 --- stellar_sdk/sep/txrep.py | 6 +----- tests/sep/txrep_data/test_to_txrep_full_tx.txt | 4 ++-- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/stellar_sdk/sep/txrep.py b/stellar_sdk/sep/txrep.py index bd6b0524..9ffdf0cf 100644 --- a/stellar_sdk/sep/txrep.py +++ b/stellar_sdk/sep/txrep.py @@ -1392,13 +1392,9 @@ def add_claim_predicate(prefix: str, claimant_predicate: ClaimPredicate): "clearFlags", operation.clear_flags.value if operation.clear_flags else None, True, - comment=operation.clear_flags, ) add_body_line( - "setFlags", - operation.set_flags.value if operation.set_flags else None, - True, - comment=operation.set_flags, + "setFlags", operation.set_flags.value if operation.set_flags else None, True ) add_body_line("masterWeight", operation.master_weight, True) add_body_line("lowThreshold", operation.low_threshold, True) diff --git a/tests/sep/txrep_data/test_to_txrep_full_tx.txt b/tests/sep/txrep_data/test_to_txrep_full_tx.txt index 16b0ff78..85476127 100644 --- a/tests/sep/txrep_data/test_to_txrep_full_tx.txt +++ b/tests/sep/txrep_data/test_to_txrep_full_tx.txt @@ -49,9 +49,9 @@ tx.operations[4].body.type: SET_OPTIONS tx.operations[4].body.setOptionsOp.inflationDest._present: true tx.operations[4].body.setOptionsOp.inflationDest: GCVAZXCGX3HLHZ6P5WKEPE3U2YJMTLMPTZJFGY67MTNPSOA4COKVJ6AF tx.operations[4].body.setOptionsOp.clearFlags._present: true -tx.operations[4].body.setOptionsOp.clearFlags: 3 (AuthorizationFlag.AUTHORIZATION_REVOCABLE|AUTHORIZATION_REQUIRED) +tx.operations[4].body.setOptionsOp.clearFlags: 3 tx.operations[4].body.setOptionsOp.setFlags._present: true -tx.operations[4].body.setOptionsOp.setFlags: 3 (AuthorizationFlag.AUTHORIZATION_REVOCABLE|AUTHORIZATION_REQUIRED) +tx.operations[4].body.setOptionsOp.setFlags: 3 tx.operations[4].body.setOptionsOp.masterWeight._present: true tx.operations[4].body.setOptionsOp.masterWeight: 255 tx.operations[4].body.setOptionsOp.lowThreshold._present: true