gnunet-svn
[Top][All Lists]
Advanced

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

[taler-wallet-core] branch master updated: give payload notification to


From: gnunet
Subject: [taler-wallet-core] branch master updated: give payload notification to Android
Date: Fri, 06 Mar 2020 19:01:45 +0100

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

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

The following commit(s) were added to refs/heads/master by this push:
     new c5c30866 give payload notification to Android
c5c30866 is described below

commit c5c308661e1080b30c20b1e50d1072b269f4a482
Author: Florian Dold <address@hidden>
AuthorDate: Fri Mar 6 23:31:35 2020 +0530

    give payload notification to Android
---
 src/android/index.ts | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)

diff --git a/src/android/index.ts b/src/android/index.ts
index 20d83d71..351d8924 100644
--- a/src/android/index.ts
+++ b/src/android/index.ts
@@ -33,6 +33,7 @@ import {
 } from "../util/http";
 import { NodeHttpLib } from "../headless/NodeHttpLib";
 import { OperationFailedAndReportedError } from "../operations/errors";
+import { WalletNotification } from "../types/notifications";
 
 // @ts-ignore: special built-in module
 //import akono = require("akono");
@@ -140,8 +141,10 @@ class AndroidWalletMessageHandler {
     switch (operation) {
       case "init": {
         this.walletArgs = {
-          notifyHandler: async () => {
-            sendAkonoMessage(JSON.stringify({ type: "notification" }));
+          notifyHandler: async (notification: WalletNotification) => {
+            sendAkonoMessage(
+              JSON.stringify({ type: "notification", payload: notification }),
+            );
           },
           persistentStoragePath: args.persistentStoragePath,
           httpLib: this.httpLib,
@@ -290,7 +293,13 @@ export function installAndroidWalletListener() {
       console.log(
         `android listener: sending success response for ${operation} (${id})`,
       );
-      const respMsg = { type: "response", id, operation, isError: false, 
result };
+      const respMsg = {
+        type: "response",
+        id,
+        operation,
+        isError: false,
+        result,
+      };
       sendMessage(JSON.stringify(respMsg));
     } catch (e) {
       const respMsg = {

-- 
To stop receiving notification emails like this one, please contact
address@hidden.



reply via email to

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