Normalize TRANSFER_CCY to uppercase so Gate wallet transfers do not fail.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-07-26 08:24:26 +08:00
parent eb175820e9
commit cb4f6aaa4b
4 changed files with 5 additions and 4 deletions
+2 -1
View File
@@ -22,6 +22,7 @@ def execute_transfer_usdt(
) -> tuple[bool, str, Any]:
if amount <= 0:
return False, "划转金额必须大于0", None
ccy = (transfer_ccy or "USDT").strip().upper() or "USDT"
ok_live, reason = ensure_live_ready()
if not ok_live:
return False, reason, None
@@ -31,7 +32,7 @@ def execute_transfer_usdt(
except Exception:
pass
try:
resp = exchange.transfer(transfer_ccy, float(amount), from_account, to_account)
resp = exchange.transfer(ccy, float(amount), from_account, to_account)
return True, "划转成功", resp
except Exception as e:
msg = str(e)