Skip to content

Commit

Permalink
Use sdk context
Browse files Browse the repository at this point in the history
Signed-off-by: Dongri Jin <[email protected]>
  • Loading branch information
dongrie committed Mar 7, 2024
1 parent ac15be5 commit a0ff8fe
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion chains/tendermint/chain.go
Original file line number Diff line number Diff line change
Expand Up @@ -508,11 +508,14 @@ func (c *Chain) UseSDKContext() func() {

// CLIContext returns an instance of client.Context derived from Chain
func (c *Chain) CLIContext(height int64) sdkCtx.Context {
unlock := c.UseSDKContext()
txConfig := authtx.NewTxConfig(c.codec, authtx.DefaultSignModes)
unlock()
return sdkCtx.Context{}.
WithChainID(c.config.ChainId).
WithCodec(c.codec).
WithInterfaceRegistry(c.codec.InterfaceRegistry()).
WithTxConfig(authtx.NewTxConfig(c.codec, authtx.DefaultSignModes)).
WithTxConfig(txConfig).
WithInput(os.Stdin).
WithNodeURI(c.config.RpcAddr).
WithClient(c.Client).
Expand Down

0 comments on commit a0ff8fe

Please sign in to comment.