Skip to content

Commit

Permalink
Checking if From is missing
Browse files Browse the repository at this point in the history
  • Loading branch information
tmrlvi committed Mar 3, 2022
1 parent 2f322d8 commit 607d6ee
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions cmd/kaspawallet/daemon/server/create_unsigned_transaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,12 @@ func (s *server) CreateUnsignedTransaction(_ context.Context, request *pb.Create
return nil, err
}

var fromAddress util.Address
fromAddress, err = util.DecodeAddress(request.From, s.params.Prefix)
if err != nil {
return nil, err
var fromAddress util.Address = nil
if request.From != "" {
fromAddress, err = util.DecodeAddress(request.From, s.params.Prefix)
if err != nil {
return nil, err
}
}

// TODO: Implement a better fee estimation mechanism
Expand Down

0 comments on commit 607d6ee

Please sign in to comment.