debounce(async (
nameSuffix: string,
@@ -153,18 +158,29 @@
// Whether or not to show certain hints/anything at all
const showWalletHint = !!foundWallet;
+ const showVerifiedHint = !!foundVerified && !showWalletHint;
const showAddressHint = foundAddress !== undefined;
const showNameHint = foundName !== undefined;
- const foundAnything = showWalletHint || showAddressHint || showNameHint;
+ const foundAnything = showWalletHint || showVerifiedHint
+ || showAddressHint || showNameHint;
// Whether or not to show a separator between the wallet hint and address or
// name hint (i.e. if two hints are shown)
- const showSep = showWalletHint && (showAddressHint || showNameHint);
+ const showSep = (showWalletHint || showVerifiedHint)
+ && (showAddressHint || showNameHint);
if (foundAnything) return
{/* Show a wallet hint if possible */}
{foundWallet && }
+ {/* Show a verified hint if possible */}
+ {foundVerified && (
+ // Make it look like a contextual address to inherit the styles
+
+
+
+ )}
+
{/* Show a separator if there are two hints */}
{showSep && –}
diff --git a/src/components/addresses/picker/VerifiedHint.tsx b/src/components/addresses/picker/VerifiedHint.tsx
new file mode 100644
index 0000000..75c2899
--- /dev/null
+++ b/src/components/addresses/picker/VerifiedHint.tsx
@@ -0,0 +1,15 @@
+// Copyright (c) 2020-2021 Drew Lemmy
+// This file is part of KristWeb 2 under GPL-3.0.
+// Full details: https://github.com/tmpim/KristWeb2/blob/master/LICENSE.txt
+import { VerifiedAddress, VerifiedAddressLink } from "@comp/addresses/VerifiedAddress";
+
+interface Props {
+ address: string;
+ verified: VerifiedAddress;
+}
+
+export function VerifiedHint({ address, verified }: Props): JSX.Element {
+ return
+
+ ;
+}