Closed richard-kovachev-axway closed 2 years ago
Hello guys im currently working on a project and i found an issue with Notify when FillOrder is sent
See here: https://github.com/bitshares/python-bitshares/blob/1946721d429fedaa3ddd96fab7b9348d2ba8cf4e/bitshares/price.py#L245-L246
And when we go to Price in Graphenelib common price
https://github.com/xeroc/python-graphenelib/blob/ba3702a25498f56a8ade8b855b812e7ec00311e2/graphenecommon/price.py#L122-L131
if args[0]["receives"]["asset_id"] == base_asset["id"]: you will see that it always will be of type sell because base asset is receives in both cases
if args[0]["receives"]["asset_id"] == base_asset["id"]:
my solution is to check is_maker to reverse the type:
if order['is_maker']: base_asset = kwargs.get("base_asset", order["pays"]["asset_id"]) else: base_asset = kwargs.get("base_asset", order["receives"]["asset_id"])
could, could you send a pullrequest, please?
Hello guys im currently working on a project and i found an issue with Notify when FillOrder is sent
See here: https://github.com/bitshares/python-bitshares/blob/1946721d429fedaa3ddd96fab7b9348d2ba8cf4e/bitshares/price.py#L245-L246
And when we go to Price in Graphenelib common price
https://github.com/xeroc/python-graphenelib/blob/ba3702a25498f56a8ade8b855b812e7ec00311e2/graphenecommon/price.py#L122-L131
if args[0]["receives"]["asset_id"] == base_asset["id"]:
you will see that it always will be of type sell because base asset is receives in both casesmy solution is to check is_maker to reverse the type: