Skip to content

fix: Reset bridging state and amount after bridge operations and adju…#255

Open
EmekaManuel wants to merge 3 commits intoGoodDollar:masterfrom
EmekaManuel:ui-fix-micro-bridge
Open

fix: Reset bridging state and amount after bridge operations and adju…#255
EmekaManuel wants to merge 3 commits intoGoodDollar:masterfrom
EmekaManuel:ui-fix-micro-bridge

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
@L03TJ3 L03TJ3 self-requested a review January 26, 2026 09:52
@L03TJ3
Copy link
Collaborator

L03TJ3 commented Jan 26, 2026

Hey, its better if you provide screenshots of the results of your fixes.
because testing it, I don't see the fee being fixed? have you tested it?
image

@L03TJ3
Copy link
Collaborator

L03TJ3 commented Feb 3, 2026

@EmekaManuel hey, verifying if the latest comments are being worked on?

@EmekaManuel
Copy link
Author

yes please

@sirpy
Copy link
Contributor

sirpy commented Feb 11, 2026

@EmekaManuel please provide video showing the bugs were fixed

@sirpy
Copy link
Contributor

sirpy commented Feb 19, 2026

@EmekaManuel waiting for your reply

@sirpy sirpy self-requested a review February 19, 2026 14:58
Copy link
Contributor

@sirpy sirpy left a comment

Choose a reason for hiding this comment

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

add a video please

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

3 participants