aboutsummaryrefslogtreecommitdiff
path: root/packages/anastasis-webui/src/pages/home/authMethod/AuthMethodIbanSolve.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'packages/anastasis-webui/src/pages/home/authMethod/AuthMethodIbanSolve.tsx')
-rw-r--r--packages/anastasis-webui/src/pages/home/authMethod/AuthMethodIbanSolve.tsx10
1 files changed, 2 insertions, 8 deletions
diff --git a/packages/anastasis-webui/src/pages/home/authMethod/AuthMethodIbanSolve.tsx b/packages/anastasis-webui/src/pages/home/authMethod/AuthMethodIbanSolve.tsx
index b58952feb..39788b538 100644
--- a/packages/anastasis-webui/src/pages/home/authMethod/AuthMethodIbanSolve.tsx
+++ b/packages/anastasis-webui/src/pages/home/authMethod/AuthMethodIbanSolve.tsx
@@ -5,10 +5,10 @@ import {
import { h, VNode } from "preact";
import { useState } from "preact/hooks";
import { AsyncButton } from "../../../components/AsyncButton";
-import { TextInput } from "../../../components/fields/TextInput";
import { useAnastasisContext } from "../../../context/anastasis";
import { AnastasisClientFrame } from "../index";
import { SolveOverviewFeedbackDisplay } from "../SolveScreen";
+import { shouldHideConfirm } from "./helpers";
import { AuthMethodSolveProps } from "./index";
export function AuthMethodIbanSolve({ id }: AuthMethodSolveProps): VNode {
@@ -79,12 +79,6 @@ export function AuthMethodIbanSolve({ id }: AuthMethodSolveProps): VNode {
reducer?.back();
}
- const shouldHideConfirm =
- feedback?.state === ChallengeFeedbackStatus.RateLimitExceeded ||
- feedback?.state === ChallengeFeedbackStatus.Redirect ||
- feedback?.state === ChallengeFeedbackStatus.Unsupported ||
- feedback?.state === ChallengeFeedbackStatus.TruthUnknown;
-
return (
<AnastasisClientFrame hideNav title="IBAN Challenge">
<SolveOverviewFeedbackDisplay feedback={feedback} />
@@ -101,7 +95,7 @@ export function AuthMethodIbanSolve({ id }: AuthMethodSolveProps): VNode {
<button class="button" onClick={onCancel}>
Cancel
</button>
- {!shouldHideConfirm && (
+ {!shouldHideConfirm(feedback) && (
<AsyncButton class="button is-info" onClick={onNext}>
Confirm
</AsyncButton>