Skip to content

Commit 3fd4841

Browse files
committed
fix param name, clean up listing after purchase
1 parent aa2db65 commit 3fd4841

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

atlas/transactions/admin/fulfill_pack_buyback_offer.cdc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ transaction() {
3030

3131
prepare(user: auth(Storage, Capabilities) &Account, dapper: auth(BorrowValue) &Account) {
3232
// Initialize NFT IDs and buyback prices
33-
self.nftIDs = [{{.nftIDs}}]
34-
self.prices = [{{.prices}}]
33+
self.nftIDs = [{{.NFTIDs}}]
34+
self.prices = [{{.Prices}}]
3535

3636
// Get or create user's storefront
3737
if user.storage.borrow<&NFTStorefront.Storefront>(from: NFTStorefront.StorefrontStoragePath) == nil {
@@ -108,6 +108,7 @@ transaction() {
108108
// Dapper purchases NFT and deposits in issuer's collection
109109
let listing = self.userStorefront.borrowListing(listingResourceID: listingID)!
110110
self.issuerCollection.deposit(token: <- listing.purchase(payment: <- self.dapperVault.withdraw(amount: self.prices[i])))
111+
NFTStorefront.cleanup(listingResourceID: listingID)
111112
}
112113
}
113114

0 commit comments

Comments
 (0)