diff --git a/project.task.yaml b/project.task.yaml
index 49db2717..a89444a4 100644
--- a/project.task.yaml
+++ b/project.task.yaml
@@ -1,7 +1,6 @@
tasks:
-- link to the project claim from the project screen
- supply the projectId to the OfferDialog just like we do with the offerId
- the confirm button on each give on the ProjectViewView page doesn't have all the context of the ClaimView page, so it can show sometimes inappropriately; consider consolidation
- choose an agent via a contact chooser (not just copy-paste a DID)
diff --git a/src/libs/endorserServer.ts b/src/libs/endorserServer.ts
index ec4a9267..72db288e 100644
--- a/src/libs/endorserServer.ts
+++ b/src/libs/endorserServer.ts
@@ -160,6 +160,10 @@ export function isHiddenDid(did: string) {
return did === HIDDEN_DID;
}
+export function isEmptyOrHiddenDid(did?: string) {
+ return !did || did === HIDDEN_DID; // catching empty string as well
+}
+
/**
* @return true for any nested string where func(input) === true
*
diff --git a/src/libs/util.ts b/src/libs/util.ts
index 2892c247..a1bb31d1 100644
--- a/src/libs/util.ts
+++ b/src/libs/util.ts
@@ -8,6 +8,7 @@ import { MASTER_SETTINGS_KEY } from "@/db/tables/settings";
import { deriveAddress, generateSeed, newIdentifier } from "@/libs/crypto";
import { GenericServerRecord, containsHiddenDid } from "@/libs/endorserServer";
import * as serverUtil from "@/libs/endorserServer";
+import { useClipboard } from "@vueuse/core";
// eslint-disable-next-line @typescript-eslint/no-var-requires
const Buffer = require("buffer/").Buffer;
@@ -25,6 +26,13 @@ export const giveIsConfirmable = (veriClaim: GenericServerRecord) => {
return veriClaim.claimType === "GiveAction";
};
+export const doCopyTwoSecRedo = (text: string, fn: () => void) => {
+ fn();
+ useClipboard()
+ .copy(text)
+ .then(() => setTimeout(fn, 2000));
+};
+
/**
* @returns true if the user can confirm the claim
* @param veriClaim is expected to have fields: claim, claimType, and issuer
diff --git a/src/views/AccountViewView.vue b/src/views/AccountViewView.vue
index 9ebb1d60..f6b4c7c9 100644
--- a/src/views/AccountViewView.vue
+++ b/src/views/AccountViewView.vue
@@ -89,7 +89,7 @@
>