From 2e5091965fed00112fd6de2c0d2ba391bf94acb3 Mon Sep 17 00:00:00 2001 From: Kevin McIntyre Date: Sun, 24 Apr 2022 16:52:15 -0700 Subject: [PATCH 1/2] remove white space causing issue --- create-listing/create-listing.cdc.tmpl | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/create-listing/create-listing.cdc.tmpl b/create-listing/create-listing.cdc.tmpl index 3ee789f..8a7abfa 100644 --- a/create-listing/create-listing.cdc.tmpl +++ b/create-listing/create-listing.cdc.tmpl @@ -33,10 +33,9 @@ transaction(saleItemID: UInt64, saleItemPrice: UFix64, royaltyPercent: UFix64) { // If the user does not have their collection linked to their account, link it. let nftProviderPrivatePath = /private/${NFTContractName}CollectionProviderForNFTStorefront - let hasLinkedCollection = seller. - getCapability<&${NFTContractName}.Collection{NonFungibleToken.Provider, NonFungibleToken.CollectionPublic}>( - nftProviderPrivatePath - )!.check() + let hasLinkedCollection = seller.getCapability<&${NFTContractName}.Collection{NonFungibleToken.Provider, NonFungibleToken.CollectionPublic}>( + nftProviderPrivatePath + )!.check() if !hasLinkedCollection { seller.link<&${NFTContractName}.Collection{NonFungibleToken.Provider, NonFungibleToken.CollectionPublic}>( nftProviderPrivatePath, @@ -45,10 +44,9 @@ transaction(saleItemID: UInt64, saleItemPrice: UFix64, royaltyPercent: UFix64) { } // Get a capability to access the user's NFT collection. - self.nftProvider = seller. - getCapability<&${NFTContractName}.Collection{NonFungibleToken.Provider, NonFungibleToken.CollectionPublic}>( - nftProviderPrivatePath - )! + self.nftProvider = seller.getCapability<&${NFTContractName}.Collection{NonFungibleToken.Provider, NonFungibleToken.CollectionPublic}>( + nftProviderPrivatePath + )! assert(self.nftProvider.borrow() != nil, message: "Missing or mis-typed collection provider") // Get a reference to the user's NFT storefront From b322d46d0d1b7094c9073d8fd467f71b36505a03 Mon Sep 17 00:00:00 2001 From: Kevin McIntyre Date: Mon, 25 Apr 2022 13:40:43 -0700 Subject: [PATCH 2/2] better format --- create-listing/create-listing.cdc.tmpl | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/create-listing/create-listing.cdc.tmpl b/create-listing/create-listing.cdc.tmpl index 8a7abfa..ff532f2 100644 --- a/create-listing/create-listing.cdc.tmpl +++ b/create-listing/create-listing.cdc.tmpl @@ -33,9 +33,10 @@ transaction(saleItemID: UInt64, saleItemPrice: UFix64, royaltyPercent: UFix64) { // If the user does not have their collection linked to their account, link it. let nftProviderPrivatePath = /private/${NFTContractName}CollectionProviderForNFTStorefront - let hasLinkedCollection = seller.getCapability<&${NFTContractName}.Collection{NonFungibleToken.Provider, NonFungibleToken.CollectionPublic}>( - nftProviderPrivatePath - )!.check() + let hasLinkedCollection = seller + .getCapability<&${NFTContractName}.Collection{NonFungibleToken.Provider, NonFungibleToken.CollectionPublic}>( + nftProviderPrivatePath + )!.check() if !hasLinkedCollection { seller.link<&${NFTContractName}.Collection{NonFungibleToken.Provider, NonFungibleToken.CollectionPublic}>( nftProviderPrivatePath, @@ -44,9 +45,10 @@ transaction(saleItemID: UInt64, saleItemPrice: UFix64, royaltyPercent: UFix64) { } // Get a capability to access the user's NFT collection. - self.nftProvider = seller.getCapability<&${NFTContractName}.Collection{NonFungibleToken.Provider, NonFungibleToken.CollectionPublic}>( - nftProviderPrivatePath - )! + self.nftProvider = seller + .getCapability<&${NFTContractName}.Collection{NonFungibleToken.Provider, NonFungibleToken.CollectionPublic}>( + nftProviderPrivatePath + )! assert(self.nftProvider.borrow() != nil, message: "Missing or mis-typed collection provider") // Get a reference to the user's NFT storefront