validateCurrentIndicesForFunds method

  1. @override
Either<String, Indices> validateCurrentIndicesForFunds(
  1. String fellowship,
  2. String contract,
  3. int? someState
)

Validate that the supplied fellowship, template and optional state exist and are associated with each other in the current wallet state

fellowship A String label of the fellowship to validate with template A String label of the template to validate with someState The optional state index to validate with. If not provided, the next state for the given fellowship and template pair will be used Returns the indices for the given fellowship, template and optional state if valid. If not, the relevant errors

Implementation

@override
Either<String, Indices> validateCurrentIndicesForFunds(
    String fellowship, String contract, int? someState) {
  // ignore: unused_local_variable
  final p = validateFellowship(fellowship);
  // ignore: unused_local_variable
  final c = validateContract(contract);
  final indices = getCurrentIndicesForFunds(fellowship, contract, someState);

  if (indices == null) return Either.left('Indices not found');
  return Either.right(indices);
}