Skip to content

Commit

Permalink
command fix
Browse files Browse the repository at this point in the history
  • Loading branch information
dusannosovic-ethernal authored and Stefan-Ethernal committed Nov 28, 2023
1 parent db9e2b6 commit cc9c504
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions command/validator/unstake/unstake.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ func runCommand(cmd *cobra.Command, _ []string) error {
txn := &ethgo.Transaction{
From: validatorAccount.Ecdsa.Address(),
Input: encoded,
To: (*ethgo.Address)(&contracts.EpochManagerContract),
To: (*ethgo.Address)(&contracts.StakeManagerContract),
}

receipt, err := txRelayer.SendTransaction(txn, validatorAccount.Ecdsa)
Expand All @@ -103,8 +103,8 @@ func runCommand(cmd *cobra.Command, _ []string) error {
}

var (
withdrawalRegisteredEvent contractsapi.StakeRemovedEvent
foundLog bool
stakeRemovedEvent contractsapi.StakeRemovedEvent
foundLog bool
)

result := &unstakeResult{
Expand All @@ -113,14 +113,14 @@ func runCommand(cmd *cobra.Command, _ []string) error {

// check the logs to check for the result
for _, log := range receipt.Logs {
doesMatch, err := withdrawalRegisteredEvent.ParseLog(log)
doesMatch, err := stakeRemovedEvent.ParseLog(log)
if err != nil {
return err
}

if doesMatch {
foundLog = true
result.Amount = withdrawalRegisteredEvent.Amount.Uint64()
result.Amount = stakeRemovedEvent.Amount.Uint64()

break
}
Expand Down

0 comments on commit cc9c504

Please sign in to comment.