Skip to content

Commit

Permalink
fix: decode string
Browse files Browse the repository at this point in the history
  • Loading branch information
shaspitz committed Jul 8, 2024
1 parent 709150f commit f8e0ac6
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion p2p/pkg/rpc/provider/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,12 @@ func (s *Service) RegisterStake(
}
opts.Value = amount

tx, err := s.registryContract.RegisterAndStake(opts, []byte(stake.BlsPublicKey))
blsPubkeyBytes, err := hex.DecodeString(stake.BlsPublicKey)
if err != nil {
return nil, status.Errorf(codes.InvalidArgument, "decoding bls public key: %v", err)
}

tx, err := s.registryContract.RegisterAndStake(opts, blsPubkeyBytes)
if err != nil {
return nil, status.Errorf(codes.Internal, "registering stake: %v", err)
}
Expand Down

0 comments on commit f8e0ac6

Please sign in to comment.