diff --git a/components/discount/registerDiscount.tsx b/components/discount/registerDiscount.tsx index 102285be..d3b133a4 100644 --- a/components/discount/registerDiscount.tsx +++ b/components/discount/registerDiscount.tsx @@ -205,7 +205,7 @@ const RegisterDiscount: FunctionComponent = ({ addTransaction({ timestamp: Date.now(), - subtext: "Registering a domain", + subtext: "Domain registration", type: NotificationType.TRANSACTION, data: { type: TransactionType.BUY_DOMAIN, diff --git a/components/domains/registerV2.tsx b/components/domains/registerV2.tsx index c1e45d2e..90fe1653 100644 --- a/components/domains/registerV2.tsx +++ b/components/domains/registerV2.tsx @@ -242,7 +242,7 @@ const RegisterV2: FunctionComponent = ({ domain, groups }) => { addTransaction({ timestamp: Date.now(), - subtext: "Registering your domain", + subtext: "Domain registration", type: NotificationType.TRANSACTION, data: { type: TransactionType.BUY_DOMAIN, diff --git a/components/domains/renewal.tsx b/components/domains/renewal.tsx index e4e0b89b..9cccba7e 100644 --- a/components/domains/renewal.tsx +++ b/components/domains/renewal.tsx @@ -91,7 +91,7 @@ const Renewal: FunctionComponent = ({ groups }) => { addTransaction({ timestamp: Date.now(), - subtext: "Renewing your domain", + subtext: "Domain renewal", type: NotificationType.TRANSACTION, data: { type: TransactionType.RENEW_DOMAIN, diff --git a/components/identities/actions/clickable/clickablePersonhoodIcon.tsx b/components/identities/actions/clickable/clickablePersonhoodIcon.tsx index 825cc029..f314f2e1 100644 --- a/components/identities/actions/clickable/clickablePersonhoodIcon.tsx +++ b/components/identities/actions/clickable/clickablePersonhoodIcon.tsx @@ -55,7 +55,7 @@ const ClickablePersonhoodIcon: FunctionComponent< subtext: "Proof of personhood", type: NotificationType.TRANSACTION, data: { - type: TransactionType.VERIFIER, + type: TransactionType.VERIFIER_POP, hash: verifierData.transaction_hash, status: "pending", }, diff --git a/components/identities/actions/identityActions.tsx b/components/identities/actions/identityActions.tsx index 5f9783b3..5591daa1 100644 --- a/components/identities/actions/identityActions.tsx +++ b/components/identities/actions/identityActions.tsx @@ -87,7 +87,7 @@ const IdentityActions: FunctionComponent = ({ subtext: "Set as main domain", type: NotificationType.TRANSACTION, data: { - type: TransactionType.BUY_DOMAIN, + type: TransactionType.MAIN_DOMAIN, hash: mainDomainData.transaction_hash, status: "pending", }, diff --git a/components/identities/actions/subdomainModal.tsx b/components/identities/actions/subdomainModal.tsx index 357624a6..1f3afc45 100644 --- a/components/identities/actions/subdomainModal.tsx +++ b/components/identities/actions/subdomainModal.tsx @@ -114,7 +114,7 @@ const SubdomainModal: FunctionComponent = ({ subtext: `For ${domain}`, type: NotificationType.TRANSACTION, data: { - type: TransactionType.SUBDOMAIN, + type: TransactionType.SUBDOMAIN_CREATION, hash: transferDomainData.transaction_hash, status: "pending", }, diff --git a/hooks/useNotificationManager.ts b/hooks/useNotificationManager.ts index 11a28b57..7ad4c235 100644 --- a/hooks/useNotificationManager.ts +++ b/hooks/useNotificationManager.ts @@ -17,7 +17,6 @@ export function useNotificationManager() { useEffect(() => { const intervalId = setInterval(() => { - console.log("notifications", notifications); notifications.forEach(checkTransactionStatus); }, 5000); @@ -35,8 +34,6 @@ export function useNotificationManager() { const data = await provider.getTransactionReceipt(transaction.hash); const updatedTransactions = [...notifications]; - console.log("data", data); - if (data?.status === "REJECTED" || data?.status === "REVERTED") { updatedTransactions[index].data.status = "error"; updatedTransactions[index].data.txStatus = "REJECTED"; diff --git a/pages/discord.tsx b/pages/discord.tsx index c685005d..33aca0ba 100644 --- a/pages/discord.tsx +++ b/pages/discord.tsx @@ -132,7 +132,7 @@ const Discord: NextPage = () => { subtext: "Discord verification", type: NotificationType.TRANSACTION, data: { - type: TransactionType.VERIFIER, + type: TransactionType.VERIFIER_DISCORD, hash: discordVerificationData.transaction_hash, status: "pending", }, diff --git a/pages/github.tsx b/pages/github.tsx index 49bb4f97..3f357ce7 100644 --- a/pages/github.tsx +++ b/pages/github.tsx @@ -121,10 +121,10 @@ const Github: NextPage = () => { posthog?.capture("githubVerificationTx"); addTransaction({ timestamp: Date.now(), - subtext: "Discord verification", + subtext: "Github verified", type: NotificationType.TRANSACTION, data: { - type: TransactionType.VERIFIER, + type: TransactionType.VERIFIER_GITHUB, hash: githubVerificationData.transaction_hash, status: "pending", }, diff --git a/pages/twitter.tsx b/pages/twitter.tsx index a551dea5..c54ad240 100644 --- a/pages/twitter.tsx +++ b/pages/twitter.tsx @@ -123,10 +123,10 @@ const Twitter: NextPage = () => { posthog?.capture("twitterVerificationTx"); addTransaction({ timestamp: Date.now(), - subtext: "Discord verification", + subtext: "Twitter verification", type: NotificationType.TRANSACTION, data: { - type: TransactionType.VERIFIER, + type: TransactionType.VERIFIER_TWITTER, hash: twitterVerificationData.transaction_hash, status: "pending", }, diff --git a/utils/constants.ts b/utils/constants.ts index 2dcf0798..a81d687b 100644 --- a/utils/constants.ts +++ b/utils/constants.ts @@ -29,9 +29,12 @@ export enum TransactionType { DISABLE_AUTORENEW = "DISABLE_AUTORENEW", CHANGE_ADDRESS = "CHANGE_ADDRESS", TRANSFER_IDENTITY = "TRANSFER_IDENTITY", - VERIFIER = "VERIFIER", + VERIFIER_POP = "VERIFIER_POP", + VERIFIER_TWITTER = "VERIFIER_TWITTER", + VERIFIER_DISCORD = "VERIFIER_DISCORD", + VERIFIER_GITHUB = "VERIFIER_GITHUB", MAIN_DOMAIN = "MAIN_DOMAIN", - SUBDOMAIN = "SUBDOMAIN", + SUBDOMAIN_CREATION = "SUBDOMAIN_CREATION", SET_PFP = "SET_PFP", } @@ -46,9 +49,12 @@ export const notificationTitle: Record = { [TransactionType.DISABLE_AUTORENEW]: "Auto renewal disabled", [TransactionType.CHANGE_ADDRESS]: "Address changed", [TransactionType.TRANSFER_IDENTITY]: "Domain transferred", - [TransactionType.VERIFIER]: "Verifier added", + [TransactionType.VERIFIER_POP]: "Proof of personhood verified", + [TransactionType.VERIFIER_TWITTER]: "Twitter verified", + [TransactionType.VERIFIER_DISCORD]: "Discord verified", + [TransactionType.VERIFIER_GITHUB]: "Github verified", [TransactionType.MAIN_DOMAIN]: "Main domain set", - [TransactionType.SUBDOMAIN]: "Subdomain created", + [TransactionType.SUBDOMAIN_CREATION]: "Subdomain created", [TransactionType.SET_PFP]: "New profile picture set", };