Skip to content

Commit 9f37b06

Browse files
committed
feat: add shares to TokensUndelegated
1 parent d3a13cb commit 9f37b06

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

packages/horizon/contracts/interfaces/internal/IHorizonStakingMain.sol

+3-1
Original file line numberDiff line numberDiff line change
@@ -186,12 +186,14 @@ interface IHorizonStakingMain {
186186
* @param verifier The address of the verifier
187187
* @param delegator The address of the delegator
188188
* @param tokens The amount of tokens undelegated
189+
* @param tokens The amount of shares undelegated
189190
*/
190191
event TokensUndelegated(
191192
address indexed serviceProvider,
192193
address indexed verifier,
193194
address indexed delegator,
194-
uint256 tokens
195+
uint256 tokens,
196+
uint256 shares
195197
);
196198

197199
/**

packages/horizon/contracts/staking/HorizonStaking.sol

+1-1
Original file line numberDiff line numberDiff line change
@@ -939,7 +939,7 @@ contract HorizonStaking is HorizonStakingBase, IHorizonStakingMain {
939939
pool.thawingNonce
940940
);
941941

942-
emit TokensUndelegated(_serviceProvider, _verifier, msg.sender, tokens);
942+
emit TokensUndelegated(_serviceProvider, _verifier, msg.sender, tokens, _shares);
943943
return thawRequestId;
944944
}
945945

packages/horizon/test/shared/horizon-staking/HorizonStakingShared.t.sol

+1-1
Original file line numberDiff line numberDiff line change
@@ -1010,7 +1010,7 @@ abstract contract HorizonStakingSharedTest is GraphBaseTest {
10101010
calcValues.thawRequestId
10111011
);
10121012
vm.expectEmit();
1013-
emit IHorizonStakingMain.TokensUndelegated(serviceProvider, verifier, delegator, calcValues.tokens);
1013+
emit IHorizonStakingMain.TokensUndelegated(serviceProvider, verifier, delegator, calcValues.tokens, shares);
10141014
if (legacy) {
10151015
staking.undelegate(serviceProvider, shares);
10161016
} else if (thawRequestType == IHorizonStakingTypes.ThawRequestType.Delegation) {

0 commit comments

Comments
 (0)