Skip to content

Commit 71f391b

Browse files
authored
Merge pull request bitshares#147 from bitfag/fix-order-invert-repr
Adjust "for_sale" when invert()-ing an Order
2 parents 5924ac1 + 357aa63 commit 71f391b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

bitshares/price.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,8 @@ def invert(self):
218218
tmp = self["quote"]
219219
self["quote"] = self["base"]
220220
self["base"] = tmp
221+
if "for_sale" in self and self["for_sale"]:
222+
self["for_sale"] = Amount(self["for_sale"]['amount'] * self["price"], self["base"]["symbol"])
221223
return self
222224

223225
def json(self):

0 commit comments

Comments
 (0)