Skip to content

Commit

Permalink
Merge pull request #73 from dapperlabs/judez/fix-withdraw-cap
Browse files Browse the repository at this point in the history
Fixed withdrawCap type
  • Loading branch information
judezhu authored Aug 27, 2024
2 parents c6fc23c + ac48366 commit 773c3d8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions pds/embed.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,6 @@ var (
PDSOpenPackNFT []byte
//go:embed transactions/pds/reveal_packNFT.cdc
PDSRevealPackNFT []byte
//go:embed transactions/pds/create_distribution.cdc
PDSCreateDistribution []byte
)
2 changes: 1 addition & 1 deletion pds/transactions/pds/create_distribution.cdc
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ transaction(nftWithdrawCapPath: StoragePath, title: String, metadata: {String: S

// get withdraw capability from issuer
let withdrawCap = issuer.storage.copy<
Capability<auth(NonFungibleToken.Withdraw) &{NonFungibleToken.Collection}>>(from: nftWithdrawCapPath)!
Capability<auth(NonFungibleToken.Withdraw) &{NonFungibleToken.Provider}>>(from: nftWithdrawCapPath)!
assert(withdrawCap.check(), message: "cannot get copy of withdraw capability")

// get operator capability from issuer
Expand Down

0 comments on commit 773c3d8

Please sign in to comment.