Skip to content

Commit

Permalink
fix juno import
Browse files Browse the repository at this point in the history
  • Loading branch information
MonikaCat committed Dec 27, 2023
1 parent 5d0ba74 commit 9e0702a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions modules/messages/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@ func parseAddressesFromEvents(tx *types.Tx) []string {
for _, event := range tx.Events {
for _, attribute := range event.Attributes {
// Try parsing the address as a validator address
validatorAddress, _ := sdk.ValAddressFromBech32(attribute.Value)
validatorAddress, _ := sdk.ValAddressFromBech32(string(attribute.Value))
if validatorAddress != nil {
addresses = append(addresses, validatorAddress.String())
}

// Try parsing the address as an account address
accountAddress, err := sdk.AccAddressFromBech32(attribute.Value)
accountAddress, err := sdk.AccAddressFromBech32(string(attribute.Value))
if err != nil {
// Skip if the address is not an account address
continue
Expand Down
2 changes: 1 addition & 1 deletion modules/messages/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package messages
import (
"unicode/utf8"

"github.com/forbole/juno/v5/types"
"github.com/forbole/juno/v4/types"
)

func TrimLastChar(s string) string {
Expand Down

0 comments on commit 9e0702a

Please sign in to comment.