From 36bd104438849402301896a3528400fccfb1d426 Mon Sep 17 00:00:00 2001 From: Redume Date: Thu, 1 Jun 2023 13:04:26 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9F=D1=80=D0=BE=D0=B8=D1=81=D1=85=D0=BE?= =?UTF-8?q?=D0=B4=D0=B8=D0=BB=D0=BE=20=D0=B4=D0=BE=D0=BF.=20=D1=83=D0=BC?= =?UTF-8?q?=D0=BD=D0=BE=D0=B6=D0=B5=D0=BD=D0=B8=D0=B5=20ddg=20=D0=BF=D1=80?= =?UTF-8?q?=D0=B8=203=20=D0=B0=D1=80=D0=B3=D1=83=D0=BC=D0=B5=D0=BD=D1=82?= =?UTF-8?q?=D0=B0=D1=85,=20=D0=B0=20=D0=BD=D1=83=D0=B6=D0=BD=D0=BE=20?= =?UTF-8?q?=D0=B1=D1=8B=D0=BB=D0=BE=20=D1=83=D0=BC=D0=BD=D0=BE=D0=B6=D0=B0?= =?UTF-8?q?=D1=82=D1=8C=20=D1=82=D0=BE=D0=BB=D1=8C=D0=BA=D0=BE=20=D0=BF?= =?UTF-8?q?=D1=80=D0=B8=20coniapi?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.py b/main.py index 4bacd22..ee7802e 100644 --- a/main.py +++ b/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: