resolve method

Future<Account?> resolve(
  1. PersonalMethods client
)

Resolve account

Returns resolved account or null if account is not found. Current instance turns into a proxy for the resolved instance.

You need to provide client with PersonalMethods mixin support (e.g. MonoAPI to resolve account.

Implementation

Future<Account?> resolve(PersonalMethods client) async {
  final e = await client.clientInfo();

  for (final a in e.accounts) {
    if (a.id == id) {
      originalAccount = a;
      return a;
    }
  }

  return null;
}