Initialise inverted variable in currency conversion

This commit is contained in:
2022-11-11 07:20:00 +00:00
parent 67404fc161
commit 9fc5d2f4d7

View File

@@ -52,6 +52,8 @@ def to_currency(direction, account, amount, from_currency, to_currency):
:param to_currency: Currency to convert to :param to_currency: Currency to convert to
:return: Converted amount :return: Converted amount
""" """
inverted = False
# This is needed because OANDA has different values for bid and ask # This is needed because OANDA has different values for bid and ask
if direction == "buy": if direction == "buy":
price_index = "bids" price_index = "bids"