Skip to content

Conversation

@dkent600
Copy link
Contributor

@dkent600 dkent600 commented Dec 1, 2018

The dutchx app wants to display to the user how much reputation the user will be rewarded. This PR change greatly facilitates obtaining this value after the locking period has ended and before the rep has been redeemed, and it keeps within the contract the logic for computing reputation.

(The amount of reputation rewarded after redeeming will have to come from the Redeem events.)

@dkent600 dkent600 self-assigned this Dec 1, 2018
@dkent600 dkent600 requested a review from orenyodfat December 1, 2018 18:04
Copy link
Contributor

@orenyodfat orenyodfat left a comment

Choose a reason for hiding this comment

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

Please add tests.
Let’s keep the version bump to another pr .

* @return uint reputation rewarded
*/
function redeem(address _beneficiary, uint _auctionId) public returns(bool) {
function redeem(address _beneficiary, uint _auctionId) public returns(uint) {
Copy link
Contributor

@orenyodfat orenyodfat Dec 2, 2018

Choose a reason for hiding this comment

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

function redeem(address _beneficiary, uint _auctionId) public returns(uint reputation)

remove reputation declaration inside function

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done: 2418b42

* @return uint reputation rewarded
*/
function redeem(address _beneficiary) public returns(bool) {
function redeem(address _beneficiary) public returns(uint) {
Copy link
Contributor

@orenyodfat orenyodfat Dec 2, 2018

Choose a reason for hiding this comment

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

function redeem(address _beneficiary) public returns(uint reputation)

and remove reputation declaration inside the function.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done: 2418b42

@orenyodfat orenyodfat merged commit 6132bfe into master Dec 2, 2018
@dkent600 dkent600 deleted the getRedeemableRep branch December 3, 2018 17:31
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.

3 participants