Skip to content

Commit 9902edf

Browse files
v3.0.5
Signed-off-by: Dinger <quantdinger@gmail.com>
1 parent a213026 commit 9902edf

13 files changed

Lines changed: 1034 additions & 132 deletions

backend_api_python/app/routes/settings.py

Lines changed: 52 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,11 @@ def _refresh_runtime_services() -> None:
106106
'REFLECTION_WORKER_INTERVAL_SEC', 'REFLECTION_MIN_AGE_DAYS', 'REFLECTION_VALIDATE_LIMIT',
107107
'AI_CALIBRATION_MARKETS', 'AI_CALIBRATION_LOOKBACK_DAYS', 'AI_CALIBRATION_MIN_SAMPLES',
108108
# USDT pay internals
109-
'USDT_PAY_CHAIN', 'USDT_TRC20_CONTRACT', 'TRONGRID_BASE_URL',
109+
'USDT_TRC20_CONTRACT', 'USDT_BEP20_CONTRACT', 'USDT_ERC20_CONTRACT', 'USDT_SOL_MINT',
110+
'TRONGRID_BASE_URL', 'ETHERSCAN_V2_BASE_URL', 'BSC_RPC_URLS', 'ETH_RPC_URLS',
111+
'SOLANA_RPC_URL', 'BEP20_PREFER_EXPLORER', 'ERC20_PREFER_EXPLORER',
110112
'USDT_PAY_CONFIRM_SECONDS', 'USDT_PAY_EXPIRE_MINUTES',
113+
'USDT_AMOUNT_SUFFIX_DECIMALS', 'USDT_WORKER_POLL_INTERVAL',
111114
# Adanos sentiment
112115
'ADANOS_SENTIMENT_SOURCE', 'ADANOS_API_BASE_URL',
113116
# Brand internals
@@ -1216,63 +1219,88 @@ def _refresh_runtime_services() -> None:
12161219
'description': 'Credits granted every 30 days for lifetime members'
12171220
},
12181221

