Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
SpontaneousOverthrow committed Nov 21, 2023
1 parent d940e44 commit d4551e6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
4 changes: 2 additions & 2 deletions cmd/convert/input.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,14 @@ func input(ctx context.Context) (*dataIn, error) {
utils.Log.Debug().Msgf("init %s as input store", viper.GetString("input.wallet.type"))
data.InputS, err = store.InputStoreInit(ctx, viper.GetString("input.wallet.type"))
if err != nil {
return nil, errors.New("failed to parse and init input config section")
return nil, err
}

//Parse Output Config
utils.Log.Debug().Msgf("init %s as output store", viper.GetString("output.wallet.type"))
data.OutputS, err = store.OutputStoreInit(ctx, viper.GetString("output.wallet.type"))
if err != nil {
return nil, errors.New("failed to parse and init output config section")
return nil, err
}

return data, nil
Expand Down
9 changes: 6 additions & 3 deletions utils/store/distributed.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ import (

type Peers map[uint64]Peer
type Peer struct {
Name string
Passprhrases struct {
Name string
Passphrases struct {
Path string
Index int
}
Expand Down Expand Up @@ -203,10 +203,13 @@ func newDistributedStore(t string) (DistributedStore, error) {

// Parse Peers Passphrases
for id, peer := range peers {
s.Peers = map[uint64]string{}
s.PeersPasswords = map[uint64][][]byte{}
//Parse Passphrases
utils.Log.Debug().Msgf("getting passhphrases for peers %s", peer.Name)
passphrases, err := getAccountsPasswords(peer.Passprhrases.Path)
passphrases, err := getAccountsPasswords(peer.Passphrases.Path)
if err != nil {
fmt.Println(err)
return s, err
}
utils.Log.Debug().Msgf("checking passhphrases len: %d for peers %s", len(passphrases), peer.Name)
Expand Down

0 comments on commit d4551e6

Please sign in to comment.