Skip to content

program: Fix fee check#790

Open
joncinque wants to merge 1 commit into
solana-program:mainfrom
joncinque:fix-fee-check
Open

program: Fix fee check#790
joncinque wants to merge 1 commit into
solana-program:mainfrom
joncinque:fix-fee-check

Conversation

@joncinque

Copy link
Copy Markdown
Contributor

Problem

The fee check is using map instead of and_then, allowing for an incorrect comparison between Option::Some(...) and Option::None.

Summary of changes

Use and_then instead to compare numbers instead of options.

This fix was included in the most recent deployment of the stake pool program, part of https://github.com/solana-program/stake-pool/releases/tag/program%40v2.1.0, and now it's time to re-integrate it into the main branch.

#### Problem

The fee check is using `map` instead of `and_then`, allowing for an
incorrect comparison between `Option::Some(...)` and `Option::None`.

#### Summary of changes

Use `and_then` instead to compare numbers instead of options.
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.

1 participant