commit 8d1c1482e0714f31c1c0f0e04ee9c053e00ecccc
parent 1db97ee5c7fa239e07c2a30a9b1932c1fc30cff9
Author: Sebastian <sebasjm@gmail.com>
Date: Sat, 2 Aug 2025 18:41:22 +0200
fix broken build
Diffstat:
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/packages/taler-wallet-webextension/src/cta/Payment/state.ts b/packages/taler-wallet-webextension/src/cta/Payment/state.ts
@@ -22,7 +22,7 @@ import {
} from "@gnu-taler/taler-util";
import { WalletApiOperation } from "@gnu-taler/taler-wallet-core";
import { useTranslationContext } from "@gnu-taler/web-util/browser";
-import { useEffect } from "preact/hooks";
+import { useEffect, useState } from "preact/hooks";
import { alertFromError, useAlertContext } from "../../context/alert.js";
import { useBackendContext } from "../../context/backend.js";
import { useAsyncAsHook } from "../../hooks/useAsyncAsHook.js";
@@ -38,6 +38,7 @@ export function useComponentState({
const { pushAlertOnError } = useAlertContext();
const api = useBackendContext();
const { i18n } = useTranslationContext();
+ const [selectedChoice, onSelectChoice] = useState<number>(0)
const hook = useAsyncAsHook(async () => {
if (!talerPayUri) throw Error("ERROR_NO-URI-FOR-PAYMENT");
@@ -167,12 +168,13 @@ export function useComponentState({
onClick: pushAlertOnError(doPayment),
};
- // (payStatus.status === PreparePayResultType.PaymentPossible)
return {
status: "ready",
payHandler,
payStatus,
...baseResult,
balance: foundAmount,
+ onSelectChoice,
+ selectedChoice,
};
}