ui/shared/src/main/java/com/squareup/subzero/shared/SubzeroUtils.java
public static void validateCommandRequest(CommandRequest request)
      throws VerificationException, IllegalArgumentException {
    switch (request.getCommandCase()) {
      case INITWALLET:
        // We don't need to validate anything.
        break;
      case FINALIZEWALLET:
        validateFinalizeWalletCommandRequest(request.getFinalizeWalletOrThrow());
        break;
      case SIGNTX:
        CommandRequest.SignTxRequest signRequest = request.getSignTxOrThrow();
        validateSignTxCommandRequest(signRequest);
        validateFees(signRequest);
        break;
      default:
        throw new IllegalStateException("unreachable");
    }
  }
/**
   * Verifies size/count limits for CommandRequest proto fields
   * @param request CommandRequest to validate
   * @throws VerificationException if limits are exceeded
   * @throws IllegalArgumentException if CommandRequest doesn't contain matching message
   */
Verifies size/count limits for CommandRequest proto fields
@param request CommandRequest to validate
@throws VerificationException if limits are exceeded
@throws IllegalArgumentException if CommandRequest doesn't contain matching message
Verifies size / count limits for CommandRequest proto fields @param request CommandRequest to validate @throws VerificationException if limits are exceeded @throws IllegalArgumentException if CommandRequest doesn ' t contain matching message
public static void validateCommandRequest(CommandRequest request)
      throws VerificationException, IllegalArgumentException {
    switch (request.getCommandCase()) {
      case INITWALLET:
        break;
      case FINALIZEWALLET:
        validateFinalizeWalletCommandRequest(request.getFinalizeWalletOrThrow());
        break;
      case SIGNTX:
        CommandRequest.SignTxRequest signRequest = request.getSignTxOrThrow();
        validateSignTxCommandRequest(signRequest);
        validateFees(signRequest);
        break;
      default:
        throw new IllegalStateException("unreachable");
    }
  }
public static void validateCommandRequest ( CommandRequest request ) throws VerificationException , IllegalArgumentException { switch ( request . getCommandCase ( ) ) { case INITWALLET : break ; case FINALIZEWALLET : validateFinalizeWalletCommandRequest ( request . getFinalizeWalletOrThrow ( ) ) ; break ; case SIGNTX : CommandRequest . SignTxRequest signRequest = request . getSignTxOrThrow ( ) ; validateSignTxCommandRequest ( signRequest ) ; validateFees ( signRequest ) ; break ; default : throw new IllegalStateException ( "unreachable" ) ; } }
Verifies size/count limits for CommandRequest proto fields
 @param request CommandRequest to validate
 @throws VerificationException if limits are exceeded
 @throws IllegalArgumentException if CommandRequest doesn't contain matching message
Verifies size / count limits for CommandRequest proto fields @param request CommandRequest to validate @throws VerificationException if limits are exceeded @throws IllegalArgumentException if CommandRequest doesn ' t contain matching message
// We don't need to validate anything.