mirror of
https://github.com/Redume/Shirino.git
synced 2024-12-24 01:03:46 +03:00
Происходило доп. умножение ddg при 3 аргументах, а нужно было умножать только при coniapi
This commit is contained in:
parent
6f364be57f
commit
36bd104438
1 changed files with 2 additions and 2 deletions
4
main.py
4
main.py
|
@ -131,7 +131,7 @@ class CurrencyConverter:
|
|||
)
|
||||
|
||||
data: Dict[str, Any] = resp.json()
|
||||
self.conv_amount = float(data.get('rate', 0))
|
||||
self.conv_amount = float(data.get('rate', 0)*self.amount)
|
||||
|
||||
|
||||
@dp.inline_handler()
|
||||
|
@ -161,7 +161,7 @@ async def currency(inline_query: InlineQuery) -> None:
|
|||
|
||||
result = (
|
||||
f'{conv.amount} {conv.from_currency} = '
|
||||
f'{math.floor(conv.conv_amount*conv.amount)} {conv.conv_currency}'
|
||||
f'{math.floor(conv.conv_amount)} {conv.conv_currency}'
|
||||
)
|
||||
|
||||
except Exception as ex:
|
||||
|
|
Loading…
Add table
Reference in a new issue