Normalize TRANSFER_CCY to uppercase so Gate wallet transfers do not fail.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user