forked from jsnbuchanan/crowd-funder-for-time-pwa
add large notice when user has a new offer to them
This commit is contained in:
@@ -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
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user