Skip to content

Commit

Permalink
Update KaliBerger.sol
Browse files Browse the repository at this point in the history
  • Loading branch information
audsssy committed Nov 3, 2023
1 parent c59a028 commit f7707c4
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions src/KaliBerger.sol
Original file line number Diff line number Diff line change
Expand Up @@ -331,14 +331,11 @@ contract KaliBerger is Storage {
collectPatronage(token, tokenId)
onlyOwner(token, tokenId)
{
if (this.getDeposit(token, tokenId) >= amount) {
(bool success,) = msg.sender.call{value: amount}("");
if (!success) revert TransferFailed();
if (amount > this.getDeposit(token, tokenId)) revert InvalidExit();
(bool success,) = msg.sender.call{value: amount}("");
if (!success) addUnclaimed(msg.sender, amount);

subDeposit(token, tokenId, amount);
} else {
revert InvalidExit();
}
subDeposit(token, tokenId, amount);
}

/// -----------------------------------------------------------------------
Expand Down

0 comments on commit f7707c4

Please sign in to comment.