Skip to content

fix-faulty-balance-fetch-for-new-users#442

Merged
5ran6 merged 1 commit into
stablefrom
fix-faulty-balance-fetch-for-new-users
Apr 3, 2026
Merged

fix-faulty-balance-fetch-for-new-users#442
5ran6 merged 1 commit into
stablefrom
fix-faulty-balance-fetch-for-new-users

Conversation

@Dprof-in-tech
Copy link
Copy Markdown
Collaborator

Description

This pull request updates the BalanceProvider logic to better handle new users with embedded wallets. Now, when a user has an embedded wallet but no smart contract wallet, the app treats the embedded wallet as the primary account and fetches cross-chain balances accordingly.

Balance handling improvements:

  • When a user has an embedded wallet but no smart contract wallet, the provider sets primaryIsEOA to true, clears any smart wallet balance, and fetches cross-chain entries for the embedded wallet address. It then updates the cross-chain balances and external wallet balance based on the selected network, or fetches and computes balances directly if no entry is found.

References

Testing

  • This change adds test coverage for new/changed/fixed functionality

Checklist

  • I have added documentation and tests for new/changed functionality in this PR
  • All active GitHub checks for tests, formatting, and security are passing
  • The correct base branch is being used, if not main

By submitting a PR, I agree to Paycrest's Contributor Code of Conduct and Contribution Guide.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 3, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 377933c2-0339-412c-b71a-df48375c0c53

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix-faulty-balance-fetch-for-new-users

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
Copy Markdown
Contributor

@5ran6 5ran6 left a comment

Choose a reason for hiding this comment

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

LGTM

@5ran6 5ran6 merged commit 502e949 into stable Apr 3, 2026
1 check passed
@5ran6 5ran6 deleted the fix-faulty-balance-fetch-for-new-users branch April 3, 2026 17:23
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.

2 participants