constantly recheck on home screen if not registered
This commit is contained in:
@@ -1,9 +1,15 @@
|
||||
import { Axios, AxiosResponse, RawAxiosRequestHeaders } from "axios";
|
||||
import {
|
||||
Axios,
|
||||
AxiosRequestConfig,
|
||||
AxiosResponse,
|
||||
RawAxiosRequestHeaders,
|
||||
} from "axios";
|
||||
import * as didJwt from "did-jwt";
|
||||
import { LRUCache } from "lru-cache";
|
||||
import * as R from "ramda";
|
||||
import { IIdentifier } from "@veramo/core";
|
||||
|
||||
import { DEFAULT_IMAGE_API_SERVER } from "@/constants/app";
|
||||
import { Contact } from "@/db/tables/contacts";
|
||||
import { accessToken, SimpleSigner } from "@/libs/crypto";
|
||||
import { NonsensitiveDexie } from "@/db/index";
|
||||
@@ -1007,3 +1013,39 @@ export async function setVisibilityUtil(
|
||||
return { error: "Check connectivity and try again." };
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Fetches rate limits from the Endorser server.
|
||||
*
|
||||
* @param apiServer endorser server URL string
|
||||
* @param axios Axios instance
|
||||
* @param {IIdentifier} identity - The identity object to check rate limits for.
|
||||
* @returns {Promise<AxiosResponse>} The Axios response object.
|
||||
*/
|
||||
export async function fetchEndorserRateLimits(
|
||||
apiServer: string,
|
||||
axios: Axios,
|
||||
identity: IIdentifier,
|
||||
) {
|
||||
const url = `${apiServer}/api/report/rateLimits`;
|
||||
const headers = await getHeaders(identity);
|
||||
return await axios.get(url, { headers } as AxiosRequestConfig);
|
||||
}
|
||||
|
||||
/**
|
||||
* Fetches rate limits from the image server.
|
||||
*
|
||||
* @param apiServer image server URL string
|
||||
* @param axios Axios instance
|
||||
* @param {IIdentifier} identity - The identity object to check rate limits for.
|
||||
* @returns {Promise<AxiosResponse>} The Axios response object.
|
||||
*/
|
||||
export async function fetchImageRateLimits(
|
||||
apiServer: string,
|
||||
axios: Axios,
|
||||
identity: IIdentifier,
|
||||
) {
|
||||
const url = DEFAULT_IMAGE_API_SERVER + "/image-limits";
|
||||
const headers = await getHeaders(identity);
|
||||
return await axios.get(url, { headers } as AxiosRequestConfig);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user