Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

Update stablecoin-payout-modal.tsx

Steven Tey733698bf7239
diff --git a/apps/web/ui/partners/payouts/stablecoin-payout-modal.tsx b/apps/web/ui/partners/payouts/stablecoin-payout-modal.tsx
index fdbb31f743..1d744b734f 100644
--- a/apps/web/ui/partners/payouts/stablecoin-payout-modal.tsx
+++ b/apps/web/ui/partners/payouts/stablecoin-payout-modal.tsx
@@ -2,6 +2,7 @@
import { MarkdownDescription } from "@/ui/shared/markdown-description";
import { Badge, Button, CircleDollar3, Modal, ShimmerDots } from "@dub/ui";
+import { TriangleWarning } from "@dub/ui/icons";
import { Dispatch, SetStateAction, useMemo, useState } from "react";
function StablecoinPayoutModal({
@@ -14,13 +15,10 @@ function StablecoinPayoutModal({
onContinue: () => Promise<void>;
}) {
const [isLoading, setIsLoading] = useState(false);
+ const [acknowledged, setAcknowledged] = useState(false);
return (
- <Modal
- showModal={showModal}
- setShowModal={setShowModal}
- className="max-w-md"
- >
+ <Modal showModal={showModal} setShowModal={setShowModal}>
<div className="relative flex flex-col overflow-hidden rounded-t-2xl">
<div className="relative flex h-48 items-center justify-center overflow-hidden">
{/* Background image */}
@@ -86,7 +84,7 @@ function StablecoinPayoutModal({
</div>
<h3 className="text-lg font-semibold text-neutral-900">
- Stablecoin payouts are here!
+ Stablecoin payouts
</h3>
<MarkdownDescription className="text-sm leading-5 text-neutral-600">
@@ -96,12 +94,49 @@ function StablecoinPayoutModal({
waiting up to 15 business days with your bank account.
</MarkdownDescription>
+ <div className="mt-4 flex flex-col gap-2.5 rounded-lg border border-amber-200 bg-amber-50 p-3">
+ <TriangleWarning className="size-3.5 text-amber-500" />
+ <p className="text-sm leading-5 text-amber-900">
+ Make sure to triple-check that you’ve entered the{" "}
+ <strong className="underline underline-offset-2">
+ correct stablecoin wallet address and network
+ </strong>{" "}
+ when connecting your wallet.
+ <br />
+ <br />
+ Since stablecoin payouts are irreversible, incorrect details may
+ result in payout failures and lost funds.
+ </p>
+ </div>
+
<div className="mt-4">
+ <label className="mb-4 flex cursor-pointer gap-3 rounded-lg border border-neutral-300 p-3">
+ <div className="flex h-5 items-center">
+ <input
+ type="checkbox"
+ checked={acknowledged}
+ onChange={(e) => setAcknowledged(e.target.checked)}
+ className="h-4 w-4 rounded border-neutral-300 text-neutral-900 focus:ring-neutral-900"
+ />
+ </div>
+ <span className="text-sm leading-5 text-neutral-900">
+ I acknowledge that I will triple-check my stablecoin wallet
+ address and network, and any payout failures due to incorrect
+ details will be my sole responsibility.
+ </span>
+ </label>
+
<Button
text="Connect stablecoin wallet"
variant="primary"
className="w-full rounded-lg"
loading={isLoading}
+ disabled={!acknowledged}
+ disabledTooltip={
+ !acknowledged
+ ? "You must acknowledge the requirements before continuing."
+ : undefined
+ }
onClick={async () => {
setIsLoading(true);
try {