diff options
Diffstat (limited to 'packages/taler-wallet-webextension/src')
4 files changed, 9 insertions, 6 deletions
diff --git a/packages/taler-wallet-webextension/src/cta/PaymentTemplate/state.ts b/packages/taler-wallet-webextension/src/cta/PaymentTemplate/state.ts index 75910549f..6b4584fea 100644 --- a/packages/taler-wallet-webextension/src/cta/PaymentTemplate/state.ts +++ b/packages/taler-wallet-webextension/src/cta/PaymentTemplate/state.ts @@ -125,7 +125,9 @@ export function useComponentState({ }, ); setNewOrder(payStatus.talerUri!); - } catch (e) {} + } catch (e) { + console.error(e); + } } const errors = undefinedIfEmpty({ amount: amount && Amounts.isZero(amount) ? i18n.str`required` : undefined, @@ -164,7 +166,9 @@ export function useComponentState({ } function undefinedIfEmpty<T extends object>(obj: T): T | undefined { - return Object.keys(obj).some((k) => (obj as any)[k] !== undefined) + return Object.keys(obj).some( + (k) => (obj as Record<string, unknown>)[k] !== undefined, + ) ? obj : undefined; } diff --git a/packages/taler-wallet-webextension/src/hooks/useAsyncAsHook.ts b/packages/taler-wallet-webextension/src/hooks/useAsyncAsHook.ts index a5e357f7d..bd430f2ef 100644 --- a/packages/taler-wallet-webextension/src/hooks/useAsyncAsHook.ts +++ b/packages/taler-wallet-webextension/src/hooks/useAsyncAsHook.ts @@ -48,14 +48,13 @@ export type HookResponseWithRetry<T> = export function useAsyncAsHook<T>( fn: () => Promise<T | false>, - deps?: any[], + deps?: unknown[], ): HookResponseWithRetry<T> { const [result, setHookResponse] = useState<HookResponse<T>>(undefined); const args = useMemo( () => ({ fn, - // eslint-disable-next-line react-hooks/exhaustive-deps }), deps || [], ); diff --git a/packages/taler-wallet-webextension/src/wallet/Settings.tsx b/packages/taler-wallet-webextension/src/wallet/Settings.tsx index 34dd24cea..2d80e4c36 100644 --- a/packages/taler-wallet-webextension/src/wallet/Settings.tsx +++ b/packages/taler-wallet-webextension/src/wallet/Settings.tsx @@ -159,7 +159,7 @@ export function SettingsView({ <WarningBox> <i18n.Translate> The version of wallet core is not supported. (supported - version: {WALLET_CORE_SUPPORTED_VERSION}) + version: {WALLET_CORE_SUPPORTED_VERSION}, wallet version: {coreVersion.version}) </i18n.Translate> </WarningBox> )} diff --git a/packages/taler-wallet-webextension/src/wxApi.ts b/packages/taler-wallet-webextension/src/wxApi.ts index 495f015ff..5588eb55e 100644 --- a/packages/taler-wallet-webextension/src/wxApi.ts +++ b/packages/taler-wallet-webextension/src/wxApi.ts @@ -55,7 +55,7 @@ import { platform } from "./platform/foreground.js"; const logger = new Logger("wxApi"); -export const WALLET_CORE_SUPPORTED_VERSION = "1:0:0" +export const WALLET_CORE_SUPPORTED_VERSION = "4:0:0" export interface ExtendedPermissionsResponse { newValue: boolean; |