diff --git a/cmd/kaspawallet/send.go b/cmd/kaspawallet/send.go index 9f4616c65..c4f371b32 100644 --- a/cmd/kaspawallet/send.go +++ b/cmd/kaspawallet/send.go @@ -65,7 +65,12 @@ func send(conf *sendConfig) error { fmt.Printf("Broadcasting %d transactions\n", len(signedTransactions)) } - response, err := daemonClient.Broadcast(ctx, &pb.BroadcastRequest{Transactions: signedTransactions}) + // Since we waited for user input when getting the password, which could take unbound amount of time - + // create a new context for broadcast, to reset the timeout. + broadcastCtx, broadcastCancel := context.WithTimeout(context.Background(), daemonTimeout) + defer broadcastCancel() + + response, err := daemonClient.Broadcast(broadcastCtx, &pb.BroadcastRequest{Transactions: signedTransactions}) if err != nil { return err }