From 360f3e7736e44711b1a2aa8f300919e8e38bff8a Mon Sep 17 00:00:00 2001 From: holgern <holgernahrstaedt@gmx.de> Date: Fri, 1 Mar 2019 12:06:35 +0100 Subject: [PATCH] Broadcast custom_json with active authority * custom_json with required_auths are now broadcasted with active key * json field in custom_json is broadcasted compact (spaces are removed) --- beem/steem.py | 5 ++++- beembase/operations.py | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/beem/steem.py b/beem/steem.py index a41db94a..92e81e1c 100644 --- a/beem/steem.py +++ b/beem/steem.py @@ -1604,7 +1604,10 @@ class Steem(object): "id": id, "prefix": self.prefix, }) - return self.finalizeOp(op, account, "posting", **kwargs) + if len(required_auths) > 0: + return self.finalizeOp(op, account, "active", **kwargs) + else: + return self.finalizeOp(op, account, "posting", **kwargs) def post(self, title, diff --git a/beembase/operations.py b/beembase/operations.py index 89dcb2ab..7965f0b6 100644 --- a/beembase/operations.py +++ b/beembase/operations.py @@ -394,7 +394,7 @@ class Custom_json(GrapheneObject): kwargs = args[0] if "json" in kwargs and kwargs["json"]: if (isinstance(kwargs["json"], dict) or isinstance(kwargs["json"], list)): - js = json.dumps(kwargs["json"]) + js = json.dumps(kwargs["json"], separators=(',',':')) else: js = kwargs["json"] -- GitLab