remove unnecessary returns based on the latest logic for phantomRefund
Signed-off-by: Uncle Fatso <uncle.fatso@ghostchain.io>
This commit is contained in:
parent
2623451103
commit
3e380b6da7
@ -83,14 +83,14 @@ contract GhostTreasury is GhostAccessControlled, ITreasury {
|
||||
uint48 phantomRelease,
|
||||
uint256 gasSpent,
|
||||
uint256 registryIndex
|
||||
) external override returns (uint256 gasValue) {
|
||||
) external override {
|
||||
if (!_permissions[STATUS.STAKING][msg.sender]) revert NotApproved();
|
||||
|
||||
address reserveToken = _registry[STATUS.RESERVETOKEN].at(registryIndex);
|
||||
if (!_permissions[STATUS.RESERVETOKEN][reserveToken]) revert NotApproved();
|
||||
|
||||
uint256 totalSupply = IERC20(FTSO).totalSupply();
|
||||
gasValue = tokenValue(reserveToken, gasSpent);
|
||||
uint256 gasValue = tokenValue(reserveToken, gasSpent);
|
||||
gasValue = FullMath.mulDiv(gasValue, totalSupply, totalReserves);
|
||||
|
||||
if (gasValue > 0 && gasValue <= excessReserves()) {
|
||||
|
||||
@ -30,7 +30,7 @@ interface ITreasury {
|
||||
) external returns (uint256);
|
||||
|
||||
function registered(STATUS status, address token) external view returns(bool);
|
||||
function phantomRefund(address receiver, uint48 phantomExpiry, uint256 gasSpent, uint256 amount) external returns (uint256);
|
||||
function phantomRefund(address receiver, uint48 phantomExpiry, uint256 gasSpent, uint256 amount) external;
|
||||
function buyBack(address receiver, uint256 amount, uint256 index) external returns (address, uint256);
|
||||
function withdraw(address token, uint256 amount) external;
|
||||
function mint(address _recipient, uint256 _amount) external;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user