Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions create-listing/create-listing.cdc.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ 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}>(
let hasLinkedCollection = seller
.getCapability<&${NFTContractName}.Collection{NonFungibleToken.Provider, NonFungibleToken.CollectionPublic}>(
nftProviderPrivatePath
)!.check()
if !hasLinkedCollection {
Expand All @@ -45,8 +45,8 @@ 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}>(
self.nftProvider = seller
.getCapability<&${NFTContractName}.Collection{NonFungibleToken.Provider, NonFungibleToken.CollectionPublic}>(
nftProviderPrivatePath
)!
assert(self.nftProvider.borrow() != nil, message: "Missing or mis-typed collection provider")
Expand Down