Skip to content

Commit

Permalink
chore: Remove unused actions
Browse files Browse the repository at this point in the history
  • Loading branch information
OnedgeLee committed Jan 5, 2025
1 parent 7028560 commit 6328d39
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 129 deletions.
2 changes: 1 addition & 1 deletion .Lib9c.Tests/Action/StakeTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,7 @@ public void Execute_Success_When_Validator_Tries_To_Increase_Amount_Without_Clai
Assert.Equal(3, nextStakeState.StateVersion);
}

world = DelegationUtil.EnsureValidatorUnbondedClaimed(
world = DelegationUtil.EnsureUnbondedClaimed(
nextState, _agentAddr, height + interval + ValidatorDelegatee.ValidatorUnbondingPeriod);

var expectedBalance = _ncg * Math.Max(0, previousAmount - amount);
Expand Down
19 changes: 0 additions & 19 deletions .Lib9c.Tests/Util/DelegationUtil.cs
Original file line number Diff line number Diff line change
Expand Up @@ -109,24 +109,5 @@ public static IWorld EnsureUnbondedClaimed(
return claimUnbonded.Execute(actionContext);
return world;
}

public static IWorld EnsureValidatorUnbondedClaimed(
IWorld world, Address agentAddress, long blockHeight)
{
if (blockHeight < 0)
{
throw new ArgumentOutOfRangeException(nameof(blockHeight));
}

var actionContext = new ActionContext
{
PreviousState = world,
Signer = agentAddress,
BlockIndex = blockHeight,
};
var claimUnbonded = new ClaimValidatorUnbonded();
return claimUnbonded.Execute(actionContext);
return world;
}
}
}
53 changes: 0 additions & 53 deletions Lib9c/Action/Guild/ClaimGuildUnbonded.cs

This file was deleted.

7 changes: 4 additions & 3 deletions Lib9c/Action/Guild/ClaimUnbonded.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@

namespace Nekoyume.Action.Guild
{
/// <summary>
/// An action to claim unbonded assets.
/// This action can be executed only when the unbonding period is over.
/// </summary>
[ActionType(TypeIdentifier)]
public sealed class ClaimUnbonded : ActionBase
{
Expand Down Expand Up @@ -34,9 +38,6 @@ public override IWorld Execute(IActionContext context)

var world = context.PreviousState;
var repository = new GuildRepository(world, context);

var guildParticipant = repository.GetGuildParticipant(context.Signer);
var guild = repository.GetGuild(guildParticipant.GuildAddress);
var guildDelegator = repository.GetDelegator(context.Signer);
guildDelegator.ReleaseUnbondings(context.BlockIndex);

Expand Down
53 changes: 0 additions & 53 deletions Lib9c/Action/ValidatorDelegation/ClaimValidatorUnbonded.cs

This file was deleted.

0 comments on commit 6328d39

Please sign in to comment.