Skip to content

🐛 app: fix spending limit calculation#944

Merged
cruzdanilo merged 1 commit intomainfrom
limit
Apr 8, 2026
Merged

🐛 app: fix spending limit calculation#944
cruzdanilo merged 1 commit intomainfrom
limit

Conversation

@dieguezguille
Copy link
Copy Markdown
Member

@dieguezguille dieguezguille commented Apr 8, 2026


Open with Devin

Summary by CodeRabbit

  • Bug Fixes
    • Corrected spending limit calculation in the mobile app.

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Apr 8, 2026

🦋 Changeset detected

Latest commit: 03394a2

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

Copy link
Copy Markdown

@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 found 1 potential issue.

Open in Devin Review

setSpendingLimitSheetOpen(true);
}}
spendingLimit={markets ? withdrawLimit(markets, marketUSDCAddress, WAD) : 0n}
spendingLimit={markets ? withdrawLimit(markets, marketUSDCAddress) : 0n}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🚩 Possibly unused WAD import after fix

After removing the WAD argument from withdrawLimit at line 266, the WAD symbol imported at line 21 (import { borrowLimit, healthFactor, WAD, withdrawLimit } from "@exactly/lib") may no longer be referenced anywhere in Home.tsx. If so, this will be caught by the project's eslint no-unused-vars / TypeScript unused imports rule and would need to be cleaned up. Since the full file wasn't inspected, it's possible WAD is used elsewhere in the component — but if not, CI will flag it.

Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Copy link
Copy Markdown

@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 in the spending limit calculation within the Home component. The fix involves modifying the withdrawLimit function call by removing the WAD argument, streamlining the calculation. There are no review comments to address.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 8, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: cc60dc05-3f03-4be8-a8e5-5160e2b6de93

📥 Commits

Reviewing files that changed from the base of the PR and between 23b261c and 03394a2.

📒 Files selected for processing (2)
  • .changeset/odd-clocks-stand.md
  • src/components/home/Home.tsx

Walkthrough

A bugfix for spending limit calculation in the @exactly/mobile package removes the WAD argument from a withdrawLimit() function call in the Home component. A changeset entry documents this patch-level release.

Changes

Cohort / File(s) Summary
Spending Limit Bugfix
src/components/home/Home.tsx
Removed WAD parameter from withdrawLimit() call when calculating spendingLimit prop for CardStatus component, correcting the spending limit calculation logic.
Release Documentation
.changeset/odd-clocks-stand.md
Added changeset entry documenting patch-level release for @exactly/mobile with bugfix for spending limit calculation.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Suggested reviewers

  • franm91
  • cruzdanilo
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch limit

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.

@cruzdanilo cruzdanilo merged commit 03394a2 into main Apr 8, 2026
9 of 12 checks passed
@cruzdanilo cruzdanilo deleted the limit branch April 8, 2026 15:26
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