Skip to content

Commit

Permalink
fix: transferPackage
Browse files Browse the repository at this point in the history
  • Loading branch information
j75689 committed Jan 12, 2024
1 parent ac6bc76 commit d9499f0
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions x/stake/keeper/delegation.go
Original file line number Diff line number Diff line change
Expand Up @@ -890,12 +890,15 @@ func (k Keeper) crossDistributeUndelegated(ctx sdk.Context, delAddr sdk.AccAddre
}

transferPackage := types.CrossStakeDistributeUndelegatedSynPackage{
EventType: types.CrossStakeTypeDistributeUndelegated,
Amount: bscTransferAmount,
Recipient: recipient,
Validator: valAddr,
IsAutoUnDelegate: k.IsAutoUnDelegate(ctx, delAddr, valAddr),
EventType: types.CrossStakeTypeDistributeUndelegated,
Amount: bscTransferAmount,
Recipient: recipient,
Validator: valAddr,
}
if sdk.IsUpgrade(sdk.SecondSunsetFork) {
transferPackage.IsAutoUnDelegate = k.IsAutoUnDelegate(ctx, delAddr, valAddr)
}

encodedPackage, err := rlp.EncodeToBytes(transferPackage)
if err != nil {
return sdk.Events{}, sdk.ErrInternal(err.Error())
Expand Down

0 comments on commit d9499f0

Please sign in to comment.