Skip to content

Commit

Permalink
feat(client): Add cobra's context to clientCtx (cosmos#15458)
Browse files Browse the repository at this point in the history
Co-authored-by: Facundo Medica <14063057+facundomedica@users.noreply.github.com>
  • Loading branch information
amaury1093 and facundomedica committed Mar 20, 2023
1 parent fa89eec commit 48d4e5e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 1 addition & 0 deletions simd/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ func NewRootCmd() *cobra.Command {
cmd.SetOut(cmd.OutOrStdout())
cmd.SetErr(cmd.ErrOrStderr())

initClientCtx = initClientCtx.WithCmdContext(cmd.Context())
initClientCtx, err := client.ReadPersistentCommandFlags(initClientCtx, cmd.Flags())
if err != nil {
return err
Expand Down
4 changes: 1 addition & 3 deletions simd/cmd/testnet.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package cmd

import (
"bufio"
"context"
"encoding/json"
"fmt"
"net"
Expand Down Expand Up @@ -324,8 +323,7 @@ func initTestnetFiles(
WithKeybase(kb).
WithTxConfig(clientCtx.TxConfig)

// When Textual is wired up, the context argument should be retrieved from the client context.
if err := tx.Sign(context.TODO(), txFactory, nodeDirName, txBuilder, true); err != nil {
if err := tx.Sign(cmd.Context(), txFactory, nodeDirName, txBuilder, true); err != nil {
return err
}

Expand Down

0 comments on commit 48d4e5e

Please sign in to comment.