Replace dead legacy-bot status check with a real per-amount reserve check

BridgeViewModel's wUSDT->USDT gate called http://217.77.6.126:3030/status -
the legacy single-key bridge bot's endpoint. That service was stopped this
same session (see res/validators-tiki.md), so the check always threw,
always caught, and always reported "inactive" - the red warning reflected a
dead dependency, not real reserve state.

Replaced with a direct on-chain read of the multisig's actual USDT balance
on Polkadot Asset Hub (BridgeMultisigInteractor.getPolkadotUsdtReserve, via
a new Assets.Account storage query mirroring the existing Approvals one).
The gate is now per-request: a specific withdrawal is blocked only if it
exceeds the real reserve, not on a global on/off flag requiring full 1:1
parity between total circulating supply and total reserve - matching how
the Rust listener's own reserve-shortfall check already works. Re-checked
on every amount change, not just once per screen load.

bridge_wusdt_to_usdt_blocked now takes the available reserve amount as a
parameter; updated the English and Turkish strings. Left values-ku
untouched deliberately - not fabricating Kurdish translation text without
native review.
This commit is contained in:
2026-07-14 18:57:59 -07:00
parent 6d27949cbf
commit a8dc9add24
6 changed files with 69 additions and 35 deletions
+1 -1
View File
@@ -253,7 +253,7 @@ Sizin için en iyi seçeneği bulmak amacıyla tekliflerini karşılaştırın.<
<string name="bridge_enter_amount">Tutar girin</string>
<string name="bridge_hez_to_dot_warning">HEZ → DOT yönü manuel işlenir, 24 saate kadar sürebilir.</string>
<string name="bridge_hez_to_dot_blocked">HEZ → DOT yönü şu anda devre dışı.</string>
<string name="bridge_wusdt_to_usdt_blocked">USDT(Pez) → USDT(Pol) yönü şu anda devre dışı.</string>
<string name="bridge_wusdt_to_usdt_blocked">Bu tutar köprünün mevcut rezervini (%s USDT) aşıyor. Daha küçük bir tutar deneyin.</string>
<string name="wallet_asset_buy_sell">Al/Sat</string>
<string name="account_ledger_import_start_step_otg">Telefon ayarlarınızda %s</string>
<string name="account_ledger_import_start_step_otg_highlighted">OTG\'yi etkinleştir</string>
+1 -1
View File
@@ -364,7 +364,7 @@
<string name="bridge_insufficient_balance">Insufficient balance</string>
<string name="bridge_below_minimum">Amount below minimum</string>
<string name="bridge_enter_amount">Enter amount</string>
<string name="bridge_wusdt_to_usdt_blocked">USDT(Pez)→USDT(Pol) swaps are temporarily unavailable. Waiting for 1:1 liquidity to be established.</string>
<string name="bridge_wusdt_to_usdt_blocked">This amount exceeds the bridge\'s current available reserve (%s USDT). Try a smaller amount.</string>
<string name="bridge_sign_status_ok">Bridge allowance OK (%s)</string>
<string name="bridge_sign_button">Sign renewal (%s)</string>