gnunet-svn
[Top][All Lists]
Advanced

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

[taler-wallet-core] branch master updated: log notification from wallet


From: gnunet
Subject: [taler-wallet-core] branch master updated: log notification from wallet
Date: Tue, 20 Jun 2023 16:19:39 +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 773712419 log notification from wallet
773712419 is described below

commit 773712419e7663f62a3c529b7743dd6964f0879a
Author: Sebastian <sebasjm@gmail.com>
AuthorDate: Tue Jun 20 11:18:37 2023 -0300

    log notification from wallet
---
 packages/taler-wallet-webextension/src/platform/api.ts |  5 ++---
 .../src/wallet/DestinationSelection/index.ts           |  1 -
 .../src/wallet/DestinationSelection/state.ts           | 18 ------------------
 packages/taler-wallet-webextension/src/wxBackend.ts    |  5 +++--
 4 files changed, 5 insertions(+), 24 deletions(-)

diff --git a/packages/taler-wallet-webextension/src/platform/api.ts 
b/packages/taler-wallet-webextension/src/platform/api.ts
index 49108fa63..2537b16c2 100644
--- a/packages/taler-wallet-webextension/src/platform/api.ts
+++ b/packages/taler-wallet-webextension/src/platform/api.ts
@@ -18,6 +18,7 @@ import {
   CoreApiResponse,
   NotificationType,
   TalerUri,
+  WalletNotification,
 } from "@gnu-taler/taler-util";
 import {
   WalletConfig,
@@ -60,9 +61,7 @@ export interface CrossBrowserPermissionsApi {
   ): void;
 }
 
-export type MessageFromBackend = {
-  type: NotificationType;
-};
+export type MessageFromBackend = WalletNotification;
 
 export type MessageFromFrontend<
   Op extends BackgroundOperations | WalletOperations | ExtensionOperations,
diff --git 
a/packages/taler-wallet-webextension/src/wallet/DestinationSelection/index.ts 
b/packages/taler-wallet-webextension/src/wallet/DestinationSelection/index.ts
index e0f5869ff..7724ec2be 100644
--- 
a/packages/taler-wallet-webextension/src/wallet/DestinationSelection/index.ts
+++ 
b/packages/taler-wallet-webextension/src/wallet/DestinationSelection/index.ts
@@ -75,7 +75,6 @@ export namespace State {
     goToBank: ButtonHandler;
     goToWallet: ButtonHandler;
     amountHandler: AmountFieldHandler;
-    mode: ToggleHandler;
   }
 }
 
diff --git 
a/packages/taler-wallet-webextension/src/wallet/DestinationSelection/state.ts 
b/packages/taler-wallet-webextension/src/wallet/DestinationSelection/state.ts
index 41831a78a..e42b1dbf9 100644
--- 
a/packages/taler-wallet-webextension/src/wallet/DestinationSelection/state.ts
+++ 
b/packages/taler-wallet-webextension/src/wallet/DestinationSelection/state.ts
@@ -47,8 +47,6 @@ export function useComponentState(props: Props): 
RecursiveState<State> {
   const [amount, setAmount] = useState(
     !parsedInitialAmount ? undefined : parsedInitialAmount,
   );
-  const [rawMode, setRawMode] = useState(false);
-
   //FIXME: get this information from wallet
   // eslint-disable-next-line no-constant-condition
   const previous: Contact[] = true
@@ -119,14 +117,6 @@ export function useComponentState(props: Props): 
RecursiveState<State> {
       return {
         status: "ready",
         error: undefined,
-        mode: {
-          button: {
-            onClick: pushAlertOnError(async () => {
-              setRawMode(!rawMode);
-            }),
-          },
-          value: rawMode,
-        },
         previous,
         selectCurrency: {
           onClick: pushAlertOnError(async () => {
@@ -166,14 +156,6 @@ export function useComponentState(props: Props): 
RecursiveState<State> {
         status: "ready",
         error: undefined,
         previous,
-        mode: {
-          button: {
-            onClick: pushAlertOnError(async () => {
-              setRawMode(!rawMode);
-            }),
-          },
-          value: rawMode,
-        },
         selectCurrency: {
           onClick: pushAlertOnError(async () => {
             setAmount(undefined);
diff --git a/packages/taler-wallet-webextension/src/wxBackend.ts 
b/packages/taler-wallet-webextension/src/wxBackend.ts
index 57d4add1c..dfdb1b0d5 100644
--- a/packages/taler-wallet-webextension/src/wxBackend.ts
+++ b/packages/taler-wallet-webextension/src/wxBackend.ts
@@ -28,6 +28,7 @@ import {
   Logger,
   TalerErrorCode,
   WalletDiagnostics,
+  WalletNotification,
   getErrorDetailFromException,
   makeErrorDetail,
   setGlobalLogLevelFromString,
@@ -342,8 +343,8 @@ async function reinitWallet(): Promise<void> {
     walletInit.reject(e);
     return;
   }
-  wallet.addNotificationListener((x) => {
-    const message: MessageFromBackend = { type: x.type };
+  wallet.addNotificationListener((message) => {
+    logger.info("wallet -> ui", message);
     platform.sendMessageToAllChannels(message);
   });
 

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