From 37b928e0d149dd8b6ccb58ab12a01a105d9e326d Mon Sep 17 00:00:00 2001 From: Innocent Abdullahi Date: Mon, 7 Oct 2024 09:59:37 -0700 Subject: [PATCH] trigger test --- escrow/contracts/Escrow.cdc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/escrow/contracts/Escrow.cdc b/escrow/contracts/Escrow.cdc index 8c22a4b..1503f1b 100644 --- a/escrow/contracts/Escrow.cdc +++ b/escrow/contracts/Escrow.cdc @@ -196,6 +196,7 @@ access(all) contract Escrow { if(leaderboard.entriesData[nftID] == nil) { return } + if(depositCap.address != leaderboard.entriesData[nftID]!.ownerAddress){ panic("Only the owner of the entry can withdraw it") } @@ -212,6 +213,7 @@ access(all) contract Escrow { if(leaderboard.entriesData[nftID] == nil) { return } + leaderboard.transferNftToCollection(nftID: nftID, depositCap: depositCap) }