From f991c721c21e2c52f2b3d0725616681a165354eb Mon Sep 17 00:00:00 2001 From: zajck Date: Tue, 6 Jun 2023 16:30:35 +0200 Subject: [PATCH] minor optimization --- contracts/protocol/facets/SellerHandlerFacet.sol | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/contracts/protocol/facets/SellerHandlerFacet.sol b/contracts/protocol/facets/SellerHandlerFacet.sol index e34c0c0d8..3993834c1 100644 --- a/contracts/protocol/facets/SellerHandlerFacet.sol +++ b/contracts/protocol/facets/SellerHandlerFacet.sol @@ -383,10 +383,11 @@ contract SellerHandlerFacet is SellerBase { // Create clone and store its address to additionalCollections address voucherCloneAddress = cloneBosonVoucher(sellerId, collectionIndex, assistant, _voucherInitValues); - Collection memory newCollection; + + // Store collection details + Collection storage newCollection = sellersAdditionalCollections.push(); newCollection.collectionAddress = voucherCloneAddress; newCollection.externalId = _externalId; - sellersAdditionalCollections.push(newCollection); emit CollectionCreated(sellerId, collectionIndex, voucherCloneAddress, _externalId, assistant); }