From 6f364be57f6393b10e0b2932885949cdf445e88c Mon Sep 17 00:00:00 2001 From: Redume Date: Tue, 30 May 2023 20:35:16 +0300 Subject: [PATCH] I limited the characters after the floating point, now conv_amount is multiplied by amount --- main.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main.py b/main.py index 8a799f2..4bacd22 100644 --- a/main.py +++ b/main.py @@ -7,6 +7,7 @@ import logging from typing import Any, Dict, List, Optional import requests +import math from pydantic import BaseSettings @@ -160,7 +161,7 @@ async def currency(inline_query: InlineQuery) -> None: result = ( f'{conv.amount} {conv.from_currency} = ' - f'{conv.conv_amount} {conv.conv_currency}' + f'{math.floor(conv.conv_amount*conv.amount)} {conv.conv_currency}' ) except Exception as ex: