Move client context initialization from viper to separate package

This commit is contained in:
Christopher Goes
2018-04-03 22:16:03 +02:00
parent 0888096677
commit 7214149f1d
19 changed files with 67 additions and 68 deletions
+3 -3
View File
@@ -8,7 +8,7 @@ import (
"github.com/spf13/viper"
"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/client/core"
"github.com/cosmos/cosmos-sdk/client/context"
"github.com/cosmos/cosmos-sdk/wire"
"github.com/cosmos/cosmos-sdk/examples/democoin/x/cool"
@@ -24,7 +24,7 @@ func QuizTxCmd(cdc *wire.Codec) *cobra.Command {
return errors.New("You must provide an answer")
}
ctx := core.NewCoreContextFromViper()
ctx := context.NewCoreContextFromViper()
// get the from address from the name flag
from, err := ctx.GetFromAddress()
@@ -60,7 +60,7 @@ func SetTrendTxCmd(cdc *wire.Codec) *cobra.Command {
return errors.New("You must provide an answer")
}
ctx := core.NewCoreContextFromViper()
ctx := context.NewCoreContextFromViper()
// get the from address from the name flag
from, err := ctx.GetFromAddress()