remove unnecessary returns based on the latest logic for phantomRefund

Signed-off-by: Uncle Fatso <uncle.fatso@ghostchain.io>
This commit is contained in:
Uncle Fatso 2026-10-16 15:42:24 +03:00
parent 2623451103
commit 3e380b6da7
Signed by: f4ts0
GPG Key ID: 565F4F2860226EBB
2 changed files with 3 additions and 3 deletions

View File

@ -83,14 +83,14 @@ contract GhostTreasury is GhostAccessControlled, ITreasury {
uint48 phantomRelease, uint48 phantomRelease,
uint256 gasSpent, uint256 gasSpent,
uint256 registryIndex uint256 registryIndex
) external override returns (uint256 gasValue) { ) external override {
if (!_permissions[STATUS.STAKING][msg.sender]) revert NotApproved(); if (!_permissions[STATUS.STAKING][msg.sender]) revert NotApproved();
address reserveToken = _registry[STATUS.RESERVETOKEN].at(registryIndex); address reserveToken = _registry[STATUS.RESERVETOKEN].at(registryIndex);
if (!_permissions[STATUS.RESERVETOKEN][reserveToken]) revert NotApproved(); if (!_permissions[STATUS.RESERVETOKEN][reserveToken]) revert NotApproved();
uint256 totalSupply = IERC20(FTSO).totalSupply(); uint256 totalSupply = IERC20(FTSO).totalSupply();
gasValue = tokenValue(reserveToken, gasSpent); uint256 gasValue = tokenValue(reserveToken, gasSpent);
gasValue = FullMath.mulDiv(gasValue, totalSupply, totalReserves); gasValue = FullMath.mulDiv(gasValue, totalSupply, totalReserves);
if (gasValue > 0 && gasValue <= excessReserves()) { if (gasValue > 0 && gasValue <= excessReserves()) {

View File

@ -30,7 +30,7 @@ interface ITreasury {
) external returns (uint256); ) external returns (uint256);
function registered(STATUS status, address token) external view returns(bool); 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 buyBack(address receiver, uint256 amount, uint256 index) external returns (address, uint256);
function withdraw(address token, uint256 amount) external; function withdraw(address token, uint256 amount) external;
function mint(address _recipient, uint256 _amount) external; function mint(address _recipient, uint256 _amount) external;