Skip to content

Commit

Permalink
set new positon of view function based on storage
Browse files Browse the repository at this point in the history
  • Loading branch information
gfournieriExec committed Jun 3, 2024
1 parent 97ec801 commit 79e222b
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions contracts/beacon/Voucher.sol
Original file line number Diff line number Diff line change
Expand Up @@ -247,12 +247,11 @@ contract Voucher is Initializable, IVoucher {
}

/**
* Retrieve the type of the voucher.
* @return voucherType The type of the voucher.
* @dev Returns the address of the current owner.
*/
function getType() external view returns (uint256) {
function owner() public view returns (address) {
VoucherStorage storage $ = _getVoucherStorage();
return $._type;
return $._owner;
}

/**
Expand All @@ -264,6 +263,15 @@ contract Voucher is Initializable, IVoucher {
return $._expiration;
}

/**
* Retrieve the type of the voucher.
* @return voucherType The type of the voucher.
*/
function getType() external view returns (uint256) {
VoucherStorage storage $ = _getVoucherStorage();
return $._type;
}

/**
* Get voucher balance.
*/
Expand Down Expand Up @@ -299,14 +307,6 @@ contract Voucher is Initializable, IVoucher {
return $._voucherHub;
}

/**
* @dev Returns the address of the current owner.
*/
function owner() public view returns (address) {
VoucherStorage storage $ = _getVoucherStorage();
return $._owner;
}

/**
* Internal function to set authorization for an account.
* @param account The account to set authorization for.
Expand Down

0 comments on commit 79e222b

Please sign in to comment.