gnunet-svn
[Top][All Lists]
Advanced

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

[taler-wallet-core] branch master updated: mutate balance cache when tal


From: gnunet
Subject: [taler-wallet-core] branch master updated: mutate balance cache when talerWithdrawUri changes
Date: Fri, 04 Nov 2022 16:13:28 +0100

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 d2e2c0198 mutate balance cache when talerWithdrawUri changes
d2e2c0198 is described below

commit d2e2c0198f88a3a6c756d7f3b1c3e4cabb833483
Author: Sebastian <sebasjm@gmail.com>
AuthorDate: Fri Nov 4 12:13:19 2022 -0300

    mutate balance cache when talerWithdrawUri changes
---
 packages/demobank-ui/src/pages/home/index.tsx | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/packages/demobank-ui/src/pages/home/index.tsx 
b/packages/demobank-ui/src/pages/home/index.tsx
index 2da48f3ab..6477e018d 100644
--- a/packages/demobank-ui/src/pages/home/index.tsx
+++ b/packages/demobank-ui/src/pages/home/index.tsx
@@ -2112,7 +2112,7 @@ function Account(Props: any): VNode {
   const { accountLabel, backendState } = Props;
   // Getting the bank account balance:
   const endpoint = `access-api/accounts/${accountLabel}`;
-  const { data, error } = useSWR(endpoint, {
+  const { data, error, mutate } = useSWR(endpoint, {
     // refreshInterval: 0,
     // revalidateIfStale: false,
     // revalidateOnMount: false,
@@ -2123,6 +2123,10 @@ function Account(Props: any): VNode {
   const { withdrawalInProgress, withdrawalId, isLoggedIn, talerWithdrawUri } =
     pageState;
   const i18n = useTranslator();
+  useEffect(() => {
+    mutate()
+  }, [talerWithdrawUri])
+
   /**
    * This part shows a list of transactions: with 5 elements by
    * default and offers a "load more" button.

-- 
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]