Skip to content

Commit

Permalink
set _committed in issueVoucher
Browse files Browse the repository at this point in the history
  • Loading branch information
zajck committed Apr 11, 2023
1 parent 30c5384 commit 7b4f38c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion contracts/protocol/clients/voucher/BosonVoucher.sol
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,9 @@ contract BosonVoucherBase is
uint256 rangeStart = range.start;
require((_tokenId < rangeStart) || (_tokenId >= rangeStart + range.length), EXCHANGE_ID_IN_RESERVED_RANGE);

// Issue voucher is called only during commitToOffer (in protocol), so token can be set as committed
_committed[_tokenId] = true;

// Mint the voucher, sending it to the buyer address
_mint(_buyer, _tokenId);
}
Expand Down Expand Up @@ -754,7 +757,7 @@ contract BosonVoucherBase is
function getPreMintStatus(uint256 _tokenId) public view returns (bool committable, address owner) {
// Not committable if _committed already or if token has an owner

if (!_committed[_tokenId] && !_exists(_tokenId)) {
if (!_committed[_tokenId]) {
// it might be a pre-minted token. Preminted tokens have offerId in the upper 128 bits
uint256 offerId = _tokenId >> 128;

Expand Down

0 comments on commit 7b4f38c

Please sign in to comment.