Skip to content

Commit

Permalink
fee not required
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanchristo committed Feb 11, 2022
1 parent 345e148 commit 932bfcf
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 6 deletions.
10 changes: 6 additions & 4 deletions x/ecocredit/client/basket/tx_create.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,13 +153,16 @@ Flags:
}
}

fee := sdk.Coins{}
feeString, err := cmd.Flags().GetString(FlagBasketFee)
if err != nil {
return err
}
fee, err := sdk.ParseCoinsNormalized(feeString)
if err != nil {
return fmt.Errorf("failed to parse basket_fee: %w", err)
if feeString != "" {
fee, err = sdk.ParseCoinsNormalized(feeString)
if err != nil {
return fmt.Errorf("failed to parse basket_fee: %w", err)
}
}

msg := basket.MsgCreate{
Expand Down Expand Up @@ -199,7 +202,6 @@ Flags:
cmd.MarkFlagRequired(FlagExponent)
cmd.MarkFlagRequired(FlagCreditTypeName)
cmd.MarkFlagRequired(FlagAllowedClasses)
cmd.MarkFlagRequired(FlagBasketFee)

return cmd
}
5 changes: 5 additions & 0 deletions x/ecocredit/server/testsuite/basket.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package testsuite

func (s *IntegrationTestSuite) TestBasket() {

}
6 changes: 4 additions & 2 deletions x/ecocredit/server/testsuite/suite.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package testsuite

import (
"context"
"github.com/regen-network/regen-ledger/x/ecocredit/server/basket"
"time"

"github.com/regen-network/regen-ledger/types/testutil"
Expand Down Expand Up @@ -30,8 +31,9 @@ type IntegrationTestSuite struct {
paramsQueryClient params.QueryClient
signers []sdk.AccAddress

paramSpace paramstypes.Subspace
bankKeeper bankkeeper.Keeper
paramSpace paramstypes.Subspace
bankKeeper bankkeeper.Keeper
basketKeeper basket.Keeper

genesisCtx types.Context
blockTime time.Time
Expand Down

0 comments on commit 932bfcf

Please sign in to comment.