Skip to content

Commit

Permalink
Tiny fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
SpontaneousOverthrow committed Nov 20, 2023
1 parent dcdb6fc commit 20f49e1
Show file tree
Hide file tree
Showing 9 changed files with 125 additions and 714 deletions.
2 changes: 1 addition & 1 deletion cmd/convert/input.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ func (d *dataIn) validate() error {
return errors.New("timeout is required")
}

if d.InputS.GetType() == d.OutputS.Type() {
if d.InputS.GetType() == d.OutputS.GetType() {
return errors.New("timeout is required")
}

Expand Down
10 changes: 7 additions & 3 deletions cmd/convert/process.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,21 +21,25 @@ func process(ctx context.Context, data *dataIn) error {
// Convert Wallets
eg := errgroup.Group{}

for wName, aNames := range iStore.GetWalletsAccountsMap() {
walletsMap, err := iStore.GetWalletsAccountsMap()
if err != nil {
return err
}
for wName, aNames := range walletsMap {
eg.Go(func() error {
// Create Wallet In Output Store
err := oStore.CreateWallet(wName)
if err != nil {
return err
}
for aName := range aNames {
for _, aName := range aNames {
// Get Private Key From Account
pk, err := iStore.GetPK(wName, aName)
if err != nil {
return err
}
// Save Private Key To Output Store
err = oStore.SaveAccToWallet(wName, pk, aName)
err = oStore.SavePKToWallet(wName, pk, aName)
if err != nil {
return err
}
Expand Down
66 changes: 37 additions & 29 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,54 +3,62 @@ module github.com/p2p-org/dkc
go 1.19

require (
github.com/google/uuid v1.3.0
github.com/herumi/bls-eth-go-binary v1.29.1
github.com/google/uuid v1.4.0
github.com/herumi/bls-eth-go-binary v1.32.1
github.com/pkg/errors v0.9.1
github.com/rs/zerolog v1.29.1
github.com/spf13/cobra v1.7.0
github.com/spf13/viper v1.15.0
github.com/wealdtech/go-eth2-types/v2 v2.8.1
github.com/wealdtech/go-eth2-wallet v1.15.1
github.com/wealdtech/go-eth2-wallet-store-filesystem v1.17.1
github.com/wealdtech/go-eth2-wallet-types/v2 v2.10.1
github.com/rs/zerolog v1.31.0
github.com/spf13/cobra v1.8.0
github.com/spf13/viper v1.17.0
github.com/wealdtech/go-eth2-types/v2 v2.8.2
github.com/wealdtech/go-eth2-wallet v1.16.0
github.com/wealdtech/go-eth2-wallet-store-filesystem v1.18.1
github.com/wealdtech/go-eth2-wallet-types/v2 v2.11.0
golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa
golang.org/x/sync v0.5.0
)

require (
github.com/aws/aws-sdk-go v1.44.261 // indirect
github.com/aws/aws-sdk-go v1.48.0 // indirect
github.com/ferranbt/fastssz v0.1.3 // indirect
github.com/fsnotify/fsnotify v1.6.0 // indirect
github.com/fsnotify/fsnotify v1.7.0 // indirect
github.com/gofrs/uuid v4.4.0+incompatible // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/jmespath/go-jmespath v0.4.0 // indirect
github.com/klauspost/cpuid/v2 v2.2.4 // indirect
github.com/klauspost/cpuid/v2 v2.2.6 // indirect
github.com/magiconair/properties v1.8.7 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.18 // indirect
github.com/minio/sha256-simd v1.0.0 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/minio/sha256-simd v1.0.1 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/pelletier/go-toml/v2 v2.0.7 // indirect
github.com/pelletier/go-toml/v2 v2.1.0 // indirect
github.com/phoreproject/bls v0.0.0-20191211001008-9d5f85bf4a9b // indirect
github.com/sagikazarmark/locafero v0.3.0 // indirect
github.com/sagikazarmark/slog-shim v0.1.0 // indirect
github.com/shibukawa/configdir v0.0.0-20170330084843-e180dbdc8da0 // indirect
github.com/spf13/afero v1.9.5 // indirect
github.com/spf13/cast v1.5.0 // indirect
github.com/sourcegraph/conc v0.3.0 // indirect
github.com/spf13/afero v1.10.0 // indirect
github.com/spf13/cast v1.5.1 // indirect
github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/subosito/gotenv v1.4.2 // indirect
github.com/subosito/gotenv v1.6.0 // indirect
github.com/wealdtech/go-bytesutil v1.2.1 // indirect
github.com/wealdtech/go-ecodec v1.1.3 // indirect
github.com/wealdtech/go-ecodec v1.1.4 // indirect
github.com/wealdtech/go-eth2-types v1.0.0 // indirect
github.com/wealdtech/go-eth2-util v1.8.1 // indirect
github.com/wealdtech/go-eth2-wallet-distributed v1.1.5 // indirect
github.com/wealdtech/go-eth2-wallet-encryptor-keystorev4 v1.3.1 // indirect
github.com/wealdtech/go-eth2-wallet-hd/v2 v2.6.1 // indirect
github.com/wealdtech/go-eth2-wallet-nd/v2 v2.4.1 // indirect
github.com/wealdtech/go-eth2-wallet-store-s3 v1.11.3 // indirect
github.com/wealdtech/go-eth2-util v1.8.2 // indirect
github.com/wealdtech/go-eth2-wallet-distributed v1.2.1 // indirect
github.com/wealdtech/go-eth2-wallet-encryptor-keystorev4 v1.4.1 // indirect
github.com/wealdtech/go-eth2-wallet-hd/v2 v2.7.0 // indirect
github.com/wealdtech/go-eth2-wallet-nd/v2 v2.5.0 // indirect
github.com/wealdtech/go-eth2-wallet-store-s3 v1.12.0 // indirect
github.com/wealdtech/go-eth2-wallet-store-scratch v1.7.2 // indirect
github.com/wealdtech/go-eth2-wallet-types v1.10.0 // indirect
github.com/wealdtech/go-indexer v1.0.1 // indirect
golang.org/x/crypto v0.9.0 // indirect
golang.org/x/sys v0.8.0 // indirect
golang.org/x/text v0.9.0 // indirect
github.com/wealdtech/go-indexer v1.1.0 // indirect
go.uber.org/atomic v1.11.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
golang.org/x/crypto v0.15.0 // indirect
golang.org/x/sys v0.14.0 // indirect
golang.org/x/text v0.14.0 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
Expand Down
Loading

0 comments on commit 20f49e1

Please sign in to comment.