From 4e1fe5eb10a5db44c86becbcef66daacc408239d Mon Sep 17 00:00:00 2001
From: Florian Dold <florian@dold.me>
Date: Wed, 13 Apr 2022 21:40:56 +0200
Subject: anastasis-webui: updated challenge feedback

---
 .../anastasis-webui/src/pages/home/SolveScreen.tsx | 35 ++++------------------
 1 file changed, 5 insertions(+), 30 deletions(-)

(limited to 'packages/anastasis-webui/src/pages/home/SolveScreen.tsx')

diff --git a/packages/anastasis-webui/src/pages/home/SolveScreen.tsx b/packages/anastasis-webui/src/pages/home/SolveScreen.tsx
index 1070cf8a9..3691d1416 100644
--- a/packages/anastasis-webui/src/pages/home/SolveScreen.tsx
+++ b/packages/anastasis-webui/src/pages/home/SolveScreen.tsx
@@ -16,19 +16,7 @@ export function SolveOverviewFeedbackDisplay(props: {
     return <div />;
   }
   switch (feedback.state) {
-    case ChallengeFeedbackStatus.Message:
-      return (
-        <Notifications
-          notifications={[
-            {
-              type: "INFO",
-              message: `Message from provider`,
-              description: feedback.message,
-            },
-          ]}
-        />
-      );
-    case ChallengeFeedbackStatus.Payment:
+    case ChallengeFeedbackStatus.TalerPayment:
       return (
         <Notifications
           notifications={[
@@ -51,7 +39,7 @@ export function SolveOverviewFeedbackDisplay(props: {
             {
               type: "INFO",
               message: `Message from provider`,
-              description: `Need to send a wire transfer to "${feedback.business_name}"`,
+              description: `Need to send a wire transfer to "${feedback.target_business_name}"`,
             },
           ]}
         />
@@ -80,22 +68,6 @@ export function SolveOverviewFeedbackDisplay(props: {
           ]}
         />
       );
-    case ChallengeFeedbackStatus.Redirect:
-      return (
-        <Notifications
-          notifications={[
-            {
-              type: "INFO",
-              message: `Message from provider`,
-              description: (
-                <span>
-                  Please visit this link: <a>{feedback.redirect_url}</a>
-                </span>
-              ),
-            },
-          ]}
-        />
-      );
     case ChallengeFeedbackStatus.Unsupported:
       return (
         <Notifications
@@ -121,6 +93,9 @@ export function SolveOverviewFeedbackDisplay(props: {
         />
       );
     default:
+      console.warn(
+        `unknown challenge feedback status ${JSON.stringify(feedback)}`,
+      );
       return <div />;
   }
 }
-- 
cgit v1.2.3

