summaryrefslogtreecommitdiff
path: root/packages/taler-wallet-webextension/src/wallet
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2024-01-29 12:41:42 +0100
committerFlorian Dold <florian@dold.me>2024-01-29 12:41:42 +0100
commitc1b7a1b02fd946cab3b6f1e772d06b64f1ff133f (patch)
treef759a81839ac766baae12c8ce1c6a064102681ea /packages/taler-wallet-webextension/src/wallet
parent4a2e9c857e03b09535b0f13f41ddd3d049f495ed (diff)
downloadwallet-core-c1b7a1b02fd946cab3b6f1e772d06b64f1ff133f.tar.gz
wallet-core-c1b7a1b02fd946cab3b6f1e772d06b64f1ff133f.tar.bz2
wallet-core-c1b7a1b02fd946cab3b6f1e772d06b64f1ff133f.zip
-type error
Diffstat (limited to 'packages/taler-wallet-webextension/src/wallet')
-rw-r--r--packages/taler-wallet-webextension/src/wallet/DeveloperPage.tsx36
1 files 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
index 0a01b8a95..faa64e07d 100644
--- 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>
)}