fixed conflicting password issue

This commit is contained in:
afeiszli
2021-04-07 09:39:40 -04:00
parent 0627810111
commit 0ad06984e6
4 changed files with 76 additions and 60 deletions

View File

@@ -42,13 +42,14 @@ func AutoLogin(client nodepb.NodeServiceClient, network string) error {
//home, err := os.UserHomeDir()
home := "/etc/netclient"
//nodecfg := config.Config.Node
config, err := config.ReadConfig(network)
cfg, err := config.ReadConfig(network)
if err != nil {
return err
}
login := &nodepb.LoginRequest{
Password: config.Node.Password,
Macaddress: config.Node.MacAddress,
Password: cfg.Node.Password,
Macaddress: cfg.Node.MacAddress,
Network: network,
}
// RPC call
res, err := client.Login(context.TODO(), login)