From e40c8fe49c25c3a119223f7aafeb8c677e95db5d Mon Sep 17 00:00:00 2001 From: Maikol <86025070+Maikol@users.noreply.github.com> Date: Tue, 8 Oct 2024 01:03:45 +1100 Subject: [PATCH] fix(Horizon): withdraw delegation with beneficiary test fix (#1057) * fix(Horizon): withdraw delegation with beneficiary test fix * fix: skip addresses that will overflow --- packages/horizon/test/staking/delegation/withdraw.t.sol | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/horizon/test/staking/delegation/withdraw.t.sol b/packages/horizon/test/staking/delegation/withdraw.t.sol index 866f49942..b7644c62a 100644 --- a/packages/horizon/test/staking/delegation/withdraw.t.sol +++ b/packages/horizon/test/staking/delegation/withdraw.t.sol @@ -179,6 +179,8 @@ contract HorizonStakingWithdrawDelegationTest is HorizonStakingTest { useDelegation(delegationAmount) { vm.assume(beneficiary != address(0)); + // Skip beneficiary if balance will overflow + vm.assume(token.balanceOf(beneficiary) < type(uint256).max - delegationAmount); // Delegator undelegates to beneficiary resetPrank(users.delegator);