validateCurrentIndicesForFunds method
Validate that the supplied fellowship, contract 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
contract A String label of the contract to validate with
someState The optional state index to validate with. If not provided, the next state for the given fellowship
and contract pair will be used
Returns the indices for the given fellowship, contract 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);
}