commit 872d0f0be6bbb1f3fcd6164b111884877cea6442
parent 2c2c2057cd55bbc43b32e94ba6198c6b09ff9a75
Author: Sebastian <sebasjm@gmail.com>
Date: Wed, 29 Nov 2023 18:21:44 -0300
fix cache clash
Diffstat:
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/packages/demobank-ui/src/hooks/circuit.ts b/packages/demobank-ui/src/hooks/circuit.ts
@@ -194,7 +194,7 @@ export function useOnePendingCashouts(account: string) {
}
const { data, error } = useSWR<OperationOk<CashoutWithId | undefined> | TalerCoreBankErrorsByMethod<"getAccountCashouts"> | TalerCoreBankErrorsByMethod<"getCashoutById">, TalerHttpError>(
- !config.allow_conversion ? undefined : [account, token, "getAccountCashouts"], fetcher, {
+ !config.allow_conversion ? undefined : [account, token, "useOnePendingCashouts"], fetcher, {
refreshInterval: 0,
refreshWhenHidden: false,
revalidateOnFocus: false,
@@ -229,13 +229,12 @@ export function useCashouts(account: string) {
return { ...r.body, id: c.cashout_id }
})
}))
-
const cashouts = all.filter(notUndefined)
return { type: "ok" as const, body: { cashouts } }
}
const { data, error } = useSWR<OperationOk<{ cashouts: CashoutWithId[] }> | TalerCoreBankErrorsByMethod<"getAccountCashouts">, TalerHttpError>(
- !config.allow_conversion ? undefined : [account, token, "getAccountCashouts"], fetcher, {
+ !config.allow_conversion ? undefined : [account, token, "useCashouts"], fetcher, {
refreshInterval: 0,
refreshWhenHidden: false,
revalidateOnFocus: false,
diff --git a/packages/demobank-ui/src/pages/BankFrame.tsx b/packages/demobank-ui/src/pages/BankFrame.tsx
@@ -47,8 +47,10 @@ export function BankFrame({
if (error) {
const desc = (error instanceof Error ? error.stack : String(error)) as TranslatedString
if (error instanceof Error) {
+ console.log("Internal error, please report", error)
notifyException(i18n.str`Internal error, please report.`, error)
} else {
+ console.log("Internal error, please report", error)
notifyError(i18n.str`Internal error, please report.`, String(error) as TranslatedString)
}
resetError()