From 52bdfb75cd8b0add6ac871d3f3913f59780a9fdc Mon Sep 17 00:00:00 2001 From: Oluwaferanmi-dev Date: Mon, 31 Aug 2026 20:29:30 +0100 Subject: [PATCH 01/17] fix: Add a confirm step when revoking a creator (#397) --- src/screens/admin/AdminConsole.tsx | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/screens/admin/AdminConsole.tsx b/src/screens/admin/AdminConsole.tsx index 7ba6efc..c60cf84 100644 --- a/src/screens/admin/AdminConsole.tsx +++ b/src/screens/admin/AdminConsole.tsx @@ -69,6 +69,10 @@ export function AdminConsole() { status: Creator['status'], rejectionReason?: string, ) => { + if (status === 'pending') { + const c = whitelist.find((x) => x.address === address) + if (!window.confirm(`${t('actionRevoke')} ${c?.name ?? 'Creator'}?`)) return + } setWhitelist((list) => list.map((c) => c.address === address @@ -96,6 +100,13 @@ export function AdminConsole() { tone: toneMap[status], title: titleMap[status], message: messageMap[status], + action: + status === 'pending' + ? { + label: t('actionApprove'), + onClick: () => setCreatorStatus(address, 'approved'), + } + : undefined, duration: 5000, stackable: true, }) From 21b9e32b0c68c29374b17f800f130520b2441820 Mon Sep 17 00:00:00 2001 From: Oluwaferanmi-dev Date: Mon, 31 Aug 2026 20:29:32 +0100 Subject: [PATCH 02/17] fix: Add a confirm step when revoking a creator (#397) --- messages/en.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/messages/en.json b/messages/en.json index 4f91082..d42864d 100644 --- a/messages/en.json +++ b/messages/en.json @@ -228,6 +228,8 @@ "statusRejected": "Rejected", "rejectionReason": "Reason", "actionRevoke": "Revoke", + "revokeConfirm": "Yes, revoke", + "revokeConfirmBody": "Are you sure you want to revoke {name}? You can undo this action.", "actionApprove": "Approve", "toastScoresTitle": "Scores written on-chain", "toastScoresMsg": "{name} re-verified: credit {credit}, green {green}.", @@ -237,6 +239,7 @@ "toastApprovedMsg": "{name} can now register projects.", "toastRevokedTitle": "Creator revoked", "toastRevokedMsg": "{name} can no longer register new projects.", + "actionUndo": "Undo", "panelPushTitle": "Push score update", "panelPushHint": "Writes a new oracle reading to the ProjectRegistry.", "panelFundTitle": "Fund a project", From ab1afd7c02235437df16a3173676bfce40156faf Mon Sep 17 00:00:00 2001 From: Oluwaferanmi-dev Date: Mon, 31 Aug 2026 20:29:35 +0100 Subject: [PATCH 03/17] fix: Add a confirm step when revoking a creator (#397) --- messages/ar.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/messages/ar.json b/messages/ar.json index be771fa..44fab91 100644 --- a/messages/ar.json +++ b/messages/ar.json @@ -205,6 +205,8 @@ "rejectionReason": "السبب", "actionRevoke": "إلغاء الاعتماد", "actionApprove": "اعتماد", + "revokeConfirmTitle": "إلغاء اعتماد المبدع؟", + "revokeConfirmBody": "سيؤدي إلغاء اعتماد {name} إلى منعه من تسجيل مشاريع جديدة. هل تريد المتابعة؟", "toastScoresTitle": "الدرجات مكتوبة على السلسلة", "toastScoresMsg": "{name} أُعيد التحقق: ائتمان {credit}، أخضر {green}.", "toastFundTitle": "تم نشر رأس المال", @@ -213,6 +215,7 @@ "toastApprovedMsg": "يمكن لـ {name} تسجيل المشاريع الآن.", "toastRevokedTitle": "تم إلغاء اعتماد المبدع", "toastRevokedMsg": "لم يعد {name} قادراً على تسجيل مشاريع جديدة.", + "toastRevokedUndo": "تراجع", "panelPushTitle": "إرسال تحديث درجات", "panelPushHint": "يكتب قراءة Oracle جديدة في ProjectRegistry.", "panelFundTitle": "تمويل مشروع", From 97c60486229bae48557dae564cc80714d142859b Mon Sep 17 00:00:00 2001 From: Oluwaferanmi-dev Date: Mon, 31 Aug 2026 20:29:37 +0100 Subject: [PATCH 04/17] fix: Add a confirm step when revoking a creator (#397) --- messages/es.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/messages/es.json b/messages/es.json index 93ce671..59d4e3f 100644 --- a/messages/es.json +++ b/messages/es.json @@ -205,6 +205,9 @@ "rejectionReason": "Motivo", "actionRevoke": "Revoke", "actionApprove": "Approve", + "actionConfirmRevoke": "Sí, revocar", + "revokeConfirmBody": "{name} ya no podrá registrar nuevos proyectos. Esta acción puede deshacerse.", + "toastRevokedUndo": "Deshacer", "toastScoresTitle": "Scores written on-chain", "toastScoresMsg": "{name} re-verified: credit {credit}, green {green}.", "toastFundTitle": "Capital deployed", From 03c9c1f9cd46d5f18140a52a77992c8bf2069477 Mon Sep 17 00:00:00 2001 From: Oluwaferanmi-dev Date: Mon, 31 Aug 2026 20:29:39 +0100 Subject: [PATCH 05/17] fix: Add a confirm step when revoking a creator (#397) --- messages/fr.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/messages/fr.json b/messages/fr.json index f8a7a3d..e581005 100644 --- a/messages/fr.json +++ b/messages/fr.json @@ -229,6 +229,9 @@ "toastApprovedMsg": "{name} peut désormais enregistrer des projets.", "toastRevokedTitle": "Créateur révoqué", "toastRevokedMsg": "{name} ne peut plus enregistrer de nouveaux projets.", + "revokeConfirmTitle": "Révoquer ce créateur ?", + "revokeConfirmBody": "{name} ne pourra plus enregistrer de nouveaux projets. Vous pourrez annuler.", + "toastRevokedUndo": "Annuler la révocation", "panelPushTitle": "Envoyer une mise à jour de scores", "panelPushHint": "Écrit une nouvelle lecture oracle dans le ProjectRegistry.", "panelFundTitle": "Financer un projet", From 899002eac0c7b2e97084029048bc2594ed6cf5d6 Mon Sep 17 00:00:00 2001 From: Oluwaferanmi-dev Date: Mon, 31 Aug 2026 20:29:41 +0100 Subject: [PATCH 06/17] fix: Add a confirm step when revoking a creator (#397) --- src/components/Toast.tsx | 45 +++++++++++++++++++++++++++++++--------- 1 file changed, 35 insertions(+), 10 deletions(-) diff --git a/src/components/Toast.tsx b/src/components/Toast.tsx index bb79e6d..a046562 100644 --- a/src/components/Toast.tsx +++ b/src/components/Toast.tsx @@ -23,12 +23,13 @@ export interface ToastProps { title?: string message?: string action?: ReactNode + undo?: () => void onDismiss?: () => void href?: string style?: CSSProperties } -export function Toast({ tone = 'neutral', title, message, action, onDismiss, href, style }: ToastProps) { +export function Toast({ tone = 'neutral', title, message, action, undo, onDismiss, href, style }: ToastProps) { const accents: Record = { neutral: 'var(--ink)', success: 'var(--growth)', @@ -38,7 +39,7 @@ export function Toast({ tone = 'neutral', title, message, action, onDismiss, hre const accent = accents[tone] || accents.neutral const inner = ( - <> + >