From 60e838dfddf23302ccc3b99c6eba35395d3ad1a2 Mon Sep 17 00:00:00 2001 From: El De-dog-lo <3859395+fubuloubu@users.noreply.github.com> Date: Thu, 3 Aug 2023 17:16:41 -0400 Subject: [PATCH] feat: allow anyone to claim (#10) --- contracts/VestingEscrowSimple.vy | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/contracts/VestingEscrowSimple.vy b/contracts/VestingEscrowSimple.vy index af50352..5934af8 100644 --- a/contracts/VestingEscrowSimple.vy +++ b/contracts/VestingEscrowSimple.vy @@ -139,7 +139,8 @@ def claim(beneficiary: address = msg.sender, amount: uint256 = MAX_UINT256): @param beneficiary Address to transfer claimed tokens to @param amount Amount of tokens to claim """ - assert msg.sender == self.recipient # dev: not recipient + recipient: address = self.recipient + assert msg.sender == recipient or recipient == beneficiary # dev: not authorized claim_period_end: uint256 = min(block.timestamp, self.disabled_at) claimable: uint256 = min(self._unclaimed(claim_period_end), amount)