Skip to content

Commit

Permalink
fix error
Browse files Browse the repository at this point in the history
  • Loading branch information
neitdung committed Jan 15, 2025
1 parent 0c3fc71 commit 490c447
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions modules/multistaking/handle_msg.go
Original file line number Diff line number Diff line change
Expand Up @@ -197,15 +197,16 @@ func (m *Module) UpdateUnlockToken(height int64, stakerAddr string, valAddr stri
total[denom] = value.Add(amount)
}
}

for _, entry := range unlock.Entries {
denom := entry.UnlockingCoin.Denom
amount := entry.UnlockingCoin.Amount
value, exists := total[denom]
if !exists {
total[denom] = amount
} else {
total[denom] = value.Add(amount)
if unlock != nil {
for _, entry := range unlock.Entries {
denom := entry.UnlockingCoin.Denom
amount := entry.UnlockingCoin.Amount
value, exists := total[denom]
if !exists {
total[denom] = amount
} else {
total[denom] = value.Add(amount)
}
}
}

Expand Down

0 comments on commit 490c447

Please sign in to comment.