diff options
author | Florian Dold <florian@dold.me> | 2022-04-13 21:40:56 +0200 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2022-04-13 23:46:34 +0200 |
commit | 4e1fe5eb10a5db44c86becbcef66daacc408239d (patch) | |
tree | 66c619c46a2228dc00ed78b200db6d1be395125b /packages/anastasis-webui/src/pages/home/authMethod/AuthMethodIbanSolve.tsx | |
parent | bd76b5d76f0e03d2d511b6cc0aae4636a2ec52c9 (diff) | |
download | wallet-core-4e1fe5eb10a5db44c86becbcef66daacc408239d.tar.xz |
anastasis-webui: updated challenge feedback
Diffstat (limited to 'packages/anastasis-webui/src/pages/home/authMethod/AuthMethodIbanSolve.tsx')
-rw-r--r-- | packages/anastasis-webui/src/pages/home/authMethod/AuthMethodIbanSolve.tsx | 10 |
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> |