diff options
author | Florian Dold <florian@dold.me> | 2022-04-13 08:44:37 +0200 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2022-04-13 08:44:37 +0200 |
commit | b28583ba7e3be7e4f69aaf543d087b6446f50cf0 (patch) | |
tree | 3266e5187384370a403cb339bf34ee378a06e757 /packages/anastasis-webui/src/pages/home/AuthenticationEditorScreen.tsx | |
parent | f3d8b4474302a00fd923581046b0f5828a4c5976 (diff) | |
download | wallet-core-b28583ba7e3be7e4f69aaf543d087b6446f50cf0.tar.xz |
anastasis: tag state properly
Diffstat (limited to 'packages/anastasis-webui/src/pages/home/AuthenticationEditorScreen.tsx')
-rw-r--r-- | packages/anastasis-webui/src/pages/home/AuthenticationEditorScreen.tsx | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/packages/anastasis-webui/src/pages/home/AuthenticationEditorScreen.tsx b/packages/anastasis-webui/src/pages/home/AuthenticationEditorScreen.tsx index 17987796f..f0cf9b88c 100644 --- a/packages/anastasis-webui/src/pages/home/AuthenticationEditorScreen.tsx +++ b/packages/anastasis-webui/src/pages/home/AuthenticationEditorScreen.tsx @@ -30,10 +30,7 @@ export function AuthenticationEditorScreen(): VNode { if (!reducer) { return <div>no reducer in context</div>; } - if ( - !reducer.currentReducerState || - reducer.currentReducerState.backup_state === undefined - ) { + if (reducer.currentReducerState?.reducer_type !== "backup") { return <div>invalid state</div>; } const configuredAuthMethods: AuthMethod[] = @@ -62,7 +59,7 @@ export function AuthenticationEditorScreen(): VNode { const authAvailableSet = new Set<string>(); for (const provKey of Object.keys(providers)) { const p = providers[provKey]; - if ("http_status" in p && !("error_code" in p) && p.methods) { + if (p.status === "ok") { for (const meth of p.methods) { authAvailableSet.add(meth.type); } |