add large notice when user has a new offer to them

This commit is contained in:
2024-11-03 10:39:28 -07:00
parent 8a61d9df45
commit 4168c37074
8 changed files with 204 additions and 36 deletions

View File

@@ -587,6 +587,17 @@ export async function setPlanInCache(
planCache.set(handleId, planSummary);
}
export async function getNewOffersToUser(axios: Axios, apiServer: string, activeDid: string, lastAckedOfferToUserJwtId?: string) {
let url = `${apiServer}/api/v2/report/offers?recipientDid=${activeDid}`;
if (lastAckedOfferToUserJwtId) {
url += "&afterId=" + lastAckedOfferToUserJwtId;
}
const headers = await getHeaders(activeDid);
const response = await axios.get(url, { headers });
const offers = response.data.data;
return offers;
}
/**
* Construct GiveAction VC for submission to server
*