Initialise inverted variable in currency conversion

This commit is contained in:
Mark Veidemanis 2022-11-11 07:20:00 +00:00
parent 67404fc161
commit 9fc5d2f4d7
Signed by: m
GPG Key ID: 5ACFCEED46C0904F
1 changed files with 2 additions and 0 deletions

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"