File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -77,10 +77,12 @@ access(all) contract Escrow {
77
77
// Withdraws an NFT entry from the leaderboard.
78
78
access (contract) fun transferNftToCollection (nftID : UInt64 , depositCap : Capability <&{NonFungibleToken .Collection }>) {
79
79
pre {
80
- self .entriesData[nftID] ! = nil : " Entry does not exist with this NFT ID"
81
80
depositCap.address == self .entriesData[nftID]! .ownerAddress : " Only the owner of the entry can withdraw it"
82
81
depositCap.check () : " Deposit capability is not valid"
83
82
}
83
+ if (self .entriesData[nftID] == nil ) {
84
+ return
85
+ }
84
86
85
87
// Remove the NFT entry's data from the leaderboard.
86
88
self .entriesData.remove (key : nftID)!
@@ -97,8 +99,8 @@ access(all) contract Escrow {
97
99
98
100
// Burns an NFT entry from the leaderboard.
99
101
access (contract) fun burn (nftID : UInt64 ) {
100
- pre {
101
- self .entriesData[nftID] ! = nil : " Entry does not exist with this NFT ID "
102
+ if ( self .entriesData[nftID] == nil ) {
103
+ return
102
104
}
103
105
104
106
// Remove the NFT entry's data from the leaderboard.
You can’t perform that action at this time.
0 commit comments