diff --git a/packages/anastasis-webui/src/pages/home/ChallengeOverviewScreen.stories.tsx b/packages/anastasis-webui/src/pages/home/ChallengeOverviewScreen.stories.tsx index 1acb2470c..579ff34bf 100644 --- a/packages/anastasis-webui/src/pages/home/ChallengeOverviewScreen.stories.tsx +++ b/packages/anastasis-webui/src/pages/home/ChallengeOverviewScreen.stories.tsx @@ -45,7 +45,6 @@ export const OneUnsolvedPolicy = createExample(TestedComponent, { policies: [[{ uuid: "1" }]], challenges: [ { - cost: "USD:1", instructions: "just go for it", type: "question", uuid: "1", @@ -60,19 +59,16 @@ export const SomePoliciesOneSolved = createExample(TestedComponent, { policies: [[{ uuid: "1" }, { uuid: "2" }], [{ uuid: "uuid-3" }]], challenges: [ { - cost: "USD:1", instructions: "this question cost 1 USD", type: "question", uuid: "1", }, { - cost: "USD:0", instructions: "answering this question is free", type: "question", uuid: "2", }, { - cost: "USD:1", instructions: "this question is already answered", type: "question", uuid: "uuid-3", @@ -92,7 +88,6 @@ export const OneBadConfiguredPolicy = createExample(TestedComponent, { policies: [[{ uuid: "1" }, { uuid: "2" }]], challenges: [ { - cost: "USD:1", instructions: "this policy has a missing uuid (the other auth method)", type: "totp", uuid: "1", @@ -118,51 +113,43 @@ export const OnePolicyWithAllTheChallenges = createExample(TestedComponent, { ], challenges: [ { - cost: "USD:1", instructions: "Does P equals NP?", type: "question", uuid: "1", }, { - cost: "USD:1", instructions: "SMS to 555-555", type: "sms", uuid: "2", }, { - cost: "USD:1", instructions: "Email to qwe@asd.com", type: "email", uuid: "3", }, { - cost: "USD:1", instructions: 'Enter 8 digits code for "Anastasis"', type: "totp", uuid: "4", }, { // - cost: "USD:0", instructions: "Wire transfer from ASDXCVQWE123123 with holder Florian", type: "iban", uuid: "5", }, { - cost: "USD:1", instructions: "Join a video call", type: "video", //Enter 8 digits code for "Anastasis" uuid: "7", }, {}, { - cost: "USD:1", instructions: "Letter to address in postal code DE123123", type: "post", //Enter 8 digits code for "Anastasis" uuid: "8", }, { - cost: "USD:1", instructions: "instruction for an unknown type of challenge", type: "new-type-of-challenge", uuid: "6", @@ -192,55 +179,46 @@ export const OnePolicyWithAllTheChallengesInDifferentState = createExample( ], challenges: [ { - cost: "USD:1", instructions: 'in state "solved"', type: "question", uuid: "uuid-1", }, { - cost: "USD:1", instructions: 'in state "message"', type: "question", uuid: "uuid-2", }, { - cost: "USD:1", instructions: 'in state "auth iban"', type: "question", uuid: "uuid-3", }, { - cost: "USD:1", instructions: 'in state "payment "', type: "question", uuid: "uuid-4", }, { - cost: "USD:1", instructions: 'in state "rate limit"', type: "question", uuid: "uuid-5", }, { - cost: "USD:1", instructions: 'in state "redirect"', type: "question", uuid: "uuid-6", }, { - cost: "USD:1", instructions: 'in state "server failure"', type: "question", uuid: "uuid-7", }, { - cost: "USD:1", instructions: 'in state "truth unknown"', type: "question", uuid: "uuid-8", }, { - cost: "USD:1", instructions: 'in state "unsupported"', type: "question", uuid: "uuid-9", diff --git a/packages/anastasis-webui/src/pages/home/ChallengeOverviewScreen.tsx b/packages/anastasis-webui/src/pages/home/ChallengeOverviewScreen.tsx index 84d2588e0..fdd2c0b36 100644 --- a/packages/anastasis-webui/src/pages/home/ChallengeOverviewScreen.tsx +++ b/packages/anastasis-webui/src/pages/home/ChallengeOverviewScreen.tsx @@ -66,14 +66,12 @@ export function ChallengeOverviewScreen(): VNode { [uuid: string]: { type: string; instructions: string; - cost: string; feedback: ChallengeFeedback | undefined; }; } = {}; for (const ch of knownChallengesArray) { knownChallengesMap[ch.uuid] = { type: ch.type, - cost: ch.cost, instructions: ch.instructions, feedback: challengeFeedback[ch.uuid], }; @@ -123,7 +121,6 @@ export function ChallengeOverviewScreen(): VNode { )} {policiesWithInfo.map((policy, policy_index) => { const tableBody = policy.challenges.map(({ info, uuid }) => { - const isFree = !info.cost || info.cost.endsWith(":0"); const method = authMethods[info.type as KnownAuthMethods]; if (!method) { diff --git a/packages/anastasis-webui/src/pages/home/SolveScreen.stories.tsx b/packages/anastasis-webui/src/pages/home/SolveScreen.stories.tsx index d97bfbfbb..df16aebf5 100644 --- a/packages/anastasis-webui/src/pages/home/SolveScreen.stories.tsx +++ b/packages/anastasis-webui/src/pages/home/SolveScreen.stories.tsx @@ -19,11 +19,7 @@ * @author Sebastian Javier Marchano (sebasjm) */ -import { - ChallengeFeedbackStatus, - RecoveryStates, - ReducerState, -} from "@gnu-taler/anastasis-core"; +import { ReducerState } from "@gnu-taler/anastasis-core"; import { createExample, reducerStatesExample } from "../../utils"; import { SolveScreen as TestedComponent } from "./SolveScreen"; @@ -49,7 +45,6 @@ export const NotSupportedChallenge = createExample(TestedComponent, { recovery_information: { challenges: [ { - cost: "USD:1", instructions: "does P equals NP?", type: "chall-type", uuid: "ASDASDSAD!1", @@ -65,7 +60,6 @@ export const MismatchedChallengeId = createExample(TestedComponent, { recovery_information: { challenges: [ { - cost: "USD:1", instructions: "does P equals NP?", type: "chall-type", uuid: "ASDASDSAD!1", diff --git a/packages/anastasis-webui/src/pages/home/authMethod/AuthMethodEmailSolve.stories.tsx b/packages/anastasis-webui/src/pages/home/authMethod/AuthMethodEmailSolve.stories.tsx index d82111979..295a47c46 100644 --- a/packages/anastasis-webui/src/pages/home/authMethod/AuthMethodEmailSolve.stories.tsx +++ b/packages/anastasis-webui/src/pages/home/authMethod/AuthMethodEmailSolve.stories.tsx @@ -47,7 +47,6 @@ export const WithoutFeedback = createExample( recovery_information: { challenges: [ { - cost: "USD:1", instructions: "Email to me@domain.com", type: "question", uuid: "uuid-1", @@ -69,7 +68,6 @@ export const PaymentFeedback = createExample( recovery_information: { challenges: [ { - cost: "USD:1", instructions: "Email to me@domain.com", type: "question", uuid: "uuid-1", diff --git a/packages/anastasis-webui/src/pages/home/authMethod/AuthMethodIbanSolve.stories.tsx b/packages/anastasis-webui/src/pages/home/authMethod/AuthMethodIbanSolve.stories.tsx index 2a0e02dce..de49f2563 100644 --- a/packages/anastasis-webui/src/pages/home/authMethod/AuthMethodIbanSolve.stories.tsx +++ b/packages/anastasis-webui/src/pages/home/authMethod/AuthMethodIbanSolve.stories.tsx @@ -47,7 +47,6 @@ export const WithoutFeedback = createExample( recovery_information: { challenges: [ { - cost: "USD:1", instructions: "does P equals NP?", type: "question", uuid: "uuid-1", diff --git a/packages/anastasis-webui/src/pages/home/authMethod/AuthMethodPostSolve.stories.tsx b/packages/anastasis-webui/src/pages/home/authMethod/AuthMethodPostSolve.stories.tsx index cbfcbb6cb..d971205e9 100644 --- a/packages/anastasis-webui/src/pages/home/authMethod/AuthMethodPostSolve.stories.tsx +++ b/packages/anastasis-webui/src/pages/home/authMethod/AuthMethodPostSolve.stories.tsx @@ -47,7 +47,6 @@ export const WithoutFeedback = createExample( recovery_information: { challenges: [ { - cost: "USD:1", instructions: "does P equals NP?", type: "question", uuid: "uuid-1", diff --git a/packages/anastasis-webui/src/pages/home/authMethod/AuthMethodQuestionSolve.stories.tsx b/packages/anastasis-webui/src/pages/home/authMethod/AuthMethodQuestionSolve.stories.tsx index 5ba621b68..e36d66895 100644 --- a/packages/anastasis-webui/src/pages/home/authMethod/AuthMethodQuestionSolve.stories.tsx +++ b/packages/anastasis-webui/src/pages/home/authMethod/AuthMethodQuestionSolve.stories.tsx @@ -48,7 +48,6 @@ export const WithoutFeedback = createExample( recovery_information: { challenges: [ { - cost: "USD:1", instructions: "does P equals NP?", type: "question", uuid: "uuid-1", @@ -70,7 +69,6 @@ export const ServerFailureFeedback = createExample( recovery_information: { challenges: [ { - cost: "USD:1", instructions: "does P equal NP?", type: "question", uuid: "ASDASDSAD!1", @@ -96,7 +94,6 @@ export const MessageRateLimitExceededFeedback = createExample( recovery_information: { challenges: [ { - cost: "USD:1", instructions: "does P equals NP?", type: "question", uuid: "ASDASDSAD!1", @@ -118,7 +115,6 @@ export const UnsupportedFeedback = createExample(TestedComponent[type].solve, { recovery_information: { challenges: [ { - cost: "USD:1", instructions: "does P equals NP?", type: "question", uuid: "ASDASDSAD!1", @@ -141,7 +137,6 @@ export const TruthUnknownFeedback = createExample(TestedComponent[type].solve, { recovery_information: { challenges: [ { - cost: "USD:1", instructions: "does P equals NP?", type: "question", uuid: "ASDASDSAD!1", @@ -171,7 +166,6 @@ export const AuthIbanFeedback = createExample(TestedComponent[type].solve, { recovery_information: { challenges: [ { - cost: "USD:1", instructions: "does P equals NP?", type: "question", uuid: "ASDASDSAD!1", @@ -190,7 +184,6 @@ export const PaymentFeedback = createExample(TestedComponent[type].solve, { recovery_information: { challenges: [ { - cost: "USD:1", instructions: "does P equals NP?", type: "question", uuid: "ASDASDSAD!1", diff --git a/packages/anastasis-webui/src/pages/home/authMethod/AuthMethodSmsSolve.stories.tsx b/packages/anastasis-webui/src/pages/home/authMethod/AuthMethodSmsSolve.stories.tsx index 4fdbb2ce3..496e413ae 100644 --- a/packages/anastasis-webui/src/pages/home/authMethod/AuthMethodSmsSolve.stories.tsx +++ b/packages/anastasis-webui/src/pages/home/authMethod/AuthMethodSmsSolve.stories.tsx @@ -47,7 +47,6 @@ export const WithoutFeedback = createExample( recovery_information: { challenges: [ { - cost: "USD:1", instructions: "SMS to +54 11 2233 4455", type: "question", uuid: "AHCC4ZJ3Z1AF8TWBKGVGEKCQ3R7HXHJ51MJ45NHNZMHYZTKJ9NW0", diff --git a/packages/anastasis-webui/src/pages/home/authMethod/AuthMethodTotpSolve.stories.tsx b/packages/anastasis-webui/src/pages/home/authMethod/AuthMethodTotpSolve.stories.tsx index 8ac146708..0fba7872f 100644 --- a/packages/anastasis-webui/src/pages/home/authMethod/AuthMethodTotpSolve.stories.tsx +++ b/packages/anastasis-webui/src/pages/home/authMethod/AuthMethodTotpSolve.stories.tsx @@ -47,7 +47,6 @@ export const WithoutFeedback = createExample( recovery_information: { challenges: [ { - cost: "USD:1", instructions: "does P equals NP?", type: "question", uuid: "uuid-1",