forked from trent_larson/crowd-funder-for-time-pwa
add 'offer' on contact screen
This commit is contained in:
@@ -143,6 +143,7 @@ export interface OfferVerifiableCredential {
|
||||
isPartOf?: { identifier?: string; lastClaimId?: string; "@type"?: string };
|
||||
};
|
||||
offeredBy?: { identifier: string };
|
||||
recipient?: { identifier: string };
|
||||
validThrough?: string;
|
||||
}
|
||||
|
||||
@@ -582,6 +583,7 @@ export async function createAndSubmitOffer(
|
||||
amount?: number,
|
||||
unitCode?: string,
|
||||
expirationDate?: string,
|
||||
recipientDid?: string,
|
||||
fulfillsProjectHandleId?: string,
|
||||
): Promise<CreateAndSubmitClaimResult> {
|
||||
const vcClaim: OfferVerifiableCredential = {
|
||||
@@ -599,6 +601,9 @@ export async function createAndSubmitOffer(
|
||||
if (description) {
|
||||
vcClaim.itemOffered = { description };
|
||||
}
|
||||
if (recipientDid) {
|
||||
vcClaim.recipient = { identifier: recipientDid };
|
||||
}
|
||||
if (fulfillsProjectHandleId) {
|
||||
vcClaim.itemOffered = vcClaim.itemOffered || {};
|
||||
vcClaim.itemOffered.isPartOf = {
|
||||
|
||||
Reference in New Issue
Block a user