Skip to content

Conversation

@EmekaManuel
Copy link

Bug: Fix Microbridge UI/UX Issues

#251

Description

This PR fixes two UI/UX bugs in the microbridge flow that were preventing users from creating multiple bridge transactions and causing visual inconsistency in the transaction history.

Issues Fixed

  1. isBridging State Not Resetting: After creating a bridge request, users were unable to create another transaction because the isBridging state was never reset, blocking the UI even after the transaction completed successfully or failed.

  2. Oversized Fees Font: The "Fees:" label in the microbridge transaction history had an unnecessarily bold font weight (fontWeight="700") that didn't match the rest of the design, creating visual inconsistency.

Changes Made

1. MicroBridge.tsx

  • Added setBridging(false) in both success and failure cases to reset the bridging state
  • Added setBridgeAmount("0") on success to clear the input field for the next transaction
  • Updated the useEffect dependency array to include setBridgeAmount

Impact: Users can now immediately create another bridge request after a transaction completes, without being blocked by the UI state.

2. MicroBridgeController.tsx

  • Removed fontWeight="700" from the "Fees:" label in the HistoryRowItem component
  • The label now uses the same variant="xs-grey" styling as other transaction details

Impact: Consistent font styling across all transaction history elements, improving visual hierarchy and readability.

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey there - I've reviewed your changes - here's some feedback:

  • In the useEffect where you added setBridgeAmount to the dependency array, consider also adding setBridging for consistency with how state setters are treated and to avoid future confusion or lint discrepancies.
  • Resetting the bridge amount to the string "0" on success might be interpreted by the UI as an explicit numeric value rather than an empty/default state; consider whether an empty string or null would better reflect a cleared input from a UX and validation perspective.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- In the `useEffect` where you added `setBridgeAmount` to the dependency array, consider also adding `setBridging` for consistency with how state setters are treated and to avoid future confusion or lint discrepancies.
- Resetting the bridge amount to the string "0" on success might be interpreted by the UI as an explicit numeric value rather than an empty/default state; consider whether an empty string or `null` would better reflect a cleared input from a UX and validation perspective.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@EmekaManuel
Copy link
Author

hi @L03TJ3 , kindly review

@L03TJ3 L03TJ3 linked an issue Dec 23, 2025 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Micro bridge: UI/UX bugs

1 participant