diff --git a/cli/filplus.go b/cli/filplus.go index b8e887498..7b876ea32 100644 --- a/cli/filplus.go +++ b/cli/filplus.go @@ -1311,21 +1311,6 @@ func CreateExtendClaimMsg(ctx context.Context, api api.FullNode, pcm map[verifre } if len(newClaims) > 0 { - // Get datacap balance - aDataCap, err := api.StateVerifiedClientStatus(ctx, wallet, types.EmptyTSK) - if err != nil { - return nil, err - } - - if aDataCap == nil { - return nil, xerrors.Errorf("wallet %s does not have any datacap", wallet) - } - - // Check that we have enough data cap to make the allocation - if rDataCap.GreaterThan(big.NewInt(aDataCap.Int64())) { - return nil, xerrors.Errorf("requested datacap %s is greater then the available datacap %s", rDataCap, aDataCap) - } - if !assumeYes { out := fmt.Sprintf("Some of the specified allocation have a different client address and will require %d Datacap to extend. Proceed? Yes [Y/y] / No [N/n], Ctrl+C (^C) to exit", rDataCap.Int) validate := func(input string) error { @@ -1361,6 +1346,21 @@ func CreateExtendClaimMsg(ctx context.Context, api api.FullNode, pcm map[verifre } } + // Get datacap balance + aDataCap, err := api.StateVerifiedClientStatus(ctx, wallet, types.EmptyTSK) + if err != nil { + return nil, err + } + + if aDataCap == nil { + return nil, xerrors.Errorf("wallet %s does not have any datacap", wallet) + } + + // Check that we have enough data cap to make the allocation + if rDataCap.GreaterThan(big.NewInt(aDataCap.Int64())) { + return nil, xerrors.Errorf("requested datacap %s is greater then the available datacap %s", rDataCap, aDataCap) + } + // Create a map of just keys, so we can easily batch based on the numeric keys keys := make([]verifregtypes13.ClaimExtensionRequest, 0, len(newClaims)) for k := range newClaims {