aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2023-07-31 15:57:06 +0200
committerFlorian Dold <florian@dold.me>2023-07-31 15:57:12 +0200
commite3460de3317e2c0689cc32519cf5a02a142bfc99 (patch)
tree3f922bd2e2092d85a31945fb1c7ede17666742c7
parent0ac5dba0889fa6443b93faf6051b96e5ddb7a6ab (diff)
downloadwallet-core-e3460de3317e2c0689cc32519cf5a02a142bfc99.tar.xz
-comments
-rw-r--r--packages/anastasis-webui/src/hooks/use-anastasis-reducer.ts1
-rw-r--r--packages/anastasis-webui/src/pages/home/ContinentSelectionScreen.tsx4
-rw-r--r--packages/anastasis-webui/src/pages/home/index.tsx2
3 files changed, 6 insertions, 1 deletions
diff --git a/packages/anastasis-webui/src/hooks/use-anastasis-reducer.ts b/packages/anastasis-webui/src/hooks/use-anastasis-reducer.ts
index 3ad563ee6..fc8c4cf6c 100644
--- a/packages/anastasis-webui/src/hooks/use-anastasis-reducer.ts
+++ b/packages/anastasis-webui/src/hooks/use-anastasis-reducer.ts
@@ -136,6 +136,7 @@ export interface DiscoveryUiState {
export interface AnastasisReducerApi {
currentReducerState: ReducerState | undefined;
+ // FIXME: Explain better!
currentError: any;
discoveryState: DiscoveryUiState;
dismissError: () => void;
diff --git a/packages/anastasis-webui/src/pages/home/ContinentSelectionScreen.tsx b/packages/anastasis-webui/src/pages/home/ContinentSelectionScreen.tsx
index fc9c0f097..3231e61e4 100644
--- a/packages/anastasis-webui/src/pages/home/ContinentSelectionScreen.tsx
+++ b/packages/anastasis-webui/src/pages/home/ContinentSelectionScreen.tsx
@@ -46,8 +46,9 @@ export function ContinentSelectionScreen(): VNode {
// const cc = reducer.currentReducerState.selected_country || "";
const theCountry = countryList.find((c) => c.code === countryCode);
const selectCountryAction = async () => {
- //selection should be when the select box changes it value
+ // selection should be when the select box changes it value
if (!theCountry) return;
+ // FIXME: Why is there no await?
reducer.transition("select_country", {
country_code: countryCode,
});
@@ -56,6 +57,7 @@ export function ContinentSelectionScreen(): VNode {
// const step1 = reducer.currentReducerState.backup_state === BackupStates.ContinentSelecting ||
// reducer.currentReducerState.recovery_state === RecoveryStates.ContinentSelecting;
+ // FIXME: i18n
const errors = !theCountry ? "Select a country" : undefined;
const handleBack = async () => {
diff --git a/packages/anastasis-webui/src/pages/home/index.tsx b/packages/anastasis-webui/src/pages/home/index.tsx
index 44e065807..c665144a4 100644
--- a/packages/anastasis-webui/src/pages/home/index.tsx
+++ b/packages/anastasis-webui/src/pages/home/index.tsx
@@ -228,6 +228,8 @@ function AnastasisClientImpl(): VNode {
return <StartScreen />;
}
+ // FIXME: Use switch statements here!
+
if (
(state.reducer_type === "backup" &&
state.backup_state === BackupStates.ContinentSelecting) ||