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) }