diff options
author | Sebastian <sebasjm@gmail.com> | 2022-06-09 16:11:49 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2022-06-09 16:12:18 -0300 |
commit | 3ebb1d18154375471e329f2bad40534d858cbe1e (patch) | |
tree | 5a7e5d14eb03c88eddbe0d61afa4ee1335768d65 /packages/anastasis-webui/src/hooks | |
parent | 78b056a0b1613ef19d1d72c17fd256c2e86e6774 (diff) | |
download | wallet-core-3ebb1d18154375471e329f2bad40534d858cbe1e.tar.xz |
better select secret screen
Diffstat (limited to 'packages/anastasis-webui/src/hooks')
-rw-r--r-- | packages/anastasis-webui/src/hooks/async.ts | 2 | ||||
-rw-r--r-- | packages/anastasis-webui/src/hooks/use-anastasis-reducer.ts | 8 |
2 files changed, 0 insertions, 10 deletions
diff --git a/packages/anastasis-webui/src/hooks/async.ts b/packages/anastasis-webui/src/hooks/async.ts index cb1bb45f2..fc757ea81 100644 --- a/packages/anastasis-webui/src/hooks/async.ts +++ b/packages/anastasis-webui/src/hooks/async.ts @@ -66,9 +66,7 @@ export function useAsync<T>( }, tooLong); try { - console.log("calling async", args); const result = await fn(...args); - console.log("async back", result); if (!isMounted()) { // Possibly calling fn(...) resulted in the component being unmounted. return; diff --git a/packages/anastasis-webui/src/hooks/use-anastasis-reducer.ts b/packages/anastasis-webui/src/hooks/use-anastasis-reducer.ts index cd00950e4..f78576118 100644 --- a/packages/anastasis-webui/src/hooks/use-anastasis-reducer.ts +++ b/packages/anastasis-webui/src/hooks/use-anastasis-reducer.ts @@ -177,7 +177,6 @@ function getStateFromStorage(): any { if (s === "undefined") { state = undefined; } else if (s) { - console.log("restoring state from", s); state = JSON.parse(s); } } catch (e) { @@ -225,7 +224,6 @@ export function useAnastasisReducer(): AnastasisReducerApi { if (Object.keys(updates).length === 0) { return; } - console.log("got provider updates", updates); const rs2 = reducerState; if (rs2.reducer_type !== "backup" && rs2.reducer_type !== "recovery") { return; @@ -248,19 +246,15 @@ export function useAnastasisReducer(): AnastasisReducerApi { }; async function doTransition(action: string, args: any): Promise<void> { - console.log("reducing with", action, args); let s: ReducerState; if (remoteReducer) { s = await reduceStateRemote(anastasisState.reducerState, action, args); } else { s = await reduceAction(anastasisState.reducerState!, action, args); } - console.log("got response from reducer", s); if (s.reducer_type === "error") { - console.log("response is an error"); setAnastasisState({ ...anastasisState, currentError: s }); } else { - console.log("response is a new state"); setAnastasisState({ ...anastasisState, currentError: undefined, @@ -387,7 +381,6 @@ export function useAnastasisReducer(): AnastasisReducerApi { console.log("exception during reducer transaction", e); } const s = txHandle.transactionState; - console.log("transaction finished, new state", s); if (s.reducer_type === "error") { setAnastasisState({ ...anastasisState, @@ -413,7 +406,6 @@ class ReducerTxImpl implements ReducerTransactionHandle { } else { s = await reduceAction(this.transactionState, action, args); } - console.log("making transition in transaction", action); this.transactionState = s; // Abort transaction as soon as we transition into an error state. if (this.transactionState.reducer_type === "error") { |