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

Removes activeStakeRequestCount from OSTComposer #775

Merged
merged 4 commits into from
Jun 21, 2019

Conversation

pgev
Copy link
Contributor

@pgev pgev commented Jun 20, 2019

  • Updates test cases accordingly.
  • Adds npm run update script to ease updating submodules and npm
    packages after switching branches.

Fixes: #772

  - Updates test cases accordingly.
  - Adds `npm run update` script to ease updating submodules and npm
    packages after switching branches.

Fixes: OpenST#772
@gulshanvasnani gulshanvasnani self-assigned this Jun 20, 2019
Copy link
Contributor

@deepesh-kn deepesh-kn left a comment

Choose a reason for hiding this comment

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

👍 This looks good.

I think the following things can be done on this ticket due to this change.

  1. We don't need safe math now.

    import "openzeppelin-solidity/contracts/math/SafeMath.sol";

  2. We should add the check for the existence of staker proxy contract when we do accept stake request.

    StakerProxy stakerProxy = stakerProxies[stakeRequest.staker];

Copy link
Contributor

@gulshanvasnani gulshanvasnani left a comment

Choose a reason for hiding this comment

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

Nice 👍
Please see one inline comment.

package.json Outdated Show resolved Hide resolved
@gulshanvasnani gulshanvasnani removed their assignment Jun 21, 2019
Paruyr Gevorgyan added 2 commits June 21, 2019 09:37
  - Asserts explicitly an extence of staker proxy during
    acceptStakeRequest.
  - Fixes lint issues in acceptStakeRequest unit test.
  - Removes SafeMath as its not needed after removing
    activeStakeRequestCount.
Copy link
Contributor

@gulshanvasnani gulshanvasnani left a comment

Choose a reason for hiding this comment

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

LGTM 🚀

Copy link
Contributor

@deepesh-kn deepesh-kn left a comment

Choose a reason for hiding this comment

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

Almost done 👍
Just one last thing to add,
A unit test case corresponding to the following condition

require(
            address(stakerProxy) != address(0),
            "StakerProxy address is null."
        );

Adds a test case to test a failure of OSTComposer::acceptStakeRequest
in case if a corresponding staker proxy does not exist.
@pgev pgev requested a review from deepesh-kn June 21, 2019 10:54
Copy link
Contributor

@deepesh-kn deepesh-kn left a comment

Choose a reason for hiding this comment

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

LGTM :shipit:

@deepesh-kn deepesh-kn merged commit 4692a7a into OpenST:develop Jun 21, 2019
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.

Remove activeStakeRequestCount from OSTComposer contract
3 participants