|
|
@ -68,7 +68,7 @@ |
|
|
|
<span v-if="record.agentDid == contact.did"> |
|
|
|
<div class="font-bold"> |
|
|
|
{{ record.amount }} {{ record.unit }} |
|
|
|
<span v-if="record.confirmed" class="tooltip"> |
|
|
|
<span v-if="record.amountConfirmed" class="tooltip"> |
|
|
|
<fa icon="circle-check" class="text-green-600 fa-fw ml-1" /> |
|
|
|
<span class="tooltiptext">Confirmed</span> |
|
|
|
</span> |
|
|
@ -94,7 +94,7 @@ |
|
|
|
<span v-if="record.agentDid != contact.did"> |
|
|
|
<div class="font-bold"> |
|
|
|
{{ record.amount }} {{ record.unit }} |
|
|
|
<span v-if="record.confirmed" class="tooltip"> |
|
|
|
<span v-if="record.amountConfirmed" class="tooltip"> |
|
|
|
<fa icon="circle-check" class="text-green-600 fa-fw ml-1" /> |
|
|
|
<span class="tooltiptext">Confirmed</span> |
|
|
|
</span> |
|
|
@ -134,10 +134,8 @@ import { AppString } from "@/constants/app"; |
|
|
|
import { accessToken, SimpleSigner } from "@/libs/crypto"; |
|
|
|
import { |
|
|
|
AgreeVerifiableCredential, |
|
|
|
GiveServerRecord, |
|
|
|
RegisterVerifiableCredential, |
|
|
|
GiveServerRecord, GiveVerifiableCredential, |
|
|
|
SCHEMA_ORG_CONTEXT, |
|
|
|
SERVICE_ID, |
|
|
|
} from "@/libs/endorserServer"; |
|
|
|
import * as didJwt from "did-jwt"; |
|
|
|
import { AxiosError } from "axios"; |
|
|
@ -243,7 +241,9 @@ export default class ContactsView extends Vue { |
|
|
|
async confirm(record: GiveServerRecord) { |
|
|
|
// Make claim |
|
|
|
// I use clone here because otherwise it gets a Proxy object. |
|
|
|
const origClaim: Record<any, any> = R.clone(record.fullClaim); |
|
|
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any |
|
|
|
const origClaim: GiveVerifiableCredential = |
|
|
|
R.clone(record.fullClaim); |
|
|
|
if (record.fullClaim["@context"] == SCHEMA_ORG_CONTEXT) { |
|
|
|
delete origClaim["@context"]; |
|
|
|
} |
|
|
@ -294,7 +294,7 @@ export default class ContactsView extends Vue { |
|
|
|
const resp = await this.axios.post(url, payload, { headers }); |
|
|
|
//console.log("Got resp data:", resp.data); |
|
|
|
if (resp.data?.success) { |
|
|
|
record.confirmed = 1; |
|
|
|
record.amountConfirmed = origClaim.object?.amountOfThisGood || 1; |
|
|
|
} |
|
|
|
} catch (error) { |
|
|
|
let userMessage = "There was an error. See logs for more info."; |
|
|
|