diff --git a/transactions/rock_paper_scissors_game/rps_win_loss_retriever/reset_win_loss_data.cdc b/transactions/rock_paper_scissors_game/rps_win_loss_retriever/reset_win_loss_data.cdc deleted file mode 100644 index bb80a1f..0000000 --- a/transactions/rock_paper_scissors_game/rps_win_loss_retriever/reset_win_loss_data.cdc +++ /dev/null @@ -1,24 +0,0 @@ -import GamePieceNFT from "../../../contracts/GamePieceNFT.cdc" -import GamingMetadataViews from "../../../contracts/GamingMetadataViews.cdc" -import RockPaperScissorsGame from "../../../contracts/RockPaperScissorsGame.cdc" - -/// This transaction resets the win/loss record for the NFT with the specified id -/// -transaction(nftID: UInt64) { - - prepare(account: AuthAccount) { - // Borrow ResolverCollection reference - let collectionRef = account - .borrow<&{GamePieceNFT.GamePieceNFTCollectionPublic}>( - from: GamePieceNFT.CollectionStoragePath - ) ?? panic("Could not borrow a reference to the collection at path: ".concat(GamePieceNFT.CollectionStoragePath.toString())) - - // Get the NFT reference if it exists in the reference collection - if let nftRef = collectionRef.borrowGamePieceNFT(id: nftID) { - // Get the RPSAssignedMoves attachment if exists & reset - if let winLossRef = nftRef[RockPaperScissorsGame.RPSWinLossRetriever] { - winLossRef.resetWinLossData() - } - } - } -}