From 08a7c3b33bbc7ea013be979323290e91a679732c Mon Sep 17 00:00:00 2001 From: holgern <holgernahrstaedt@gmx.de> Date: Tue, 24 Mar 2020 11:18:06 +0100 Subject: [PATCH] Release 0.22.5 * Add workaround to allow transfers of HIVE/HBD in HIVE (opertion need to use STEEM/SBD internally) --- CHANGELOG.rst | 4 ++++ beem/amount.py | 9 ++++++++- beem/cli.py | 6 +++--- beem/version.py | 2 +- beemapi/version.py | 2 +- beembase/version.py | 2 +- beemgraphenebase/version.py | 2 +- setup.py | 2 +- 8 files changed, 20 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 4da27b60..e97c69c7 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -1,5 +1,9 @@ Changelog ========= +0.22.5 +------ +* Add workaround to allow transfers of HIVE/HBD in HIVE (operation need to use STEEM/SBD internally) + 0.22.4 ------ * fix AttributeError: 'PointJacobi' object has no attribute '_Point__x' diff --git a/beem/amount.py b/beem/amount.py index b596041a..7161043d 100644 --- a/beem/amount.py +++ b/beem/amount.py @@ -211,9 +211,16 @@ class Amount(dict): def __str__(self): amount = quantize(self["amount"], self["asset"]["precision"]) + symbol = self["symbol"] + if self.steem.is_hive: + # Workaround to allow transfers in HIVE + if symbol == "HBD": + symbol = "SBD" + elif symbol == "HIVE": + symbol = "STEEM" return "{:.{prec}f} {}".format( amount, - self["symbol"], + symbol, prec=self["asset"]["precision"] ) diff --git a/beem/cli.py b/beem/cli.py index 281d8b13..fac21de4 100644 --- a/beem/cli.py +++ b/beem/cli.py @@ -86,8 +86,8 @@ def prompt_callback(ctx, param, value): def asset_callback(ctx, param, value): - if value not in ["STEEM", "SBD"]: - print("Please STEEM or SBD as asset!") + if value not in ["STEEM", "SBD", "HIVE", "HBD"]: + print("Please STEEM/HIVE or SBD/HBD as asset!") ctx.abort() else: return value @@ -829,7 +829,7 @@ def downvote(post, account, weight): @click.argument('memo', nargs=1, required=False) @click.option('--account', '-a', help='Transfer from this account') def transfer(to, amount, asset, memo, account): - """Transfer SBD/STEEM""" + """Transfer SBD/HD STEEM/HIVE""" stm = shared_steem_instance() if stm.rpc is not None: stm.rpc.rpcconnect() diff --git a/beem/version.py b/beem/version.py index a133bcab..f978e841 100644 --- a/beem/version.py +++ b/beem/version.py @@ -1,2 +1,2 @@ """THIS FILE IS GENERATED FROM beem SETUP.PY.""" -version = '0.22.3' +version = '0.22.5' diff --git a/beemapi/version.py b/beemapi/version.py index a133bcab..f978e841 100644 --- a/beemapi/version.py +++ b/beemapi/version.py @@ -1,2 +1,2 @@ """THIS FILE IS GENERATED FROM beem SETUP.PY.""" -version = '0.22.3' +version = '0.22.5' diff --git a/beembase/version.py b/beembase/version.py index a133bcab..f978e841 100644 --- a/beembase/version.py +++ b/beembase/version.py @@ -1,2 +1,2 @@ """THIS FILE IS GENERATED FROM beem SETUP.PY.""" -version = '0.22.3' +version = '0.22.5' diff --git a/beemgraphenebase/version.py b/beemgraphenebase/version.py index a133bcab..f978e841 100644 --- a/beemgraphenebase/version.py +++ b/beemgraphenebase/version.py @@ -1,2 +1,2 @@ """THIS FILE IS GENERATED FROM beem SETUP.PY.""" -version = '0.22.3' +version = '0.22.5' diff --git a/setup.py b/setup.py index 25d34db5..f13ea5ac 100755 --- a/setup.py +++ b/setup.py @@ -16,7 +16,7 @@ except LookupError: ascii = codecs.lookup('ascii') codecs.register(lambda name, enc=ascii: {True: enc}.get(name == 'mbcs')) -VERSION = '0.22.4' +VERSION = '0.22.5' tests_require = ['mock >= 2.0.0', 'pytest', 'pytest-mock', 'parameterized'] -- GitLab