summaryrefslogtreecommitdiff
path: root/packages/taler-wallet-webextension/src/wallet/DeveloperPage.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'packages/taler-wallet-webextension/src/wallet/DeveloperPage.tsx')
-rw-r--r--packages/taler-wallet-webextension/src/wallet/DeveloperPage.tsx44
1 files changed, 8 insertions, 36 deletions
diff --git a/packages/taler-wallet-webextension/src/wallet/DeveloperPage.tsx b/packages/taler-wallet-webextension/src/wallet/DeveloperPage.tsx
index d19fef155..adb114862 100644
--- a/packages/taler-wallet-webextension/src/wallet/DeveloperPage.tsx
+++ b/packages/taler-wallet-webextension/src/wallet/DeveloperPage.tsx
@@ -103,16 +103,16 @@ export function DeveloperPage({ }: Props): VNode {
const hook = useAsyncAsHook(async () => {
const list = await api.wallet.call(WalletApiOperation.ListExchanges, {});
const version = await api.wallet.call(WalletApiOperation.GetVersion, {});
- const operations: any[] = await api.wallet.call(
- WalletApiOperation.GetPendingOperations,
+ const tasks = await api.wallet.call(
+ WalletApiOperation.GetActiveTasks,
{},
);
const coins = await api.wallet.call(WalletApiOperation.DumpCoins, {});
- return { exchanges: list.exchanges, version, coins, operations };
+ return { exchanges: list.exchanges, version, coins, tasks:tasks.tasks };
});
const exchangeList = hook && !hook.hasError ? hook.response.exchanges : [];
const coins = hook && !hook.hasError ? hook.response.coins.coins : [];
- const operations = hook && !hook.hasError ? hook.response.operations : [];
+ const tasks = hook && !hook.hasError ? hook.response.tasks : [];
useEffect(() => {
return api.listener.onUpdateNotification(listenAllEvents, hook?.retry);
@@ -485,34 +485,6 @@ export function DeveloperPage({ }: Props): VNode {
Set log level
</Button>
</Paper>
- <Paper style={{ padding: 10, margin: 10 }}>
- <h3>Exchange</h3>
- <div>
- <TextField
- label="Exchange URL"
- placeholder="exchange.demo.taler.net"
- variant="filled"
- // error={subject.error}
- required
- value={exchangeURL}
- onChange={setExchangeURL}
- />
- </div>
- <Button
- variant="contained"
- onClick={async () => {
- const resp = await fetch(new URL("/keys", exchangeURL).href);
- const j = await resp.json();
- api.wallet.call(WalletApiOperation.AddGlobalCurrencyExchange, {
- currency: j.currency,
- exchangeBaseUrl: j.base_url,
- exchangeMasterPub: j.master_public_key,
- });
- }}
- >
- Set exchange as Global
- </Button>
- </Paper>
{downloadedDatabase && (
<div>
<i18n.Translate>
@@ -573,19 +545,19 @@ export function DeveloperPage({ }: Props): VNode {
);
})}
<br />
- {operations && operations.length > 0 && (
+ {tasks && tasks.length > 0 && (
<Fragment>
<p>
<i18n.Translate>Pending operations</i18n.Translate>
</p>
<dl>
- {operations.reverse().map((o) => {
+ {tasks.map((o) => {
return (
<NotifyUpdateFadeOut key={hashObjectId(o)}>
<dt>
- {o.type}{" "}
+ {o.id}{" "}
<Time
- timestamp={o.timestampDue}
+ timestamp={o.nextTry}
format="yy/MM/dd HH:mm:ss"
/>
</dt>