How to make two cases of initialization?

I initialize user canister (canister installed specifically for the current user) this way:

persistent actor class Wallet({
    user: Principal;
    backend: Principal;
    installationId: Nat;
}) = this {

I want to re-use the same Wallet code for a regular (not user canister) installation. But then there is no values such as installationId. So, I don’t know how to initialize it.

I could do like the following:

persistent actor class Wallet(?{
    user: Principal;
    backend: Principal;
    installationId: Nat;
}) = this {

but this complicates my specification (standard) of initializing user canisters.

Is there a better way? maybe something related to to_candid/from_candid.

You can make the init args a variant, e.g. in candid:

variant InitArg {
  Regular : RegularInitArg;
  User : UserInitArg;
}

type RegularInitArg {}

type UserInitArg {
  user : principal;
  backend : principal;
  installationId : nat;
}

I need to standardize this for all user canisters. It’s not clear how to do that.