Skip to content

Commit

Permalink
fix: test keyring cleanup must be skipped on first start
Browse files Browse the repository at this point in the history
  • Loading branch information
shahbazn committed Dec 1, 2022
1 parent 91f88f7 commit eaaf552
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg/faucet/cosmosfaucet.go
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ func (f Faucet) TotalTransferredAmount(req TransferRequest) (coinsTransferred ma
}

func (f Faucet) Transfer(req TransferRequest) error {
//TODO: Add checks from when transfer fails with error code 0 e.g. when using a wrong denom
// init variables
command := []string{}
txStepOptions := []step.Option{}
Expand Down Expand Up @@ -220,7 +221,9 @@ func JSONEnsuredBytes(bytes []byte) ([]byte, error) {

func (f *Faucet) ResetTestKeyring(dir string) error {
d, err := os.Open(dir)
if err != nil {
if os.IsNotExist(err) {
return nil
} else if err != nil {
return err
}
defer d.Close()
Expand Down

0 comments on commit eaaf552

Please sign in to comment.