aboutsummaryrefslogtreecommitdiff
path: root/packages/taler-wallet-webextension/src/wallet/ManualWithdrawPage.tsx
diff options
context:
space:
mode:
authorSebastian <sebasjm@gmail.com>2022-01-20 13:13:53 -0300
committerSebastian <sebasjm@gmail.com>2022-01-24 09:46:20 -0300
commit2a417881bb5c67cf889d54932025badf5a85a9e0 (patch)
tree6f2dc4cd5c08bbf0f8c6a04713e954145ce1f72a /packages/taler-wallet-webextension/src/wallet/ManualWithdrawPage.tsx
parente38be8d8ec1bdf1c854a2391ae9f4641cb69a249 (diff)
downloadwallet-core-2a417881bb5c67cf889d54932025badf5a85a9e0.tar.xz
fix permission api, grouping all cta into same path
Diffstat (limited to 'packages/taler-wallet-webextension/src/wallet/ManualWithdrawPage.tsx')
-rw-r--r--packages/taler-wallet-webextension/src/wallet/ManualWithdrawPage.tsx25
1 files changed, 13 insertions, 12 deletions
diff --git a/packages/taler-wallet-webextension/src/wallet/ManualWithdrawPage.tsx b/packages/taler-wallet-webextension/src/wallet/ManualWithdrawPage.tsx
index c7958eb8a..86c3c1456 100644
--- a/packages/taler-wallet-webextension/src/wallet/ManualWithdrawPage.tsx
+++ b/packages/taler-wallet-webextension/src/wallet/ManualWithdrawPage.tsx
@@ -14,23 +14,23 @@
TALER; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
*/
-import { VNode, h, Fragment } from "preact";
-import { useState } from "preact/hooks";
-import { CreateManualWithdraw } from "./CreateManualWithdraw";
-import * as wxApi from "../wxApi";
import {
AcceptManualWithdrawalResult,
AmountJson,
Amounts,
NotificationType,
} from "@gnu-taler/taler-util";
-import { ReserveCreated } from "./ReserveCreated";
+import { h, VNode } from "preact";
import { route } from "preact-router";
-import { Pages } from "../NavigationBar";
+import { useState } from "preact/hooks";
+import { Loading } from "../components/Loading";
+import { LoadingError } from "../components/LoadingError";
import { useAsyncAsHook } from "../hooks/useAsyncAsHook";
+import { Pages } from "../NavigationBar";
+import * as wxApi from "../wxApi";
+import { CreateManualWithdraw } from "./CreateManualWithdraw";
import { ExchangeAddPage } from "./ExchangeAddPage";
-import { Loading } from "../components/Loading";
-import { ErrorBox } from "../components/styled";
+import { ReserveCreated } from "./ReserveCreated";
export function ManualWithdrawPage({ currency }: { currency?: string }): VNode {
const [success, setSuccess] = useState<
@@ -92,12 +92,13 @@ export function ManualWithdrawPage({ currency }: { currency?: string }): VNode {
}
if (state.hasError) {
return (
- <Fragment>
- <ErrorBox>{state.message}</ErrorBox>
- <p>There was an error getting the known exchanges</p>
- </Fragment>
+ <LoadingError
+ title="Could not load the list of known exchanges"
+ error={state}
+ />
);
}
+
const exchangeList = state.response.exchanges.reduce(
(p, c) => ({
...p,