Skip to content

fix(igp): corrected coin comparison#141

Merged
mbreithecker merged 2 commits intobcp-innovations:mainfrom
keruch:keruch/igp-fix
Jan 23, 2026
Merged

fix(igp): corrected coin comparison#141
mbreithecker merged 2 commits intobcp-innovations:mainfrom
keruch:keruch/igp-fix

Conversation

@keruch
Copy link
Copy Markdown
Contributor

@keruch keruch commented Sep 17, 2025

The current maxFee check in IGP is incorrect. It passes in unexpected scenarios. For example, if requiredPayment = 5uatom while maxFee = 5uosmo.

Ideally, we'd use requiredPayment.IsAnyGT(maxFee), but IsAnyGT semantic is weird (see issue). The correct alternative is !maxFee.IsAllGTE(requiredPayment).

I added a test to cover this case.

Copy link
Copy Markdown
Member

@mbreithecker mbreithecker left a comment

Choose a reason for hiding this comment

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

Good catch! Thank you for your contribution!

@mbreithecker mbreithecker merged commit aad1c11 into bcp-innovations:main Jan 23, 2026
1 check passed
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