Skip to content
Snippets Groups Projects
Commit 81ec516a authored by Holger's avatar Holger
Browse files

Release 0.22.7

* Fix HIVE/HBD symbols in operations
parent 08b730f2
No related branches found
No related tags found
2 merge requests!5Taken current version of master branch in the https://github.com/holgern/beem,!4Original changes pushed to master at https://github.com/holgern/beem
Changelog
=========
0.22.7
------
* Fix HIVE/HBD symbols in operations
0.22.6
------
* Add hive_btc_ticker and hive_usd_ticker
......
......@@ -212,12 +212,6 @@ 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,
symbol,
......
"""THIS FILE IS GENERATED FROM beem SETUP.PY."""
version = '0.22.6'
version = '0.22.7'
"""THIS FILE IS GENERATED FROM beem SETUP.PY."""
version = '0.22.6'
version = '0.22.7'
......@@ -82,6 +82,11 @@ class Amount(object):
else:
self.amount = d.amount
self.symbol = d.symbol
# Workaround to allow transfers in HIVE
if self.symbol == "HBD":
self.symbol = "SBD"
elif self.symbol == "HIVE":
self.symbol = "STEEM"
self.asset = d.asset["asset"]
self.precision = d.asset["precision"]
self.amount = round(float(self.amount) * 10 ** self.precision)
......@@ -91,6 +96,11 @@ class Amount(object):
def __bytes__(self):
# padding
# Workaround to allow transfers in HIVE
if self.symbol == "HBD":
self.symbol = "SBD"
elif self.symbol == "HIVE":
self.symbol = "STEEM"
symbol = self.symbol + "\x00" * (7 - len(self.symbol))
return (struct.pack("<q", int(self.amount)) + struct.pack("<b", self.precision) +
py23_bytes(symbol, "ascii"))
......
"""THIS FILE IS GENERATED FROM beem SETUP.PY."""
version = '0.22.6'
version = '0.22.7'
"""THIS FILE IS GENERATED FROM beem SETUP.PY."""
version = '0.22.6'
version = '0.22.7'
......@@ -16,7 +16,7 @@ except LookupError:
ascii = codecs.lookup('ascii')
codecs.register(lambda name, enc=ascii: {True: enc}.get(name == 'mbcs'))
VERSION = '0.22.6'
VERSION = '0.22.7'
tests_require = ['mock >= 2.0.0', 'pytest', 'pytest-mock', 'parameterized']
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment