mirror of
https://github.com/dap-ps/discover.git
synced 2025-01-31 19:45:53 +00:00
Adds withdrawMax view function for use in UI
This commit is contained in:
parent
22718646d2
commit
4805add080
@ -96,6 +96,17 @@ contract Discover is ApproveAndCallFallBack, BancorFormula {
|
|||||||
_downvote(msg.sender, _id, _amount);
|
_downvote(msg.sender, _id, _amount);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @dev Developers can withdraw an amount not more than what was available of the
|
||||||
|
SNT they originally staked minus what they have already received back in downvotes.
|
||||||
|
* @param _id bytes32 unique identifier.
|
||||||
|
* @return max SNT that can be withdrawn == available SNT for DApp.
|
||||||
|
*/
|
||||||
|
function withdrawMax(bytes32 _id) external view returns(uint) {
|
||||||
|
Data storage d = _getDAppById(_id);
|
||||||
|
return d.available;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @dev Developers can withdraw an amount not more than what was available of the
|
* @dev Developers can withdraw an amount not more than what was available of the
|
||||||
SNT they originally staked minus what they have already received back in downvotes.
|
SNT they originally staked minus what they have already received back in downvotes.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user