From a35604fd562a72e4e266bf6a4255d89d3c1374a1 Mon Sep 17 00:00:00 2001
From: Sebastian <sebasjm@gmail.com>
Date: Fri, 19 Nov 2021 14:51:27 -0300
Subject: some changes:

 - simplify design to reuse more components (from wallet instead of popup)
 - simplify hooks (useAsyncAsHook)
 - updateNotification from backend now filter events by type
 - new balance design proposed by Belen
 - more information when the withdrawal is in process
 - manual withdrawal implementation
 - some bugs killed
---
 .../src/wallet/ProviderAddPage.tsx                          | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

(limited to 'packages/taler-wallet-webextension/src/wallet/ProviderAddPage.tsx')

diff --git a/packages/taler-wallet-webextension/src/wallet/ProviderAddPage.tsx b/packages/taler-wallet-webextension/src/wallet/ProviderAddPage.tsx
index 1c7fdc829..41852e38c 100644
--- a/packages/taler-wallet-webextension/src/wallet/ProviderAddPage.tsx
+++ b/packages/taler-wallet-webextension/src/wallet/ProviderAddPage.tsx
@@ -20,7 +20,7 @@ import {
   canonicalizeBaseUrl,
   i18n,
 } from "@gnu-taler/taler-util";
-import { VNode, h } from "preact";
+import { Fragment, h, VNode } from "preact";
 import { useEffect, useState } from "preact/hooks";
 import { Checkbox } from "../components/Checkbox";
 import { ErrorMessage } from "../components/ErrorMessage";
@@ -29,7 +29,6 @@ import {
   ButtonPrimary,
   Input,
   LightText,
-  WalletBox,
   SmallLightText,
 } from "../components/styled/index";
 import * as wxApi from "../wxApi";
@@ -64,7 +63,7 @@ export function ProviderAddPage({ onBack }: Props): VNode {
   async function getProviderInfo(
     url: string,
   ): Promise<BackupBackupProviderTerms> {
-    return fetch(`${url}config`)
+    return fetch(new URL("config", url).href)
       .catch((e) => {
         throw new Error(`Network error`);
       })
@@ -137,7 +136,7 @@ export function SetUrlView({
     }
   }, [value]);
   return (
-    <WalletBox>
+    <Fragment>
       <section>
         <h1> Add backup provider</h1>
         <ErrorMessage
@@ -182,7 +181,7 @@ export function SetUrlView({
           <i18n.Translate>Next</i18n.Translate>
         </ButtonPrimary>
       </footer>
-    </WalletBox>
+    </Fragment>
   );
 }
 
@@ -201,7 +200,7 @@ export function ConfirmProviderView({
   const [accepted, setAccepted] = useState(false);
 
   return (
-    <WalletBox>
+    <Fragment>
       <section>
         <h1>Review terms of service</h1>
         <div>
@@ -239,6 +238,6 @@ export function ConfirmProviderView({
           <i18n.Translate>Add provider</i18n.Translate>
         </ButtonPrimary>
       </footer>
-    </WalletBox>
+    </Fragment>
   );
 }
-- 
cgit v1.2.3

