Initialise inverted variable in currency conversion
This commit is contained in:
parent
67404fc161
commit
9fc5d2f4d7
|
@ -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"
|
||||||
|
|
Loading…
Reference in New Issue