From e89821a6c7f5b740ab5781354149dd2cc2b4047c Mon Sep 17 00:00:00 2001
From: Sebastian <sebasjm@gmail.com>
Date: Fri, 25 Mar 2022 17:06:38 -0300
Subject: show pending operations on main pages

---
 .../src/wallet/Application.tsx                     | 32 +++++++++++++---------
 1 file changed, 19 insertions(+), 13 deletions(-)

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

diff --git a/packages/taler-wallet-webextension/src/wallet/Application.tsx b/packages/taler-wallet-webextension/src/wallet/Application.tsx
index 2116b500e..88a84d960 100644
--- a/packages/taler-wallet-webextension/src/wallet/Application.tsx
+++ b/packages/taler-wallet-webextension/src/wallet/Application.tsx
@@ -83,19 +83,21 @@ export function Application(): VNode {
                 <Fragment>
                   <LogoHeader />
                   <WalletNavBar path={path} />
-                  <div
-                    style={{
-                      backgroundColor: "lightcyan",
-                      display: "flex",
-                      justifyContent: "center",
-                    }}
-                  >
-                    <PendingTransactions
-                      goToTransaction={(txId: string) =>
-                        route(Pages.balance_transaction.replace(":tid", txId))
-                      }
-                    />
-                  </div>
+                  {shouldShowPendingOperations(path) && (
+                    <div
+                      style={{
+                        backgroundColor: "lightcyan",
+                        display: "flex",
+                        justifyContent: "center",
+                      }}
+                    >
+                      <PendingTransactions
+                        goToTransaction={(txId: string) =>
+                          route(Pages.balance_transaction.replace(":tid", txId))
+                        }
+                      />
+                    </div>
+                  )}
                 </Fragment>
               );
             }}
@@ -261,3 +263,7 @@ function Redirect({ to }: { to: string }): null {
   });
   return null;
 }
+
+function shouldShowPendingOperations(path: string): boolean {
+  return ["/balance/history/", "/dev", "/settings", "/backup"].includes(path);
+}
-- 
cgit v1.2.3

