getDelegations static method

Future<List<Object>> getDelegations(
  1. bool isLocal,
  2. String canisterId
)

Implementation

static Future<List<Object>> getDelegations(
    bool isLocal, String canisterId) async {
  String? pubKey = await SecureStore.readSecureData("pubKey");
  String? privKey = await SecureStore.readSecureData("privKey");
  String? delegation = await SecureStore.readSecureData("delegation");

  if (pubKey == null || privKey == null || delegation == null) {
    return [false];
  } else {
    var validatedDelegationValues =
        await DelegationValidation.validateDelegation(
            isLocal, canisterId, pubKey, privKey, delegation);
    log("Validated Values, $validatedDelegationValues");

    return validatedDelegationValues;
  }
}