Skip to content

🐛 app: fix bridge simulation falling back to default account#871

Open
dieguezguille wants to merge 1 commit intomainfrom
bridge
Open

🐛 app: fix bridge simulation falling back to default account#871
dieguezguille wants to merge 1 commit intomainfrom
bridge

Conversation

@dieguezguille
Copy link
Member

@dieguezguille dieguezguille commented Mar 6, 2026


Open with Devin

Summary by CodeRabbit

  • Bug Fixes
    • Fixed bridge simulation to correctly use the sender's account when previewing transfers, ensuring accurate transaction previews.

@dieguezguille dieguezguille self-assigned this Mar 6, 2026
@dieguezguille dieguezguille added the bug Something isn't working label Mar 6, 2026
@changeset-bot
Copy link

changeset-bot bot commented Mar 6, 2026

🦋 Changeset detected

Latest commit: 0a23104

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@coderabbitai
Copy link

coderabbitai bot commented Mar 6, 2026

Walkthrough

A patch release for the @exactly/mobile package documents a bug fix where bridge simulation now correctly falls back to the default account by adding account scoping to the simulation hook.

Changes

Cohort / File(s) Summary
Changeset Documentation
.changeset/gold-cow-eat.md
Added changelog entry for a patch release documenting the bridge simulation fallback bug fix.
Bridge Component
src/components/add-funds/Bridge.tsx
Added account: senderAddress parameter to the useSimulateContract config to properly scope the transfer simulation to the sender's address.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~5 minutes

Suggested reviewers

  • cruzdanilo
  • franm91
🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: fixing a bug where bridge simulation incorrectly falls back to the default account instead of using the sender's address.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch bridge

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 1 additional finding.

Open in Devin Review

@gemini-code-assist
Copy link

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request resolves a critical bug in the bridge transfer simulation logic. Previously, the simulation was not correctly utilizing the sender's address, leading to inaccurate or misleading simulation outcomes. By explicitly passing the senderAddress to the useSimulateContract hook, the system now accurately simulates transfers from the correct user account, enhancing reliability and user experience.

Highlights

  • Bridge Simulation Fix: Corrected an issue where the bridge transfer simulation would incorrectly default to a generic account instead of the intended sender's address, ensuring accurate simulation results.
Changelog
  • .changeset/gold-cow-eat.md
    • Added a changeset entry for a patch release, documenting the fix for the bridge simulation issue.
  • src/components/add-funds/Bridge.tsx
    • Updated the useSimulateContract hook to explicitly include the account parameter with senderAddress for accurate bridge transfer simulations.
Activity
  • No human activity has been recorded on this pull request since its creation.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request addresses a bug where the bridge simulation was falling back to the default account. The fix correctly passes the senderAddress to the account property of the useSimulateContract hook in src/components/add-funds/Bridge.tsx. This ensures that the transaction simulation is performed using the intended sender's account, making the behavior explicit and correct. A corresponding changeset has also been added.

@sentry
Copy link

sentry bot commented Mar 6, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 71.13%. Comparing base (3b75acd) to head (0a23104).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #871   +/-   ##
=======================================
  Coverage   71.13%   71.13%           
=======================================
  Files         211      211           
  Lines        8349     8349           
  Branches     2727     2727           
=======================================
  Hits         5939     5939           
  Misses       2132     2132           
  Partials      278      278           
Flag Coverage Δ
e2e 67.13% <ø> (-4.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant