mirror of
https://github.com/pezkuwichain/pezkuwi-wallet-android.git
synced 2026-07-22 13:45:48 +00:00
7401783436
The Bridge screen let a user type any amount and enabled the Swap button regardless of what they actually held, unlike the Swap screen which shows a live "Max: X" and disables on overflow. The confirm-step ValidationSystem would still catch it before signing, but only after routing through Send - no immediate feedback on the Bridge screen itself. Wires WalletInteractor.assetFlow(chainId, assetId) to the currently selected origin side (re-subscribed on every direction/pair change), tracking Asset.transferable - the same field the real transfer validation checks. Reuses the existing MaxAmountView/MaxAvailableView widget the Swap screen already uses for the "Max: X" display, and adds a matching error-bordered state to BridgeAssetInputView. The "Insufficient balance" string (bridge_insufficient_balance) was already translated into every locale but never wired to any code.