From 1ad6cf379adaba22de78f8cfa4558f6d14cd784a Mon Sep 17 00:00:00 2001 From: Dobromir Popov Date: Mon, 21 Oct 2024 14:53:38 +0300 Subject: [PATCH] fix --- crypto/sol/app.py | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/crypto/sol/app.py b/crypto/sol/app.py index 42c1e69..a33ccd2 100644 --- a/crypto/sol/app.py +++ b/crypto/sol/app.py @@ -39,12 +39,9 @@ import requests import re from typing import List, Dict, Any, Tuple import random +import time from threading import Thread - -from modules.webui import init_app -from modules.storage import init_db, store_transaction - app = Flask(__name__) # config = load_config() @@ -768,15 +765,13 @@ async def follow_move(move): return amount_to_swap = min(amount_to_swap, your_balance) # Ensure we're not trying to swap more than we have - - amount = int(amount) - logging.debug(f"Calculated amount in lamports: {amount}") decimals = token_info.get('decimals') # Convert to lamports # if decimals is 6, then amount = amount * 1e6; if 9, then amount = amount * 1e9 amount = int(amount_to_swap * 10**decimals) - + amount = int(amount) + logging.debug(f"Calculated amount in lamports: {amount}") if your_balance < amount_to_swap: # should not happen msg = (