Skip to content

Commit

Permalink
Minor optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
zajck committed Apr 19, 2023
1 parent 7b4f38c commit 9633fdd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions contracts/protocol/facets/ExchangeHandlerFacet.sol
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ contract ExchangeHandlerFacet is IBosonExchangeHandler, BuyerBase, DisputeBase {
lookups.voucherCount[buyerId]++;
if (!_isPreminted) {
IBosonVoucher bosonVoucher = IBosonVoucher(lookups.cloneAddress[_offer.sellerId]);
uint256 tokenId = _exchangeId + (_offerId << 128);
uint256 tokenId = _exchangeId | (_offerId << 128);
bosonVoucher.issueVoucher(tokenId, _buyer);
}
}
Expand Down Expand Up @@ -696,7 +696,7 @@ contract ExchangeHandlerFacet is IBosonExchangeHandler, BuyerBase, DisputeBase {
IBosonVoucher bosonVoucher = IBosonVoucher(lookups.cloneAddress[offer.sellerId]);

uint256 tokenId = _exchange.id;
if (tokenId >= EXCHANGE_ID_2_2_0) tokenId += (offerId << 128);
if (tokenId >= EXCHANGE_ID_2_2_0) tokenId |= (offerId << 128);
bosonVoucher.burnVoucher(tokenId);
}

Expand Down

0 comments on commit 9633fdd

Please sign in to comment.