Skip to content
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

getClaimableOAS is included claimed oas value #23

Open
Tsuyoshi-Ishikawa opened this issue Nov 22, 2022 · 0 comments
Open

getClaimableOAS is included claimed oas value #23

Tsuyoshi-Ishikawa opened this issue Nov 22, 2022 · 0 comments

Comments

@Tsuyoshi-Ishikawa
Copy link

Tsuyoshi-Ishikawa commented Nov 22, 2022

getClaimableOAS is included claimed oas value.
I think claimableOAS must not be include claimed oas.

Modification

function claim(uint256 amount) external {
        if (amount == 0) revert NoAmount();

        ClaimInfo storage originalClaimInfo = claimInfo[originalClaimer[msg.sender]];
        uint256 currentClaimableOAS = getClaimableOAS(originalClaimer[msg.sender]); // modified

function getClaimableOAS(address original) public view returns (uint256) {
...
         if (amount > originalClaimInfo.amount) {
            // return originalClaimInfo.amount;
            return originalClaimInfo.amount - originalClaimInfo.claimed; // modified
        }

After that

We have to modify oasys-pos-fe after this modifications.

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

No branches or pull requests

1 participant