Add real deposit-wait progress to Bridge screen, reusing the swap timer UX

Tapping Swap on the Bridge screen previously gave zero feedback afterward -
the same countdown/success UX already used for swap execution didn't exist
here, so a user had no way to tell whether anything was happening. Moved
ExecutionTimerView (+ its layout) from feature-swap-impl to common, since it
was already fully self-contained (no swap-specific coupling, all its
resources already lived in common) - both features now share the one
component instead of duplicating it.

Wired into BridgeViewModel: after a swap is submitted, actively observe the
destination balance (walletInteractor.assetFlow) for a real increase within
a bounded window, showing the countdown while watching and Success only on
a confirmed balance delta - never a cosmetic timer that "completes"
regardless of whether funds arrived. If the window elapses without
confirmation, it says so plainly (may need manual 3-of-5 review) rather than
showing a false success or a false error.
This commit is contained in:
2026-07-15 06:10:41 -07:00
parent a5454b38f0
commit b51e2ecf58
8 changed files with 134 additions and 15 deletions
@@ -190,6 +190,28 @@
android:text="@string/bridge_sign_button"
android:visibility="gone" />
<!-- Deposit-wait progress: shown after tapping Swap, while we actively watch the
destination balance for a real confirmed increase - not a cosmetic timer that
completes regardless of whether funds actually arrived. Same reusable component
already used for swap execution (common.view.ExecutionTimerView). -->
<TextView
android:id="@+id/bridgeDepositWaitLabel"
style="@style/TextAppearance.NovaFoundation.Regular.Footnote"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="24dp"
android:gravity="center"
android:text="@string/bridge_deposit_wait_label"
android:textColor="@color/text_secondary"
android:visibility="gone" />
<io.novafoundation.nova.common.view.ExecutionTimerView
android:id="@+id/bridgeExecutionTimer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:visibility="gone" />
</LinearLayout>
</ScrollView>