gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-wallet-core] branch master updated: fix #8495


From: gnunet
Subject: [taler-wallet-core] branch master updated: fix #8495
Date: Tue, 16 Apr 2024 18:20:01 +0200

This is an automated email from the git hooks/post-receive script.

sebasjm pushed a commit to branch master
in repository wallet-core.

The following commit(s) were added to refs/heads/master by this push:
     new 20dcf05e4 fix #8495
20dcf05e4 is described below

commit 20dcf05e4216b8e71a3d024aa248789ad514a3a8
Author: Sebastian <sebasjm@gmail.com>
AuthorDate: Tue Apr 16 13:19:56 2024 -0300

    fix #8495
---
 .../taler-wallet-webextension/src/cta/Withdraw/state.ts | 17 +++++------------
 .../src/wallet/DestinationSelection/views.tsx           | 14 +++++++++++++-
 .../taler-wallet-webextension/src/wallet/History.tsx    |  7 -------
 .../taler-wallet-webextension/src/wallet/QrReader.tsx   |  2 +-
 4 files changed, 19 insertions(+), 21 deletions(-)

diff --git a/packages/taler-wallet-webextension/src/cta/Withdraw/state.ts 
b/packages/taler-wallet-webextension/src/cta/Withdraw/state.ts
index 7486d5f97..f2fa04902 100644
--- a/packages/taler-wallet-webextension/src/cta/Withdraw/state.ts
+++ b/packages/taler-wallet-webextension/src/cta/Withdraw/state.ts
@@ -14,15 +14,13 @@
  GNU Taler; see the file COPYING.  If not, see <http://www.gnu.org/licenses/>
  */
 
-/* eslint-disable react-hooks/rules-of-hooks */
 import {
   AmountJson,
   Amounts,
   ExchangeFullDetails,
   ExchangeListItem,
   NotificationType,
-  TalerError,
-  parseWithdrawExchangeUri,
+  parseWithdrawExchangeUri
 } from "@gnu-taler/taler-util";
 import { WalletApiOperation } from "@gnu-taler/taler-wallet-core";
 import { useTranslationContext } from "@gnu-taler/web-util/browser";
@@ -244,9 +242,7 @@ export function useComponentStateFromURI({
     }
     return api.listener.onUpdateNotification(
       [NotificationType.WithdrawalOperationTransition],
-      (asd) => {
-        uriInfoHook.retry();
-      },
+      uriInfoHook.retry,
     );
   }, [readyToListen]);
 
@@ -377,9 +373,6 @@ function exchangeSelectionState(
       };
     }, []);
 
-    const [withdrawError, setWithdrawError] = useState<TalerError | undefined>(
-      undefined,
-    );
     const [doingWithdraw, setDoingWithdraw] = useState<boolean>(false);
 
     async function doWithdrawAndCheckError(): Promise<void> {
@@ -395,9 +388,9 @@ function exchangeSelectionState(
           onSuccess(res.transactionId);
         }
       } catch (e) {
-        if (e instanceof TalerError) {
-          setWithdrawError(e);
-        }
+        console.error(e);
+        // if (e instanceof TalerError) {
+        // }
       }
       setDoingWithdraw(false);
     }
diff --git 
a/packages/taler-wallet-webextension/src/wallet/DestinationSelection/views.tsx 
b/packages/taler-wallet-webextension/src/wallet/DestinationSelection/views.tsx
index c40a3a64c..8a74a20f1 100644
--- 
a/packages/taler-wallet-webextension/src/wallet/DestinationSelection/views.tsx
+++ 
b/packages/taler-wallet-webextension/src/wallet/DestinationSelection/views.tsx
@@ -169,7 +169,9 @@ const CircleDiv = styled.div`
   text-align: center;
   text-decoration: none;
   text-transform: uppercase;
-  transition: background-color 0.15s ease, border-color 0.15s ease,
+  transition:
+    background-color 0.15s ease,
+    border-color 0.15s ease,
     color 0.15s ease;
   font-size: 16px;
   background-color: #86a7bd1a;
@@ -275,6 +277,16 @@ export function ReadyGetView({
               </Button>
             </Paper>
           </Grid>
+          <Grid item xs={1}>
+            <Paper style={{ padding: 8 }}>
+              <p>
+                <i18n.Translate>From a <pre 
style={{display:"inline"}}>taler://peer-push-credit</pre> URI</i18n.Translate>
+              </p>
+              <a href={Pages.qr}>
+                <i18n.Translate>Enter URI here</i18n.Translate>
+              </a>
+            </Paper>
+          </Grid>
         </Grid>
       </Grid>
     </Container>
diff --git a/packages/taler-wallet-webextension/src/wallet/History.tsx 
b/packages/taler-wallet-webextension/src/wallet/History.tsx
index 6006ce5e7..f81e6db9f 100644
--- a/packages/taler-wallet-webextension/src/wallet/History.tsx
+++ b/packages/taler-wallet-webextension/src/wallet/History.tsx
@@ -135,7 +135,6 @@ export function HistoryPage({
   if (showSearch) {
     return (
       <FilteredHistoryView
-        balance={state.response.b.balances[balanceIndex]}
         search={{
           value: search ?? "",
           onInput: pushAlertOnError(async (d: string) => {
@@ -307,20 +306,14 @@ export function HistoryView({
 }
 
 export function FilteredHistoryView({
-  balance,
   search,
   transactionsByDate,
 }: {
-  balance: WalletBalance;
   search: TextFieldHandler;
   transactionsByDate: Record<string, Transaction[]>;
 }): VNode {
   const { i18n } = useTranslationContext();
 
-  const available = balance
-    ? Amounts.jsonifyAmount(balance.available)
-    : undefined;
-
   const datesWithTransaction: string[] = Object.keys(transactionsByDate);
 
   return (
diff --git a/packages/taler-wallet-webextension/src/wallet/QrReader.tsx 
b/packages/taler-wallet-webextension/src/wallet/QrReader.tsx
index d36524cc4..a01ea6967 100644
--- a/packages/taler-wallet-webextension/src/wallet/QrReader.tsx
+++ b/packages/taler-wallet-webextension/src/wallet/QrReader.tsx
@@ -307,7 +307,7 @@ export function QrReaderPage({ onDetected }: Props): VNode {
           <div style={{ width: "75%" }}>
             <TextField
               label="Taler URI"
-              variant="standard"
+              variant="filled"
               fullWidth
               value={value}
               onChange={onChange}

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]