1219-
# ===== USDT Pay (方案B:每单独立地址) =====
1222+
# ===== USDT Pay (v3.0.6+: one fixed address per chain + amount-suffix matching) =====
1223+
# Model: each chain has a single receiving address. Orders are
1224+
# disambiguated by a unique amount suffix in the low decimals
1225+
# (e.g. 19.991234 USDT, where .001234 is the order tag), so funds
1226+
# land directly in the operator wallet without per-order HD
1227+
# derivation or batched consolidation.
12201228
{
12211229
'key': 'USDT_PAY_ENABLED',
12221230
'label': 'Enable USDT Pay',
12231231
'type': 'boolean',
12241232
'default': 'False',
1225-
'description': 'Enable USDT scan-to-pay flow (per-order unique address)'
1233+
'description': 'Master switch for USDT scan-to-pay checkout (multi-chain, single address + amount-suffix matching).'
12261234
},
12271235
{
1228-
'key': 'USDT_PAY_CHAIN',
1229-
'label': 'USDT Chain',
1230-
'type': 'select',
1231-
'default': 'TRC20',
1232-
'options': ['TRC20'],
1233-
'description': 'Currently only TRC20 is supported'
1236+
'key': 'USDT_PAY_ENABLED_CHAINS',
1237+
'label': 'Enabled Chains',
1238+
'type': 'text',
1239+
'default': 'TRC20,BEP20,ERC20,SOL',
1240+
'description': 'Comma-separated chain whitelist. Any code not in this list is rejected at order creation. Valid codes: TRC20 / BEP20 / ERC20 / SOL.'
12341241
},
12351242
{
1236-
'key': 'USDT_TRC20_XPUB',
1237-
'label': 'TRC20 XPUB (Watch-only)',
1238-
'type': 'password',
1243+
'key': 'USDT_TRC20_ADDRESS',
1244+
'label': 'TRC20 Receiving Address',
1245+
'type': 'text',
12391246
'required': False,
1240-
'description': 'Watch-only xpub used to derive per-order deposit addresses. Do NOT paste private key.'
1247+
'description': 'Your TRON wallet address (starts with T...). Leave blank to hide TRC20 from the chain picker.'
12411248
},
12421249
{
1243-
'key': 'USDT_TRC20_CONTRACT',
1244-
'label': 'USDT TRC20 Contract',
1250+
'key': 'USDT_BEP20_ADDRESS',
1251+
'label': 'BEP20 Receiving Address',
12451252
'type': 'text',
1246-
'default': 'TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t',
1247-
'description': 'USDT contract address on TRON'
1253+
'required': False,
1254+
'description': 'Your BSC wallet address (0x...). Reconciliation runs on public BSC RPC by default — no API key needed.'
1255+
},
1256+
{
1257+
'key': 'USDT_ERC20_ADDRESS',
1258+
'label': 'ERC20 Receiving Address',
1259+
'type': 'text',
1260+
'required': False,
1261+
'description': 'Your Ethereum wallet address (0x...). Reconciliation prefers Etherscan V2 (free plan covers ETH), with public Ethereum RPC fallback.'
12481262
},
12491263
{
1250-
'key': 'TRONGRID_BASE_URL',
1251-
'label': 'TronGrid Base URL',
1264+
'key': 'USDT_SOL_ADDRESS',
1265+
'label': 'Solana Receiving Address',
12521266
'type': 'text',
1253-
'default': 'https://api.trongrid.io',
1254-
'description': 'TronGrid API base URL'
1267+
'required': False,
1268+
'description': 'Your Solana wallet address (base58). The SPL USDT mint ATA is derived on-chain by the sender wallet.'
12551269
},
12561270
{
12571271
'key': 'TRONGRID_API_KEY',
12581272
'label': 'TronGrid API Key',
12591273
'type': 'password',
12601274
'required': False,
1261-
'description': 'Optional TronGrid API key for higher rate limits'
1275+
'description': 'Optional. Higher TronGrid rate-limit / stability for TRC20 reconciliation. Get one at https://www.trongrid.io.'
1276+
},
1277+
{
1278+
'key': 'ETHERSCAN_API_KEY',
1279+
'label': 'Etherscan API Key',
1280+
'type': 'password',
1281+
'required': False,
1282+
'description': 'Optional. Used for ERC20 reconciliation via Etherscan V2 (free plan covers Ethereum mainnet). BEP20 ignores this — it uses public BSC RPC. Get a key at https://etherscan.io/myapikey.'
12621283
},
12631284
{
12641285
'key': 'USDT_PAY_CONFIRM_SECONDS',
12651286
'label': 'Confirm Delay (sec)',
12661287
'type': 'number',
12671288
'default': '30',
1268-
'description': 'Delay before marking a paid transaction as confirmed (TRC20)'
1289+
'description': 'Seconds to wait after detecting a transfer before marking the order confirmed and activating the membership.'
12691290
},
12701291
{
12711292
'key': 'USDT_PAY_EXPIRE_MINUTES',
12721293
'label': 'Order Expire (min)',
12731294
'type': 'number',
12741295
'default': '30',
1275-
'description': 'USDT payment order expiration time in minutes'
1296+
'description': 'Minutes a pending USDT order stays open before expiring. Users can re-open the modal to generate a fresh amount suffix.'
1297+
},
1298+
{
1299+
'key': 'USDT_WORKER_POLL_INTERVAL',
1300+
'label': 'Worker Poll Interval (sec)',
1301+
'type': 'number',
1302+
'default': '30',
1303+
'description': 'How often the background worker re-scans pending/paid orders against on-chain data.'
12761304
},
12771305
{
12781306
'key': 'BILLING_COST_AI_ANALYSIS',

0 commit comments

Comments
 (0)