Skip to content

Commit

Permalink
address migration failure
Browse files Browse the repository at this point in the history
  • Loading branch information
austinkline committed May 8, 2024
1 parent 281715f commit e370f98
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions contracts/ScopedNFTProviders.cdc
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ access(all) contract ScopedNFTProviders {
//
// Wrapper around an NFT Provider that is restricted to specific ids.
access(all) resource ScopedNFTProvider: NonFungibleToken.Provider {
access(self) let provider: Capability<auth(NonFungibleToken.Withdraw) &{NonFungibleToken.Collection}>
access(self) let provider: Capability<auth(NonFungibleToken.Withdraw) &{NonFungibleToken.Provider, NonFungibleToken.CollectionPublic}>
access(self) let filters: [{NFTFilter}]

// block timestamp that this provider can no longer be used after
Expand All @@ -91,7 +91,7 @@ access(all) contract ScopedNFTProviders {
return false
}

access(all) init(provider: Capability<auth(NonFungibleToken.Withdraw) &{NonFungibleToken.Collection}>, filters: [{NFTFilter}], expiration: UFix64?) {
access(all) init(provider: Capability<auth(NonFungibleToken.Withdraw) &{NonFungibleToken.Provider, NonFungibleToken.CollectionPublic}>, filters: [{NFTFilter}], expiration: UFix64?) {
self.provider = provider
self.expiration = expiration
self.filters = filters
Expand Down Expand Up @@ -157,7 +157,7 @@ access(all) contract ScopedNFTProviders {
}

access(all) fun createScopedNFTProvider(
provider: Capability<auth(NonFungibleToken.Withdraw) &{NonFungibleToken.Collection}>,
provider: Capability<auth(NonFungibleToken.Withdraw) &{NonFungibleToken.Provider, NonFungibleToken.CollectionPublic}>,
filters: [{NFTFilter}],
expiration: UFix64?
): @ScopedNFTProvider {
Expand Down
2 changes: 1 addition & 1 deletion transactions/examplenft/mint.cdc
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ transaction(recipient: Address) {
}

execute {
let receiver = getAccount(recipient).capabilities.get<&{NonFungibleToken.Collection}>(ExampleNFT.CollectionPublicPath)!.borrow()!
let receiver = getAccount(recipient).capabilities.get<&{NonFungibleToken.Collection}>(ExampleNFT.CollectionPublicPath).borrow()!
self.minter.mintNFT(recipient: receiver, name: "testname", description: "descr", thumbnail: "image.html", royaltyReceipient: self.minter.owner!.address)
}
}

0 comments on commit e370f98

Please sign in to comment.