taler-typescript-core

Wallet core logic and WebUIs for various components
Log | Files | Refs | Submodules | README | LICENSE

commit c1b7a1b02fd946cab3b6f1e772d06b64f1ff133f
parent 4a2e9c857e03b09535b0f13f41ddd3d049f495ed
Author: Florian Dold <florian@dold.me>
Date:   Mon, 29 Jan 2024 12:41:42 +0100

-type error

Diffstat:
Mpackages/taler-wallet-webextension/src/wallet/DeveloperPage.tsx | 36++++++++++++++++++++----------------
1 file changed, 20 insertions(+), 16 deletions(-)

diff --git a/packages/taler-wallet-webextension/src/wallet/DeveloperPage.tsx b/packages/taler-wallet-webextension/src/wallet/DeveloperPage.tsx @@ -42,7 +42,6 @@ import { Paper } from "../mui/Paper.js"; import { TextField } from "../mui/TextField.js"; export function DeveloperPage(): VNode { - const listenAllEvents = Array.from<NotificationType>({ length: 1 }); const api = useBackendContext(); @@ -113,11 +112,7 @@ function hashObjectId(o: any): string { return JSON.stringify(o); } -export function View({ - operations, - coins, - onDownloadDatabase, -}: Props): VNode { +export function View({ operations, coins, onDownloadDatabase }: Props): VNode { const { i18n } = useTranslationContext(); const [downloadedDatabase, setDownloadedDatabase] = useState< { time: Date; content: string } | undefined @@ -133,7 +128,7 @@ export function View({ const fileRef = useRef<HTMLInputElement>(null); async function onImportDatabase(str: string): Promise<void> { - return api.wallet.call(WalletApiOperation.ImportDb, { + await api.wallet.call(WalletApiOperation.ImportDb, { dump: JSON.parse(str), }); } @@ -258,16 +253,22 @@ export function View({ </Button> </Grid> <Grid item> - <Button variant="contained" onClick={async () => { - api.background.call("toggleHeaderListener", true) - }}> + <Button + variant="contained" + onClick={async () => { + api.background.call("toggleHeaderListener", true); + }} + > <i18n.Translate>enable header listener</i18n.Translate> </Button> </Grid> <Grid item> - <Button variant="contained" onClick={async () => { - api.background.call("toggleHeaderListener", false) - }}> + <Button + variant="contained" + onClick={async () => { + api.background.call("toggleHeaderListener", false); + }} + > <i18n.Translate>disable header listener</i18n.Translate> </Button> </Grid> @@ -398,12 +399,14 @@ export function View({ {downloadedDatabase && ( <div> <i18n.Translate> - Database exported at <Time + Database exported at{" "} + <Time timestamp={AbsoluteTime.fromMilliseconds( downloadedDatabase.time.getTime(), )} format="yyyy/MM/dd HH:mm:ss" - /> <a + />{" "} + <a href={`data:text/plain;charset=utf-8;base64,${toBase64( downloadedDatabase.content, )}`} @@ -413,7 +416,8 @@ export function View({ )}.json`} > <i18n.Translate>click here</i18n.Translate> - </a> to download + </a>{" "} + to download </i18n.Translate> </div> )}