-
Notifications
You must be signed in to change notification settings - Fork 39
feat(frontend): Do not validate balance if user is minting account #10036
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(frontend): Do not validate balance if user is minting account #10036
Conversation
…r-is-minting-account
…r-is-minting-account
…r-is-minting-account
…r-is-minting-account
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR enables OISY users who have their accounts configured as minting accounts for ICRC tokens to perform mint transactions without requiring balance validation. This is essential for minting accounts which need to send tokens (mint transactions) even when their balance is zero.
Key Changes
- Added conditional balance validation bypass in the IC send flow when the user is identified as a minting account
- Updated UI to enable outflow actions (send/convert buttons) for minting accounts even with zero balance
- Added comprehensive test coverage for the new minting account send behavior
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
src/frontend/src/icp/components/send/IcSendAmount.svelte |
Added early return in validation logic to skip balance checks when user is a minting account |
src/frontend/src/lib/components/hero/HeroContent.svelte |
Modified outflow action disable logic to account for minting account status, allowing actions with zero balance |
src/frontend/src/tests/icp/components/send/IcSendAmount.spec.ts |
Added test case verifying no balance error is shown for minting accounts with insufficient funds |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Motivation
Some users are defining their OISY accounts as minting accounts of ICRC tokens. So, they need to have specific flows dedicated in these cases: for example, to create a Mint transaction, the minting account must send tokens out, and it can happen without balance.
Changes
IcSendAmountif positive.Tests
A practical test below: I temporarily made the OISY wallet as minting account of a fake ICRC, and, with zero balance, sent to another wallet.
Screen.Recording.2025-11-06.at.21.35.58.mov