File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -555,12 +555,14 @@ access(all) contract LostAndFound {
555555 let uuid = ticket .uuid
556556 shelf .deposit (ticket : <- ticket , flowTokenRepayment : flowTokenRepayment )
557557
558- let storageFee = FeeEstimator .storageUsedToFlowAmount (LostAndFound .account .storage .used - storageBefore )
559- LostAndFound .storageFees [uuid ] = storageFee
558+ if LostAndFound .account .storage .used > storageBefore {
559+ let storageFee = FeeEstimator .storageUsedToFlowAmount (LostAndFound .account .storage .used - storageBefore )
560+ LostAndFound .storageFees [uuid ] = storageFee
560561
561- let storagePaymentVault <- self .withdrawTokens (amount : storageFee )
562+ let storagePaymentVault <- self .withdrawTokens (amount : storageFee )
563+ receiver .deposit (from : <- storagePaymentVault )
564+ }
562565
563- receiver .deposit (from : <- storagePaymentVault )
564566 return uuid
565567 }
566568
Original file line number Diff line number Diff line change 22
33set -e
44
5- flow-c1 test --cover --covercode=" contracts" --coverprofile=" coverage.lcov" tests/* _tests.cdc
5+ flow test --cover --covercode=" contracts" --coverprofile=" coverage.lcov" tests/* _tests.cdc
You can’t perform that action at this time.
0 commit comments